Elements
5.10
A C++ base framework for the Euclid Software.
ElementsExamples
src
program
WcsExample.cpp
Go to the documentation of this file.
1
21
#include <map>
// for map
22
#include <string>
// for string
23
#include <boost/program_options.hpp>
// for program options from configuration file of command line arguments
24
25
#include <wcslib/wcs.h>
26
27
#include "
ElementsKernel/ProgramHeaders.h
"
// for including all Program/related headers
28
#include "
ElementsKernel/Unused.h
"
// for ELEMENTS_UNUSED
29
30
using
std::map
;
31
using
std::string
;
32
using
boost::program_options::variable_value;
33
34
namespace
Elements
{
35
namespace
Examples {
36
37
class
WcsExample
:
public
Program
{
38
39
public
:
40
41
ExitCode
mainMethod
(
ELEMENTS_UNUSED
map<string, variable_value>
& args)
override
{
42
43
auto
log
=
Logging::getLogger
(
"WcsExample"
);
44
45
log
.info() <<
"done with test program! "
;
46
47
return
ExitCode::OK
;
48
49
}
50
51
};
52
53
}
// namespace Examples
54
}
// namespace Elements
55
56
61
MAIN_FOR
(
Elements::Examples::WcsExample
)
Elements::ExitCode::OK
@ OK
Everything is OK.
std::string
STL class.
Elements::ExitCode
ExitCode
Strongly typed exit numbers.
Definition:
Exit.h:98
std::map
STL class.
ProgramHeaders.h
Elements::Examples::log
auto log
Definition:
BackTraceExample.cpp:38
Elements::Logging::getLogger
static Logging getLogger(const std::string &name="")
Definition:
Logging.cpp:63
Elements::Program
Abstract class for all Elements programs.
Definition:
Program.h:51
MAIN_FOR
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition:
Main.h:117
Elements::Examples::WcsExample::mainMethod
ExitCode mainMethod(ELEMENTS_UNUSED map< string, variable_value > &args) override
Definition:
WcsExample.cpp:41
Unused.h
Macro to silence unused variables warnings from the compiler.
ELEMENTS_UNUSED
#define ELEMENTS_UNUSED
Definition:
Unused.h:39
Elements::Examples::WcsExample
Definition:
WcsExample.cpp:37
Elements
Definition:
ClassExample.h:38
Generated by
1.8.18