Elements 6.0.1
A C++ base framework for the Euclid Software.
|
Example of an Elements program. More...
Public Member Functions | |
ExitCode | mainMethod (ELEMENTS_UNUSED map< string, VariableValue > &args) override |
The "main" method. | |
std::pair< OptionsDescription, PositionalOptionsDescription > | defineProgramArguments () override |
This methods must be used to the program arguments. | |
![]() | |
Program ()=default | |
Constructor. | |
virtual | ~Program () |
Destructor. | |
virtual OptionsDescription | defineSpecificProgramOptions () |
This methods must be used to define specific program options. | |
virtual std::pair< OptionsDescription, PositionalOptionsDescription > | defineProgramArguments () |
This methods must be used to the program arguments. | |
virtual ExitCode | mainMethod (std::map< std::string, VariableValue > &args)=0 |
This is the "main" method of all Elements programs. | |
Additional Inherited Members | |
![]() | |
using | options_description = boost::program_options::options_description |
using | positional_options_description = boost::program_options::positional_options_description |
using | variable_value = boost::program_options::variable_value |
using | variables_map = boost::program_options::variables_map |
using | OptionsDescription = options_description |
using | PositionalOptionsDescription = positional_options_description |
using | VariableValue = variable_value |
using | VariablesMap = variables_map |
using | ExitCode = Elements::ExitCode |
using | Logging = Elements::Logging |
Example of an Elements program.
This class is an example of a program based on the ElementsProgram class. It can be copied/pasted conveniently to write a new program.
Definition at line 50 of file ProgramExampleWithArguments.cpp.
|
inlineoverridevirtual |
This methods must be used to the program arguments.
This is the second method that must be implemented by all Elements programs
Reimplemented from Elements::Program.
Definition at line 85 of file ProgramExampleWithArguments.cpp.
References std::make_pair().
|
inlineoverride |
The "main" method.
This method is the entry point to the program. In this sense, it is similar to a main (and it is why it is called mainMethod()). The code below provides only example stuff which should be replaced by real code in any program.
See the ElementsProgram documentation for more details.
Definition at line 64 of file ProgramExampleWithArguments.cpp.
References std::endl(), Elements::Logging::getLogger(), Elements::Examples::log, and Elements::OK.