Elements
5.8
A C++ base framework for the Euclid Software.
ElementsKernel
ElementsKernel
SimpleProgram.h
Go to the documentation of this file.
1
28
#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_SIMPLEPROGRAM_H_
29
#define ELEMENTSKERNEL_ELEMENTSKERNEL_SIMPLEPROGRAM_H_
30
31
#include <boost/filesystem/path.hpp>
32
33
#include "
ElementsKernel/Export.h
"
34
#include "
ElementsKernel/Main.h
"
35
36
namespace
Elements
{
37
38
// Forward declaration. We don't need the definition right now.
39
enum class
ExitCode
;
40
41
class
ELEMENTS_API
SimpleProgram
{
42
43
public
:
44
45
ELEMENTS_API
ExitCode
run(
int
argc,
char
** argv) noexcept;
46
ELEMENTS_API
const
boost::filesystem::path
& getProgramPath()
const
;
47
ELEMENTS_API
const
boost::filesystem::path
& getProgramName()
const
;
48
49
50
protected
:
51
52
SimpleProgram
() =
default
;
53
virtual
~
SimpleProgram
();
54
55
virtual
ExitCode
main() = 0;
56
virtual
void
defineOptions() = 0;
57
58
private
:
59
60
void
setup(
int
argc,
char
** argv);
61
62
private
:
63
64
boost::filesystem::path
m_program_name
;
65
boost::filesystem::path
m_program_path
;
66
67
};
68
69
}
// namespace Elements
70
71
72
#endif // ELEMENTSKERNEL_ELEMENTSKERNEL_SIMPLEPROGRAM_H_
73
Export.h
defines the macros to be used for explicit export of the symbols
Elements::ExitCode
ExitCode
Strongly typed exit numbers.
Definition:
Exit.h:97
ElementsServices::DataSync::path
boost::filesystem::path path
Definition:
DataSyncUtils.h:33
ELEMENTS_API
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition:
Export.h:74
Elements::SimpleProgram
Definition:
SimpleProgram.h:41
Elements::SimpleProgram::m_program_path
boost::filesystem::path m_program_path
Definition:
SimpleProgram.h:65
Main.h
Definition of the top macro to create an Elements program.
Elements::SimpleProgram::m_program_name
boost::filesystem::path m_program_name
Definition:
SimpleProgram.h:64
Elements
Definition:
Auxiliary.h:43
Generated by
1.8.17