AURobotServers  4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
USmlString Class Reference

#include <usmlstring.h>

Inheritance diagram for USmlString:
Inheritance graph

Public Member Functions

virtual int getLineNumber ()
 
virtual bool isSourceAvailable ()
 
virtual void setLineNumber (int newLineNumber)
 
bool setSourceString (const char *editString)
 
void setVerbose (bool value)
 
virtual void syntaxError (const char *message)
 
 USmlString ()
 
 ~USmlString ()
 
- 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 ()
 
virtual const char * getSourceName ()
 
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)
 
- Protected Member Functions inherited from USmlSource
void clearRxBuffer ()
 

Protected Attributes

const char * fullSource
 
int line
 
const char * source
 
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
 

Detailed Description

An sml stream based on a stringh source

    @author Christian Andersen <chrand@mail.dk>

Constructor & Destructor Documentation

USmlString::USmlString ( )

References fullSource, line, source, and verbose.

USmlString::~USmlString ( )

Member Function Documentation

bool USmlString::doVerboseMessages ( )
protectedvirtual

Should additional messages be printed to console

Reimplemented from USmlSource.

References verbose.

Referenced by setLineNumber().

virtual int USmlString::getLineNumber ( )
inlinevirtual

Get current line number from the source - first line is 1

Returns
-1 if line numbers are unavalable (file not open)

Reimplemented from USmlSource.

References line.

int USmlString::getMoreData ( char *  buffer,
int  bufferSize,
int  pollTimeoutMs 
)
protectedvirtual

Get more data, if more data is available

Reimplemented from USmlSource.

References line, mini(), and source.

Referenced by setLineNumber().

bool USmlString::isSourceAvailable ( )
virtual

Is tha data source (still) open, and is ther more unread data.

Returns
true if more data is available

Reimplemented from USmlSource.

References source.

Referenced by UMisLoadedRule::completeEdit(), and setLineNumber().

virtual void USmlString::setLineNumber ( int  newLineNumber)
inlinevirtual

Set current line number from the source

Parameters
newLineNumbermay be used to set a new series of line numbers

Reimplemented from USmlSource.

References doVerboseMessages(), getMoreData(), isSourceAvailable(), and line.

bool USmlString::setSourceString ( const char *  editString)

Set the source string.

Parameters
editStringis the source string, ordered in lines separated by '
'
Returns
true

References fullSource, line, and source.

Referenced by UMisLoadedRule::completeEdit().

void USmlString::setVerbose ( bool  value)
inline

Set if the console messages should be verbose

References verbose.

void USmlString::syntaxError ( const char *  message)
virtual

A syntax error has occured with the provided message

Parameters
messageis a description of the error type.

Reimplemented from USmlSource.

References line, and USmlSource::syntaxError().

Member Data Documentation

const char* USmlString::fullSource
protected

pointer to XML lines to be added

Referenced by setSourceString(), and USmlString().

int USmlString::line
protected
const char* USmlString::source
protected

Current position in source

Referenced by getMoreData(), isSourceAvailable(), setSourceString(), and USmlString().

bool USmlString::verbose
protected

Should more debug data be output to console

Referenced by doVerboseMessages(), setVerbose(), and USmlString().


The documentation for this class was generated from the following files: