Elements  5.10
A C++ base framework for the Euclid Software.
 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/Exit.h" // For ExitCode
#include "ElementsKernel/Exception.h" // For Exception
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