Elements
6.2
A C++ base framework for the Euclid Software.
|
Abstract class for all Elements programs. More...
#include <Program.h>
Public Types | |
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 |
Public Member Functions | |
Program ()=default | |
Constructor. More... | |
virtual | ~Program () |
Destructor. More... | |
virtual OptionsDescription | defineSpecificProgramOptions () |
This methods must be used to define specific program options. More... | |
virtual std::pair< OptionsDescription, PositionalOptionsDescription > | defineProgramArguments () |
This methods must be used to the program arguments. More... | |
virtual ExitCode | mainMethod (std::map< std::string, VariableValue > &args)=0 |
This is the "main" method of all Elements programs. More... | |
Abstract class for all Elements programs.
This abstract class defines the three interfaces that should be implemented by all Elements programs.
using Elements::Program::options_description = boost::program_options::options_description |
using Elements::Program::positional_options_description = boost::program_options::positional_options_description |
using Elements::Program::variable_value = boost::program_options::variable_value |
using Elements::Program::variables_map = boost::program_options::variables_map |
|
default |
Constructor.
|
virtualdefault |
Destructor.
|
virtual |
This methods must be used to the program arguments.
This is the second method that must be implemented by all Elements programs
Reimplemented in Elements::Examples::ProgramWithArguments.
Definition at line 36 of file Program.cpp.
References std::make_pair().
|
virtual |
This methods must be used to define specific program options.
This is the first method that must be implemented by all Elements programs
Reimplemented in Elements::Examples::Program, and ExtProgram.
Definition at line 31 of file Program.cpp.
|
pure virtual |
This is the "main" method of all Elements programs.
This is the second method that must be implemented by all Elements programs. It represents the entry point.
args | A map containing the values given by the user for the program options defined by the defineSpecificProgramOptions() method |
Implemented in Elements::Examples::Program, ExtProgram, and Elements::Examples::OpenMP.