ClockWork DB CoreAPI 1.0.48
Abstract Time Series and Storage/Management Library
Loading...
Searching...
No Matches
environment.hpp
1#ifndef HAVE_TOM__ENVIRONMENT_HPP
2#define HAVE_TOM__ENVIRONMENT_HPP
3
4#include <tom-util/defines.hpp>
5#include <tom-util/scalar.hpp>
6#include <tom-util/logger.hpp>
7#include <tom-util/xml_config.hpp>
8
9namespace tom {
10
11class TOM_UTIL_API environment
12{
13public:
14 static
15 environment & Instance(); // may throw a std::runtime_error
16
17 bool
18 check_app_license( const char * name );
19
20 xml_doc & get_config() { return m_config; }
21
22 logger & get_logger();
23 logger & get_logger( const tom::observation &name ) { return get_logger( tom::String(name) ); }
24 logger & get_logger( const tom::String &name ) { return get_logger( name.value().c_str() ); }
25 logger & get_logger( const char * name ) { return tom::logger::get_logger(name); }
26
27 static const char *CONFIG_FILE_NAME;
28
29protected:
30 bool configure( const tom::string &path );
31 xml_doc m_config;
32
33private:
36
37};
38
39} // end tom namespace
40
41#endif
Definition string.hpp:15
Definition environment.hpp:12
Definition logger.hpp:59
Definition observation.hpp:13
Definition value_types.hpp:96
Definition xml_config.hpp:36