Elements  6.0.1
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
XercesExample.cpp
Go to the documentation of this file.
1 
21 #include <map> // for map
22 #include <string> // for string
23 
24 #include <xercesc/util/PlatformUtils.hpp> // for Initialize and Terminate
25 #include <xercesc/util/XercesVersion.hpp> // For gXercesFullVersionStr
26 
27 #include "ElementsKernel/ProgramHeaders.h" // for including all Program/related headers
28 #include "ElementsKernel/Unused.h" // for ELEMENTS_UNUSED
29 
30 namespace Xerces = XERCES_CPP_NAMESPACE; // needed to avoid an unneeded ugly ns
31 
32 using std::map;
33 using std::string;
34 
35 namespace Elements {
36 namespace Examples {
37 
38 class XercesExample : public Program {
39 
40 public:
42 
43  auto log = Logging::getLogger("XercesExample");
44 
45  Xerces::XMLPlatformUtils::Initialize();
46 
47  log.info() << "XercesC version:" << gXercesFullVersionStr;
48 
49  Xerces::XMLPlatformUtils::Terminate();
50 
51  log.info() << "done with test program! ";
52 
53  return ExitCode::OK;
54  }
55 };
56 
57 } // namespace Examples
58 } // namespace Elements
59 
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:97
Macro to silence unused variables warnings from the compiler.
Everything is OK.
Abstract class for all Elements programs.
Definition: Program.h:52
STL class.
STL class.
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:113
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
#define ELEMENTS_UNUSED
Definition: Unused.h:39
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63