Move ServerProperties classes into Feather::Config

To avoid future conflicts with block Property classes
This commit is contained in:
Alpyne 2020-11-06 17:18:39 -08:00
parent ddf9a7fa20
commit 6584a2c022
8 changed files with 11 additions and 11 deletions

View File

@ -8,6 +8,7 @@
#include <string> #include <string>
using std::string; using std::string;
using Feather::Config::ServerProperties;
namespace Feather namespace Feather
{ {

View File

@ -2,6 +2,8 @@
#include "MinecraftClient.h" #include "MinecraftClient.h"
#include "ServerStatus.h" #include "ServerStatus.h"
#include "config/ServerProperties.h"
#include "protocol/Protocol.h" #include "protocol/Protocol.h"
#include "PacketReader.h" #include "PacketReader.h"
//#include "JobManager.h" //#include "JobManager.h"
@ -10,15 +12,12 @@
#include "network/IListenerInterface.h" #include "network/IListenerInterface.h"
namespace Feather namespace Feather
{ {
class ServerProperties;
class DedicatedServer final : public Network::IListenerInterface class DedicatedServer final : public Network::IListenerInterface
{ {
public: public:
DedicatedServer(ServerProperties* properties); DedicatedServer(Config::ServerProperties* properties);
~DedicatedServer(); ~DedicatedServer();
void OnClientConnect(Network::TCPClientHandle&& client) override; void OnClientConnect(Network::TCPClientHandle&& client) override;
@ -32,7 +31,7 @@ namespace Feather
void HandleUnknownPacket(MinecraftClient& client, int32_t id, const PacketReader& packet); void HandleUnknownPacket(MinecraftClient& client, int32_t id, const PacketReader& packet);
private: private:
ServerProperties* m_properties; Config::ServerProperties* m_properties;
Network::TCPListener m_listener; Network::TCPListener m_listener;
ServerStatus m_status; ServerStatus m_status;

View File

@ -4,7 +4,7 @@
#include "DedicatedServer.h" #include "DedicatedServer.h"
using namespace Feather; using namespace Feather;
using Feather::Config::ServerProperties;
int main() int main()
{ {

View File

@ -4,7 +4,7 @@
static const string STRING_TRUE("true"); static const string STRING_TRUE("true");
static const string STRING_FALSE("false"); static const string STRING_FALSE("false");
namespace Feather namespace Feather::Config
{ {
template <> template <>
string Properties::Get<string>(string_view key) string Properties::Get<string>(string_view key)

View File

@ -9,7 +9,7 @@ using std::string;
using std::string_view; using std::string_view;
using std::unordered_map; using std::unordered_map;
namespace Feather namespace Feather::Config
{ {
class Properties class Properties
{ {

View File

@ -13,7 +13,7 @@ using std::string;
using std::string_view; using std::string_view;
using std::unordered_map; using std::unordered_map;
namespace Feather namespace Feather::Config
{ {
template <typename T> template <typename T>

View File

@ -10,7 +10,7 @@
#include "../util/StringUtil.h" #include "../util/StringUtil.h"
namespace Feather namespace Feather::Config
{ {
void ServerProperties::Load() void ServerProperties::Load()
{ {

View File

@ -13,7 +13,7 @@ using std::string;
using std::string_view; using std::string_view;
using std::unordered_map; using std::unordered_map;
namespace Feather namespace Feather::Config
{ {
class ServerProperties : public Properties class ServerProperties : public Properties
{ {