MeVisLab Toolbox Reference
mlBaseItemParser.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_BASE_ITEM_PARSER_H
14 #define ML_BASE_ITEM_PARSER_H
15 
16 
18 
19 // ML-includes
20 #include "mlBaseInit.h"
21 #include "mlModuleIncludes.h"
22 #include "mlParserBase.h"
23 
24 
25 ML_START_NAMESPACE
26 
27 
28 // ------------------------------------------------------------------
29 // Class BaseItemParser
30 // ------------------------------------------------------------------
37 {
38 public:
39 
42 
44  int getId (MLssize_t &id);
45 
47  int getName (std::string &name);
48 
50  const char *getErrorMessage (int errorCode) override;
51 
53  enum {
54  kInvalidType = kNumBaseErrorCodes,
55  kNumBaseItemErrorCodes
56  };
57 
58 };
59 
60 
61 ML_END_NAMESPACE
62 
63 #endif // __mlBaseItemParser_H
64 
65 
Parser class for BaseItem strings, containing an object's id and name.
int getName(std::string &name)
Parse and return object name.
int getId(MLssize_t &id)
Parse and return object id.
const char * getErrorMessage(int errorCode) override
Get error string for errorCode.
BaseItemParser()
Constructor.
Basic parser class from which special parser classes can be derived for parsing persistent state stri...
Definition: mlParserBase.h:37
@ kNumBaseErrorCodes
Highest error code +1.
Definition: mlParserBase.h:63
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition: mlBaseInit.h:22
SSIZE_T MLssize_t
The signed ML size type which is a signed 32 bit size_t on 32 bit platforms and 64 bit one on 64 bit ...
Definition: mlTypeDefs.h:654