Elements  6.2
A C++ base framework for the Euclid Software.
Xerces.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 Xerces : 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 
Elements::ExitCode::OK
@ OK
Everything is OK.
std::string
STL class.
Elements::ExitCode
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:97
Elements::Examples::Xerces::mainMethod
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
Definition: Xerces.cpp:41
Elements::Examples::Program
Simple example of an Elements program.
Definition: Program.cpp:79
std::map
STL class.
ProgramHeaders.h
Elements::Examples::Xerces
Definition: Xerces.cpp:38
Elements::Examples::log
auto log
Definition: BackTrace.cpp:36
Elements::Logging::getLogger
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63
MAIN_FOR
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:113
Unused.h
Macro to silence unused variables warnings from the compiler.
ELEMENTS_UNUSED
#define ELEMENTS_UNUSED
Definition: Unused.h:39
Elements
Definition: callBackExample.h:35