13 #ifndef ML_PARSER_BASE_H
14 #define ML_PARSER_BASE_H
41 ParserBase () : _source(nullptr), _pNext(nullptr), _eos(true) {}
Basic parser class from which special parser classes can be derived for parsing persistent state stri...
const char * _pNext
Pointer to current parser position.
static char * newString(const std::string &str)
Convenience method to create a copy of the string str allocated on the heap.
const char * getCurrentPos()
Get current parser position.
@ kNumBaseErrorCodes
Highest error code +1.
@ kEmptyString
Source string null or empty.
static void deleteString(char *str)
Dispose a string allocated with newString()
bool _eos
End-of-string flag.
bool endOfSource()
Return end-of-source flag.
const char * _source
Source string.
virtual int init(const char *source)
Initialize parser and proceed to first non-whitespace character.
virtual const char * getErrorMessage(int errorCode)
Get error string for errorCode.
virtual ~ParserBase()
Make destructor virtual to avoid warnings.
void skipWhitespace()
Proceed to next non-whitespace character.
#define MLBASEEXPORT
defined Header file mlBaseInit.h
boost::graph_traits< ml_graph_ptr >::vertex_descriptor source(graph_traits< ml_graph_ptr >::edge_descriptor e, const ml_graph_ptr)
Returns the vertex descriptor for u of the edge (u,v) represented by e.