Elements 6.1.2
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
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
30namespace Xerces = XERCES_CPP_NAMESPACE; // needed to avoid an unneeded ugly ns
31
32using std::map;
33using std::string;
34
35namespace Elements {
36namespace Examples {
37
38class Xerces : public Program {
39
40public:
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
Macro to silence unused variables warnings from the compiler.
Simple example of an Elements program.
Definition: Program.cpp:79
ExitCode mainMethod(ELEMENTS_UNUSED map< string, VariableValue > &args) override
Definition: Xerces.cpp:41
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:97
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:113
#define ELEMENTS_UNUSED
Definition: Unused.h:39
@ OK
Everything is OK.