MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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
26
27
28// ------------------------------------------------------------------
29// Class BaseItemParser
30// ------------------------------------------------------------------
37{
38public:
41 : ParserBase()
42 {}
43
45 int getId(MLssize_t& id);
46
48 int getName(std::string& name);
49
51 const char* getErrorMessage(int errorCode) override;
52
54 enum {
55 kInvalidType = kNumBaseErrorCodes,
56 kNumBaseItemErrorCodes
57 };
58};
59
60
62
63#endif // __mlBaseItemParser_H
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.
BaseItemParser()
Constructor.
const char * getErrorMessage(int errorCode) override
Get error string for errorCode.
Basic parser class from which special parser classes can be derived for parsing persistent state stri...
@ kNumBaseErrorCodes
Highest error code +1.
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition mlBaseInit.h:22
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
SSIZE_T MLssize_t
The signed ML size type that is a signed 32-bit size_t on 32-bit platforms and 64-bit one on 64-bit p...
Definition mlTypeDefs.h:563