Elements
6.2
A C++ base framework for the Euclid Software.
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
j
k
l
m
n
o
p
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
Variables
c
d
h
l
m
o
p
s
t
u
x
y
Typedefs
Enumerations
Enumerator
Files
File List
File Members
All
_
c
e
h
l
m
n
p
u
Functions
Variables
Typedefs
Macros
Examples
Sphinx
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
ElementsExamples/src/program/AnotherSimpleProgram.cpp
This is an example of how to use the SimpleProgram class.
#include <iostream>
#include "
ElementsKernel/Exception.h
"
// For Exception
#include "
ElementsKernel/Exit.h
"
// For ExitCode
#include "
ElementsKernel/SimpleProgram.h
"
namespace
Elements
{
namespace
Examples {
class
AnotherSimpleProgram :
public
SimpleProgram {
public
:
void
defineOptions
()
override
{}
ExitCode
main
()
override
{
std::cout
<<
"Program name: "
<< getProgramName() <<
std::endl
;
std::cout
<<
"Program path: "
<< getProgramPath() <<
std::endl
;
throw
Exception(
"This is an example exception."
);
return
ExitCode::OK
;
}
};
}
// namespace Examples
}
// namespace Elements
MAIN
(
Elements::Examples::AnotherSimpleProgram
)
Elements::ExitCode::OK
@ OK
Everything is OK.
Elements::Program::ExitCode
Elements::ExitCode ExitCode
Definition:
Program.h:67
Elements::Examples::AnotherSimpleProgram::main
ExitCode main() override
The "main" method.
Definition:
AnotherSimpleProgram.cpp:55
SimpleProgram.h
Exit.h
define a list of standard exit codes for executables
Exception.h
defines the base Elements exception class
std::cout
std::endl
T endl(T... args)
Elements::Examples::AnotherSimpleProgram
Example of an Elements program.
Definition:
AnotherSimpleProgram.cpp:39
MAIN
#define MAIN(ELEMENTS_PROGRAM)
Definition:
SimpleProgram.h:79
Elements::Examples::AnotherSimpleProgram::defineOptions
void defineOptions() override
Definition:
AnotherSimpleProgram.cpp:42
Elements
Definition:
callBackExample.h:35
Generated by
1.8.17