28#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_SIMPLE_PROGRAM_H_
29#define ELEMENTSKERNEL_ELEMENTSKERNEL_SIMPLE_PROGRAM_H_
47 ExitCode run(
int argc,
char** argv)
noexcept;
48 const Path::Item& getProgramPath()
const;
49 const Path::Item& getProgramName()
const;
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
virtual ExitCode main()=0
virtual void defineOptions()=0
Path::Item m_program_name
ExitCode
Strongly typed exit numbers.
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.