Class pvx_source_reader

The class will read a source file for a ProvideX program. It uses a FileReader to read the lines from the file and concatenates them together to build the full program line.

Build Information

Author Fred McGuirk
Date Feb 23, 2007
Outputfile pvx_source_reader.pvc
Forcelinenumbers false

Constructor

Open the ProvideX source file to be read.

ParameterDescription
inFile$ The name of file to read
inPathResolver **Optional** A reference to a [ProvideX Class:path_resolver] class to expand the name of include files.

Properties

PROPERTY _version$

Methods

FUNCTION getEOF()

Get the end of file status

Returns A boolean that is set to TRUE (1) when end of data stream has been reached.
FUNCTION getFirstLine$()

Get the unprocessed first line from the source file

Returns A string containing the data from the first line of the source file.
FUNCTION getSourceText$()

Get the unprocessed text as read from source file for current program line

Returns A string containing the text from the source file with minimal processing.
FUNCTION hasLineNumbers()

The source file has line numbers. This value is based on the first line in the file since the program load will fail if the remainder of the source file does not use line numbers.

Returns A simple boolean value (0=False, 1=True)
FUNCTION read$()

Returns A string containing the text for a single line read from the file; ! ** this will include line breaks appended to the end of the string so that the
number of lines will match the original source file.

FUNCTION setBlockCommentsVisible(inBoolean)

Set a flag to control whether C-style block comments are returned to the controlling application. The default is to hide these comments.

ParameterDescription
inBoolean (0=False, 1=True)
FUNCTION setIgnoreIncludes(inBoolean)

Set a flag to disable processing of '#include' references

ParameterDescription
inBoolean (0=False, 1=True)