Elements 6.1.2
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
Program.h
Go to the documentation of this file.
1
27#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_PROGRAM_H_
28#define ELEMENTSKERNEL_ELEMENTSKERNEL_PROGRAM_H_
29
30#include <map> // for map
31#include <memory> // for unique_ptr
32#include <string> // for string
33#include <utility> // for pair
34
35#include <boost/program_options.hpp>
36
37#include "ElementsKernel/Exit.h" // for ExitCode
38#include "ElementsKernel/Export.h" // ELEMENTS_API
39#include "ElementsKernel/Logging.h" // for Logging
40
41namespace Elements {
42
53
54public:
55 // backwards compatible type aliases
56 using options_description = boost::program_options::options_description;
57 using positional_options_description = boost::program_options::positional_options_description;
58 using variable_value = boost::program_options::variable_value;
59 using variables_map = boost::program_options::variables_map;
60
61 // camel case type aliases
66
69
73 Program() = default;
74
78 virtual ~Program();
79
89 virtual OptionsDescription defineSpecificProgramOptions();
90
101
116};
117
123} // namespace Elements
124
125#endif // ELEMENTSKERNEL_ELEMENTSKERNEL_PROGRAM_H_
126
define a list of standard exit codes for executables
defines the macros to be used for explicit export of the symbols
Logging facility.
Logging API of the Elements framework.
Definition: Logging.h:93
Abstract class for all Elements programs.
Definition: Program.h:52
options_description OptionsDescription
Definition: Program.h:62
boost::program_options::options_description options_description
Definition: Program.h:56
boost::program_options::positional_options_description positional_options_description
Definition: Program.h:57
boost::program_options::variables_map variables_map
Definition: Program.h:59
variable_value VariableValue
Definition: Program.h:64
positional_options_description PositionalOptionsDescription
Definition: Program.h:63
virtual ExitCode mainMethod(std::map< std::string, VariableValue > &args)=0
This is the "main" method of all Elements programs.
Program()=default
Constructor.
virtual ~Program()
Destructor.
variables_map VariablesMap
Definition: Program.h:65
boost::program_options::variable_value variable_value
Definition: Program.h:58
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:97
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74