33 explicit ServerConfig(
char const *fpath,
bool perform_fs_checks =
true);
40 explicit ServerConfig(std::string
const &content,
bool perform_fs_checks =
true);
73 void build(std::string
const &content,
bool perform_fs_checks);
Represents a single 'server' block from the configuration file.
Definition ServerBlock.hpp:22
A strongly-typed data container for a server block's configuration.
Definition ServerConfig.hpp:22
void addServer(ServerBlock const &server)
Adds a ServerBlock to the configuration.
Definition ServerConfig.cpp:68
ServerBlock const * getServer(int port, http::Request const &req) const
Retrieves the server configuration that best matches a port and server name.
Definition ServerConfig.cpp:44
void build(std::string const &content, bool perform_fs_checks)
Definition ServerConfig.cpp:31
ServerBlockMap const & getServersMap() const
Gets read-only access to the map of server blocks.
Definition ServerConfig.cpp:42
ServerBlockMap servers_
Map of server blocks, keyed by port number.
Definition ServerConfig.hpp:75
ServerConfig()
Definition ServerConfig.cpp:16
Definition Request.hpp:66
Definition ArgumentFactory.hpp:5
std::ostream & operator<<(std::ostream &o, Token const &t)
Definition Token.cpp:29
std::map< int, ServerBlockVec > ServerBlockMap
Definition ServerConfig.hpp:12
Definition IArgument.hpp:5