AURobotServers
4
|
#include <usmlfile.h>
Public Member Functions | |
void | closeSmlFile () |
virtual int | getLineNumber () |
virtual const char * | getSourceName () |
bool | openSmlFile (const char *filename) |
virtual void | setLineNumber (int newLineNumber) |
void | setVerbose (bool value) |
virtual void | syntaxError (const char *message) |
USmlFile () | |
~USmlFile () | |
Public Member Functions inherited from USmlSource | |
void | allowTagAtStartOfLineOnly () |
const char * | getErrorBuffer () |
virtual int | getNBytes (char *buffer, int n, int msTimeout=100) |
virtual bool | getNextTag (USmlTag *tag, int msTimeout=100, USmlTagIn *failEndTag=NULL, char *beforeTagBuffer=NULL, int *beforeTagCnt=NULL) |
char * | getRxDataBuffer () |
int | getRxDataBufferCnt () |
bool | getToEndTag (USmlTagIn *tag, char *buffer, const int bufferSize, int msTimeout=100, USmlTagIn *lastTag=NULL) |
bool | isErrorText () |
bool | isVerbose () |
virtual bool | logSourceData (const char *, int) |
virtual bool | outputData (const char *message) |
void | setErrorBuffer (char *buf, const int bufCnt) |
int | setRxDataBufferCnt (int newMaxLength) |
virtual bool | skipNBytes (int n, int msTimeout=100) |
virtual bool | skipToEndTag (USmlTagIn *tag, int msTimeout=100) |
USmlSource () | |
virtual | ~USmlSource () |
Protected Member Functions | |
virtual bool | doVerboseMessages () |
virtual int | getMoreData (char *buffer, int bufferSize, int pollTimeoutMs) |
virtual bool | isSourceAvailable () |
Protected Member Functions inherited from USmlSource | |
void | clearRxBuffer () |
Protected Attributes | |
FILE * | fh |
char | fn [MAX_FILENAME_LENGTH] |
int | line |
bool | verbose |
Protected Attributes inherited from USmlSource | |
int | dataCnt |
char * | errorBuffer |
int | errorBufferCnt |
bool | gotFirstTag |
bool | tagStartAtStartOfLineOnly |
Additional Inherited Members | |
Public Attributes inherited from USmlSource | |
const char * | ifName |
File source for SML (XML) source
@author Christian Andersen <chrand@mail.dk>
USmlFile::USmlFile | ( | ) |
Constructor
References USmlSource::errorBufferCnt, fh, fn, line, and verbose.
USmlFile::~USmlFile | ( | ) |
Destructor
References fh.
void USmlFile::closeSmlFile | ( | ) |
|
protectedvirtual |
Should additional messaves be printed to console
Reimplemented from USmlSource.
References verbose.
Referenced by getSourceName().
|
inlinevirtual |
Get current line number from the source - first line is 1
Reimplemented from USmlSource.
References line.
|
protectedvirtual |
Get more data, if more data is available
Reimplemented from USmlSource.
Referenced by getSourceName().
|
inlinevirtual |
Get source name (filename) pointer
Reimplemented from USmlSource.
References doVerboseMessages(), fn, getMoreData(), and isSourceAvailable().
|
protectedvirtual |
Is tha data source (still) open.
Reimplemented from USmlSource.
References fh.
Referenced by getSourceName().
bool USmlFile::openSmlFile | ( | const char * | filename | ) |
Open file. If file is open, then old file will be closed first.
References dataPath, fh, fn, getFullFilename(), line, and MAX_FILENAME_LENGTH.
Referenced by UResRule::loadFile().
|
inlinevirtual |
Set current line number from the source
newLineNumber | may be used to set a new series of line numbers |
Reimplemented from USmlSource.
References line.
|
inline |
Set if the console messages should be verbose
References verbose.
Referenced by UResRule::loadFile().
|
virtual |
A syntax error has occured with the provided message
message | is a description of the error type. |
Reimplemented from USmlSource.
References line, and USmlSource::syntaxError().
|
protected |
file handle for XML type file
Referenced by closeSmlFile(), getMoreData(), isSourceAvailable(), openSmlFile(), USmlFile(), and ~USmlFile().
|
protected |
file name
Referenced by getSourceName(), openSmlFile(), and USmlFile().
|
protected |
current line number
Referenced by closeSmlFile(), getLineNumber(), getMoreData(), openSmlFile(), setLineNumber(), syntaxError(), and USmlFile().
|
protected |
Should more debug data be output to console
Referenced by doVerboseMessages(), setVerbose(), and USmlFile().