Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
appbase::application_impl Class Reference
Collaboration diagram for appbase::application_impl:

Public Member Functions

 application_impl ()
 
 ~application_impl ()
 

Public Attributes

options_description _app_options
 
options_description _cfg_options
 
variables_map _options
 
bfs::path _data_dir {"data-dir"}
 
bfs::path _config_dir {"config-dir"}
 
bfs::path _logging_conf {"logging.json"}
 
bfs::path _config_file_name
 
uint64_t _version = 0
 
std::string _version_str = appbase_version_string
 
std::string _full_version_str = appbase_version_string
 
std::atomic_bool _is_quiting {false}
 
any_type_compare_map _any_compare_map
 
std::thread _signal_catching_thread
 
std::optional< boost::asio::io_context > _signal_catching_io_ctx
 

Detailed Description

Definition at line 27 of file application.cpp.

Constructor & Destructor Documentation

◆ application_impl()

appbase::application_impl::application_impl ( )
inline

Definition at line 29 of file application.cpp.

29 :_app_options("Application Options"){
30#ifndef _WIN32
31 // Create a separate thread to handle signals, so that they don't interrupt I/O.
32 // stdio does not recover from EINTR.
34 _signal_catching_thread = std::thread([&ioctx = *_signal_catching_io_ctx]() {
35 auto workwork = boost::asio::make_work_guard(ioctx);
36 ioctx.run();
37 });
38
39 sigset_t blocked_signals;
40 sigemptyset(&blocked_signals);
41 sigaddset(&blocked_signals, SIGINT);
42 sigaddset(&blocked_signals, SIGTERM);
43 sigaddset(&blocked_signals, SIGPIPE);
44 sigaddset(&blocked_signals, SIGHUP);
45 pthread_sigmask(SIG_BLOCK, &blocked_signals, nullptr);
46#endif
47 }
std::thread _signal_catching_thread
std::optional< boost::asio::io_context > _signal_catching_io_ctx
options_description _app_options

◆ ~application_impl()

appbase::application_impl::~application_impl ( )
inline

Definition at line 49 of file application.cpp.

49 {
50 if(_signal_catching_thread.joinable()) {
53 }
54 }

Member Data Documentation

◆ _any_compare_map

any_type_compare_map appbase::application_impl::_any_compare_map

Definition at line 71 of file application.cpp.

◆ _app_options

options_description appbase::application_impl::_app_options

Definition at line 56 of file application.cpp.

◆ _cfg_options

options_description appbase::application_impl::_cfg_options

Definition at line 57 of file application.cpp.

◆ _config_dir

bfs::path appbase::application_impl::_config_dir {"config-dir"}

Definition at line 61 of file application.cpp.

61{"config-dir"};

◆ _config_file_name

bfs::path appbase::application_impl::_config_file_name

Definition at line 63 of file application.cpp.

◆ _data_dir

bfs::path appbase::application_impl::_data_dir {"data-dir"}

Definition at line 60 of file application.cpp.

60{"data-dir"};

◆ _full_version_str

std::string appbase::application_impl::_full_version_str = appbase_version_string

Definition at line 67 of file application.cpp.

◆ _is_quiting

std::atomic_bool appbase::application_impl::_is_quiting {false}

Definition at line 69 of file application.cpp.

69{false};

◆ _logging_conf

bfs::path appbase::application_impl::_logging_conf {"logging.json"}

Definition at line 62 of file application.cpp.

62{"logging.json"};

◆ _options

variables_map appbase::application_impl::_options

Definition at line 58 of file application.cpp.

◆ _signal_catching_io_ctx

std::optional<boost::asio::io_context> appbase::application_impl::_signal_catching_io_ctx

Definition at line 74 of file application.cpp.

◆ _signal_catching_thread

std::thread appbase::application_impl::_signal_catching_thread

Definition at line 73 of file application.cpp.

◆ _version

uint64_t appbase::application_impl::_version = 0

Definition at line 65 of file application.cpp.

◆ _version_str

std::string appbase::application_impl::_version_str = appbase_version_string

Definition at line 66 of file application.cpp.


The documentation for this class was generated from the following file: