MeVisLab Toolbox Reference
ml::BaseItemParser Class Reference

#include <mlBaseItemParser.h>

Inheritance diagram for ml::BaseItemParser:
ml::ParserBase

Public Types

enum  { kInvalidType = kNumBaseErrorCodes , kNumBaseItemErrorCodes }
 Error codes. More...
Public Types inherited from ml::ParserBase
enum  { kNoError = 0 , kEmptyString , kNumBaseErrorCodes , kEndOfSource = -1 }
 Error codes. More...

Public Member Functions

 BaseItemParser ()
 Constructor.
int getId (MLssize_t &id)
 Parse and return object id.
int getName (std::string &name)
 Parse and return object name.
const char * getErrorMessage (int errorCode) override
 Get error string for errorCode.
Public Member Functions inherited from ml::ParserBase
 ParserBase ()
 Constructor.
virtual ~ParserBase ()
 Make destructor virtual to avoid warnings.
virtual int init (const char *source)
const char * getCurrentPos ()
 Get current parser position.
bool endOfSource ()
 Return end-of-source flag.

Additional Inherited Members

Static Public Member Functions inherited from ml::ParserBase
static char * newString (const std::string &str)
static void deleteString (char *str)
 Dispose a string allocated with newString().
Protected Member Functions inherited from ml::ParserBase
void skipWhitespace ()
 Proceed to next non-whitespace character.
Protected Attributes inherited from ml::ParserBase
const char * _source
 Source string.
const char * _pNext
 Pointer to current parser position.
bool _eos
 End-of-string flag.

Detailed Description

Parser class for BaseItem strings, containing an object's id and name. The strings use the following syntax: ['#'id][[:]name] id = integer name = string

Definition at line 36 of file mlBaseItemParser.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Error codes.

Enumerator
kInvalidType 
kNumBaseItemErrorCodes 

Highest error code +1, not to be used as error code enumerator!

Definition at line 53 of file mlBaseItemParser.h.

Constructor & Destructor Documentation

◆ BaseItemParser()

ml::BaseItemParser::BaseItemParser ( )
inline

Constructor.

Definition at line 41 of file mlBaseItemParser.h.

References ml::ParserBase::ParserBase().

Member Function Documentation

◆ getErrorMessage()

const char * ml::BaseItemParser::getErrorMessage ( int errorCode)
overridevirtual

Get error string for errorCode.

Reimplemented from ml::ParserBase.

◆ getId()

int ml::BaseItemParser::getId ( MLssize_t & id)

Parse and return object id.

◆ getName()

int ml::BaseItemParser::getName ( std::string & name)

Parse and return object name.


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