28#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_SIMPLE_PROGRAM_H_
29#define ELEMENTSKERNEL_ELEMENTSKERNEL_SIMPLE_PROGRAM_H_
59 void setup(
int argc,
char** argv);
83#define MAIN(ELEMENTS_PROGRAM) \
84 ELEMENTS_API int main(int argc, char* argv[]) { \
85 auto program = ELEMENTS_PROGRAM(); \
86 Elements::ExitCode exit_code = program.run(argc, argv); \
87 return static_cast<Elements::ExitCodeType>(exit_code); \
defines the macros to be used for explicit export of the symbols
provide functions to retrieve resources pointed by environment variables
Logging API of the Elements framework.
Path::Item m_program_path
void setup(int argc, char **argv)
virtual ExitCode main()=0
const Path::Item & getProgramPath() const
ExitCode run(int argc, char **argv) noexcept
Elements::Logging Logging
virtual void defineOptions()=0
Path::Item m_program_name
const Path::Item & getProgramName() const
Elements::ExitCode ExitCode
ExitCode
Strongly typed exit numbers.
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.