Elements  5.10
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | List of all members
Elements::Examples::ProgramExampleWithArguments Class Reference

Example of an Elements program. More...

Inheritance diagram for Elements::Examples::ProgramExampleWithArguments:
[legend]
Collaboration diagram for Elements::Examples::ProgramExampleWithArguments:
[legend]

Public Member Functions

ExitCode mainMethod (ELEMENTS_UNUSED map< string, variable_value > &args) override
 The "main" method. More...
 
std::pair< options_description,
positional_options_description > 
defineProgramArguments () override
 This methods must be used to the program arguments. More...
 
- Public Member Functions inherited from Elements::Program
 Program ()=default
 Constructor. More...
 
virtual ~Program ()
 Destructor. More...
 
virtual
boost::program_options::options_description 
defineSpecificProgramOptions ()
 This methods must be used to define specific program options. More...
 
virtual ExitCode mainMethod (std::map< std::string, boost::program_options::variable_value > &args)=0
 This is the "main" method of all Elements programs. More...
 

Detailed Description

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 51 of file ProgramExampleWithArguments.cpp.

Member Function Documentation

std::pair<options_description, positional_options_description> Elements::Examples::ProgramExampleWithArguments::defineProgramArguments ( )
inlineoverridevirtual

This methods must be used to the program arguments.

This is the second method that must be implemented by all Elements programs

Returns
a pair of BOOST options description and positional_options_description

Reimplemented from Elements::Program.

Definition at line 88 of file ProgramExampleWithArguments.cpp.

References std::make_pair().

Here is the call graph for this function:

ExitCode Elements::Examples::ProgramExampleWithArguments::mainMethod ( ELEMENTS_UNUSED map< string, variable_value > &  args)
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 66 of file ProgramExampleWithArguments.cpp.

References std::endl(), Elements::Logging::getLogger(), Elements::Examples::log, and Elements::OK.

Here is the call graph for this function:


The documentation for this class was generated from the following file: