Elements  5.10
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 <boost/program_options.hpp> // for program options from configuration file of command line arguments
25 
26 #include <xercesc/util/XercesVersion.hpp> // For gXercesFullVersionStr
27 #include <xercesc/util/PlatformUtils.hpp> // for Initialize and Terminate
28 
29 #include "ElementsKernel/ProgramHeaders.h" // for including all Program/related headers
30 #include "ElementsKernel/Unused.h" // for ELEMENTS_UNUSED
31 
32 namespace Xerces = XERCES_CPP_NAMESPACE; // needed to avoid an unneeded ugly ns
33 
34 using std::map;
35 using std::string;
36 
37 using boost::program_options::variable_value;
38 
39 namespace Elements {
40 namespace Examples {
41 
42 class XercesExample: public Program {
43 
44 public:
45 
47 
48  auto log = Logging::getLogger("XercesExample");
49 
50  Xerces::XMLPlatformUtils::Initialize();
51 
52  log.info() << "XercesC version:" << gXercesFullVersionStr;
53 
54  Xerces::XMLPlatformUtils::Terminate();
55 
56  log.info() << "done with test program! ";
57 
58  return ExitCode::OK;
59 
60  }
61 
62 };
63 
64 } // namespace Examples
65 } // namespace Elements
66 
67 
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:98
Macro to silence unused variables warnings from the compiler.
Everything is OK.
Abstract class for all Elements programs.
Definition: Program.h:51
STL class.
STL class.
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:117
ExitCode mainMethod(ELEMENTS_UNUSED map< string, variable_value > &args) override
#define ELEMENTS_UNUSED
Definition: Unused.h:39
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63