Initial commit
This commit is contained in:
29
src/server/configuration.hpp
Normal file
29
src/server/configuration.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
class ServerConfiguration
|
||||
{
|
||||
private:
|
||||
std::string wwwRoot;
|
||||
std::string serverName;
|
||||
int port;
|
||||
bool isValid;
|
||||
|
||||
bool LoadFromFile(std::string const & filePath);
|
||||
|
||||
ServerConfiguration();
|
||||
~ServerConfiguration() = default;
|
||||
|
||||
public:
|
||||
int GetMajorVersion() const;
|
||||
int GetMinorVersion() const;
|
||||
std::string const & GetWwwRoot() const;
|
||||
std::string const & GetServerName() const;
|
||||
int GetPort() const;
|
||||
bool IsValid() const;
|
||||
|
||||
static ServerConfiguration const & GetInstance();
|
||||
|
||||
ServerConfiguration(ServerConfiguration & other) = delete;
|
||||
ServerConfiguration(ServerConfiguration && other) = delete;
|
||||
};
|
||||
Reference in New Issue
Block a user