Horizon Official Technical Documentation
general_server_configuration Struct Reference

#include <ServerConfiguration.hpp>

Public Member Functions

int get_test_run () const
 
void set_test_run (test_run_type type)
 
void unset_test_run (test_run_type type)
 
bool is_test_run () const
 
bool is_test_run_minimal () const
 
bool is_test_run_with_network () const
 
const boost::filesystem::path & get_config_file_path () const
 
void set_config_file_path (const boost::filesystem::path &path)
 
int get_shutdown_signal () const
 
void set_shutdown_signal (int shutdown_signal)
 
const std::string & get_listen_ip () const
 
void set_listen_ip (const std::string &listen_ip)
 
uint16_t get_listen_port () const
 
void set_listen_port (uint16_t listen_port)
 
const std::string & get_db_host () const
 
void set_db_host (std::string &&host)
 
const std::string & get_db_user () const
 
void set_db_user (std::string &&user)
 
const std::string & get_db_pass () const
 
void set_db_pass (std::string &&pass)
 
const std::string & get_db_database () const
 
void set_db_database (std::string &&database)
 
const uint16_t & get_db_port () const
 
void set_db_port (uint16_t port)
 
const uint8_t & get_db_threads () const
 
void set_db_threads (uint8_t threads)
 

Public Attributes

int _test_run {TEST_RUN_NONE}
 
boost::filesystem::path _config_file_path {""}
 
int shutdown_signal
 Shutdown signal. More...
 
std::string _listen_ip
 Listen IP. More...
 
uint16_t _listen_port
 Listen Port Number. More...
 
std::string _db_host
 
std::string _db_user
 
std::string _db_pass
 
std::string _db_database
 
uint16_t _db_port {3306}
 
uint8_t _db_threads {5}
 

Member Function Documentation

◆ get_config_file_path()

const boost::filesystem::path & general_server_configuration::get_config_file_path ( ) const
inline
55{ return _config_file_path; }
boost::filesystem::path _config_file_path
Definition: ServerConfiguration.hpp:87

References _config_file_path.

Referenced by Horizon::Auth::AuthServer::clicmd_reload_config(), Horizon::Auth::AuthServer::read_config(), Horizon::Char::CharServer::read_config(), and Horizon::Zone::ZoneServer::read_config().

+ Here is the caller graph for this function:

◆ get_db_database()

const std::string & general_server_configuration::get_db_database ( ) const
inline
78{ return _db_database; }
std::string _db_database
Definition: ServerConfiguration.hpp:94

References _db_database.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ get_db_host()

const std::string & general_server_configuration::get_db_host ( ) const
inline
69{ return _db_host; }
std::string _db_host
Definition: ServerConfiguration.hpp:94

References _db_host.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ get_db_pass()

const std::string & general_server_configuration::get_db_pass ( ) const
inline
75{ return _db_pass; }
std::string _db_pass
Definition: ServerConfiguration.hpp:94

References _db_pass.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ get_db_port()

const uint16_t & general_server_configuration::get_db_port ( ) const
inline
81{ return _db_port; }
uint16_t _db_port
Definition: ServerConfiguration.hpp:95

References _db_port.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ get_db_threads()

const uint8_t & general_server_configuration::get_db_threads ( ) const
inline
84{ return _db_threads; }
uint8_t _db_threads
Definition: ServerConfiguration.hpp:96

References _db_threads.

◆ get_db_user()

const std::string & general_server_configuration::get_db_user ( ) const
inline
72{ return _db_user; }
std::string _db_user
Definition: ServerConfiguration.hpp:94

References _db_user.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ get_listen_ip()

const std::string & general_server_configuration::get_listen_ip ( ) const
inline
61{ return _listen_ip; }
std::string _listen_ip
Listen IP.
Definition: ServerConfiguration.hpp:91

References _listen_ip.

◆ get_listen_port()

uint16_t general_server_configuration::get_listen_port ( ) const
inline
64{ return _listen_port; }
uint16_t _listen_port
Listen Port Number.
Definition: ServerConfiguration.hpp:92

References _listen_port.

◆ get_shutdown_signal()

int general_server_configuration::get_shutdown_signal ( ) const
inline
58{ return shutdown_signal; }
int shutdown_signal
Shutdown signal.
Definition: ServerConfiguration.hpp:89

References shutdown_signal.

◆ get_test_run()

int general_server_configuration::get_test_run ( ) const
inline
46{ return _test_run; }
int _test_run
Definition: ServerConfiguration.hpp:67

