Browse Source

Move ServerProperties classes into Feather::Config

To avoid future conflicts with block Property classes
main
Alpyne 2 years ago
parent
commit
6584a2c022
  1. 1
      src/DedicatedServer.cpp
  2. 9
      src/DedicatedServer.h
  3. 2
      src/Main.cpp
  4. 2
      src/config/Properties.cpp
  5. 2
      src/config/Properties.h
  6. 2
      src/config/Property.h
  7. 2
      src/config/ServerProperties.cpp
  8. 2
      src/config/ServerProperties.h

1
src/DedicatedServer.cpp

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

9
src/DedicatedServer.h

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

2
src/Main.cpp

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

2
src/config/Properties.cpp

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

2
src/config/Properties.h

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

2
src/config/Property.h

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

2
src/config/ServerProperties.cpp

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

2
src/config/ServerProperties.h

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

Loading…
Cancel
Save