31 #ifndef DATATOOLS_KERNEL_H 32 #define DATATOOLS_KERNEL_H 39 #include <boost/noncopyable.hpp> 40 #include <boost/cstdint.hpp> 43 #pragma clang diagnostic push 44 #pragma clang diagnostic ignored "-Wunused-local-typedef" 46 #include <boost/program_options.hpp> 48 #pragma clang diagnostic pop 61 class service_manager;
62 class urn_query_service;
63 class library_query_service;
66 namespace configuration {
69 class variant_repository;
70 class variant_service;
76 :
private boost::noncopyable
94 void print(std::ostream & out_,
95 const std::string & title_ =
"",
96 const std::string & indent_ =
"");
116 #if DATATOOLS_WITH_QT_GUI == 1 117 bool inhibit_qt_gui =
false;
118 bool variant_qt_gui =
false;
119 std::string variant_qt_gui_style =
"plastique";
120 #endif // DATATOOLS_WITH_QT_GUI == 1 153 kernel(
int argc_,
char * argv_[], uint32_t flags = 0);
159 void initialize(
int argc_,
char * argv_[], uint32_t flags_ = 0);
264 static void build_opt_desc(boost::program_options::options_description &, param_type &, uint32_t flags_ = 0);
270 static void print_opt_desc(
const boost::program_options::options_description &,
271 std::ostream & = std::clog,
272 const std::string & indent_ =
"");
274 #if DATATOOLS_WITH_QT_GUI == 1 275 bool is_qt_gui_activated()
const;
277 #endif // DATATOOLS_WITH_QT_GUI == 1 283 const std::vector<std::string> &
get_args()
const;
311 void tree_dump(std::ostream & out_ = std::clog,
312 const std::string & title_ =
"",
313 const std::string & indent_ =
"",
314 bool inherit_ =
false)
const;
324 const std::string & registry_name_ =
"");
353 void _set_defaults_();
359 void _initialize_services_();
362 void _shutdown_services_();
365 void _initialize_library_query_service_();
368 void _shutdown_library_query_service_();
371 void _initialize_urn_query_service_();
374 void _shutdown_urn_query_service_();
377 void _initialize_configuration_variant_repository_();
382 bool _initialized_ =
false;
387 std::string _locale_category_;
388 std::string _application_name_;
389 unsigned int _nargs_ = 0;
390 std::vector<std::string> _args_;
392 char ** _argv_ =
nullptr;
393 std::vector<std::string> _unrecognized_args_;
394 bool _activate_library_query_service_ =
true;
395 bool _activate_urn_query_service_ =
true;
396 bool _activate_variant_repository_ =
true;
397 bool _allowed_variant_service_ =
true;
398 #if DATATOOLS_WITH_QT_GUI == 1 399 bool _activate_qt_gui_ =
true;
400 #endif // DATATOOLS_WITH_QT_GUI == 1 403 std::unique_ptr<datatools::service_manager> _services_;
404 std::unique_ptr<configuration::variant_repository> _variant_repository_;
406 #if DATATOOLS_WITH_QT_GUI == 1 408 #endif // DATATOOLS_WITH_QT_GUI == 1 411 static kernel * _instance_;
417 #endif // DATATOOLS_KERNEL_H
Utilities for logging information.