Elements
6.0.1
A C++ base framework for the Euclid Software.
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
ElementsExamples/src/program/AnotherSimpleProgramExample.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
AnotherSimpleProgramExample :
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::AnotherSimpleProgramExample
)
Generated by
1.8.5