References _test_run.

◆ is_test_run()

bool general_server_configuration::is_test_run ( ) const
inline
50{ return _test_run > 0; }

References _test_run.

◆ is_test_run_minimal()

bool general_server_configuration::is_test_run_minimal ( ) const
inline
51{ return (_test_run&TEST_RUN_MINIMAL) == TEST_RUN_MINIMAL ? true : false; }
@ TEST_RUN_MINIMAL
Definition: ServerConfiguration.hpp:40

References _test_run, and TEST_RUN_MINIMAL.

◆ is_test_run_with_network()

bool general_server_configuration::is_test_run_with_network ( ) const
inline
52{ return (_test_run&TEST_RUN_WITH_NETWORK) == TEST_RUN_WITH_NETWORK ? true : false; }
@ TEST_RUN_WITH_NETWORK
Definition: ServerConfiguration.hpp:41

References _test_run, and TEST_RUN_WITH_NETWORK.

◆ set_config_file_path()

void general_server_configuration::set_config_file_path ( const boost::filesystem::path &  path)
inline
56{ _config_file_path = path; }

References _config_file_path.

Referenced by Server::parse_exec_args().

+ Here is the caller graph for this function:

◆ set_db_database()

void general_server_configuration::set_db_database ( std::string &&  database)
inline
79{ _db_database = database; }

References _db_database.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ set_db_host()

void general_server_configuration::set_db_host ( std::string &&  host)
inline
70{ _db_host = host; }

References _db_host.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ set_db_pass()

void general_server_configuration::set_db_pass ( std::string &&  pass)
inline
76{ _db_pass = pass; }

References _db_pass.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ set_db_port()

void general_server_configuration::set_db_port ( uint16_t  port)
inline
82{ _db_port = port; }

References _db_port.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ set_db_threads()

void general_server_configuration::set_db_threads ( uint8_t  threads)
inline
85{ _db_threads = threads; }

References _db_threads.

◆ set_db_user()

void general_server_configuration::set_db_user ( std::string &&  user)
inline
73{ _db_user = user; }

References _db_user.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ set_listen_ip()

void general_server_configuration::set_listen_ip ( const std::string &  listen_ip)
inline
62{ _listen_ip = listen_ip; }

References _listen_ip.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ set_listen_port()

void general_server_configuration::set_listen_port ( uint16_t  listen_port)
inline
65{ _listen_port = listen_port; }

References _listen_port.

Referenced by Server::parse_common_configs().

+ Here is the caller graph for this function:

◆ set_shutdown_signal()

void general_server_configuration::set_shutdown_signal ( int  shutdown_signal)
inline

References shutdown_signal.

◆ set_test_run()

void general_server_configuration::set_test_run ( test_run_type  type)
inline
47{ this->_test_run |= (int) type; }

References _test_run.

Referenced by Server::parse_exec_args().

+ Here is the caller graph for this function:

◆ unset_test_run()

void general_server_configuration::unset_test_run ( test_run_type  type)
inline
48{ this->_test_run &= ~((int) type); }

References _test_run.

Member Data Documentation

◆ _config_file_path

boost::filesystem::path general_server_configuration::_config_file_path {""}

◆ _db_database

std::string general_server_configuration::_db_database

Referenced by get_db_database(), and set_db_database().

◆ _db_host

std::string general_server_configuration::_db_host

Referenced by get_db_host(), and set_db_host().

◆ _db_pass

std::string general_server_configuration::_db_pass

Referenced by get_db_pass(), and set_db_pass().

◆ _db_port

uint16_t general_server_configuration::_db_port {3306}

Referenced by get_db_port(), and set_db_port().

◆ _db_threads

uint8_t general_server_configuration::_db_threads {5}

Referenced by get_db_threads(), and set_db_threads().

◆ _db_user

std::string general_server_configuration::_db_user

Referenced by get_db_user(), and set_db_user().

◆ _listen_ip

std::string general_server_configuration::_listen_ip

Listen IP.

Referenced by get_listen_ip(), and set_listen_ip().

◆ _listen_port

uint16_t general_server_configuration::_listen_port

Listen Port Number.

Referenced by get_listen_port(), and set_listen_port().

◆ _test_run

int general_server_configuration::_test_run {TEST_RUN_NONE}

◆ shutdown_signal

int general_server_configuration::shutdown_signal

Shutdown signal.

Referenced by get_shutdown_signal(), and set_shutdown_signal().


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