XmlParserStatus.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::XmlParserStatus
5 
6 \brief Encapsulates an XML document parsing status
7 
8 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11 \created May 4, 2004
12 
13 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //_______________________________________________________________________________
17 
18 #ifndef _XML_PARSER_STATUS_H_
19 #define _XML_PARSER_STATUS_H_
20 
21 namespace genie {
22 
23 typedef enum EXmlParseStatus {
24 
26  kXmlOK = 0,
28  kXmlEmpty = 2,
30 
32 
33 
35 
36  public:
37  static const char * AsString(XmlParserStatus_t status) {
38  switch(status) {
39  case kXmlUndefined: return "Undefined state"; break;
40  case kXmlOK: return "XML document succesfully parsed"; break;
41  case kXmlNotParsed: return "XML document parsing failed"; break;
42  case kXmlEmpty: return "XML document is empty"; break;
43  case kXmlInvalidRoot: return "XML document has invalid root element"; break;
44  default: return "unrecognized XMLParseStatus_t enum"; break;
45  }
46  return "unrecognized XMLParseStatus_t enum";
47  }
48 };
49 
50 } // namespace
51 #endif // _XML_PARSER_STATUS_H_
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
static const char * AsString(XmlParserStatus_t status)
Encapsulates an XML document parsing status.
enum genie::EXmlParseStatus XmlParserStatus_t