From 0bbbaf7ab314a5b51cdd57e1483488e24ea08ddc Mon Sep 17 00:00:00 2001 From: Reinder Feenstra Date: Mon, 21 Feb 2022 12:12:43 +0100 Subject: [PATCH] moved traintastic and settings class to seperate folder --- server/CMakeLists.txt | 2 ++ server/src/core/client.cpp | 4 ++-- server/src/core/idobject.cpp | 4 ++-- server/src/core/session.cpp | 4 ++-- server/src/main.cpp | 4 ++-- server/src/os/windows/trayicon.cpp | 4 ++-- server/src/{core => traintastic}/settings.cpp | 4 ++-- server/src/{core => traintastic}/settings.hpp | 10 +++++----- server/src/{core => traintastic}/traintastic.cpp | 9 ++++----- server/src/{core => traintastic}/traintastic.hpp | 12 ++++++------ server/src/world/world.cpp | 4 ++-- server/src/world/worldlist.cpp | 4 ++-- 12 files changed, 33 insertions(+), 32 deletions(-) rename server/src/{core => traintastic}/settings.cpp (98%) rename server/src/{core => traintastic}/settings.hpp (92%) rename server/src/{core => traintastic}/traintastic.cpp (98%) rename server/src/{core => traintastic}/traintastic.hpp (92%) diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 6d84a027..96f91f7e 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -127,6 +127,8 @@ file(GLOB SOURCES "src/log/*.cpp" "src/train/*.hpp" "src/train/*.cpp" + "src/traintastic/*.hpp" + "src/traintastic/*.cpp" "src/vehicle/*.hpp" "src/vehicle/*.cpp" "src/vehicle/rail/*.hpp" diff --git a/server/src/core/client.cpp b/server/src/core/client.cpp index c9e4a20a..5e535bf9 100644 --- a/server/src/core/client.cpp +++ b/server/src/core/client.cpp @@ -3,7 +3,7 @@ * * This file is part of the traintastic source code. * - * Copyright (C) 2019-2021 Reinder Feenstra + * Copyright (C) 2019-2022 Reinder Feenstra * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,7 +23,7 @@ #include "client.hpp" //#include "console.hpp" //#include "objectregistry.hpp" -#include "traintastic.hpp" +#include "../traintastic/traintastic.hpp" #include "eventloop.hpp" #include "session.hpp" #include "../log/log.hpp" diff --git a/server/src/core/idobject.cpp b/server/src/core/idobject.cpp index e29c53ea..b7fe6316 100644 --- a/server/src/core/idobject.cpp +++ b/server/src/core/idobject.cpp @@ -1,7 +1,7 @@ /** * Traintastic * - * Copyright (C) 2019-2021 Reinder Feenstra + * Copyright (C) 2019-2022 Reinder Feenstra * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,7 +19,7 @@ */ #include "idobject.hpp" -#include "traintastic.hpp" +#include "../traintastic/traintastic.hpp" #include "../world/getworld.hpp" #include "attributes.hpp" #include "../utils/displayname.hpp" diff --git a/server/src/core/session.cpp b/server/src/core/session.cpp index 82393c15..5f739173 100644 --- a/server/src/core/session.cpp +++ b/server/src/core/session.cpp @@ -23,7 +23,7 @@ #include "session.hpp" #include #include -#include "traintastic.hpp" +#include "../traintastic/traintastic.hpp" #include "client.hpp" #include "abstractproperty.hpp" #include "abstractunitproperty.hpp" @@ -47,7 +47,7 @@ -#include "settings.hpp" +#include "../traintastic/settings.hpp" #include "../hardware/decoder/decoderlist.hpp" diff --git a/server/src/main.cpp b/server/src/main.cpp index c945ca09..8662df14 100644 --- a/server/src/main.cpp +++ b/server/src/main.cpp @@ -3,7 +3,7 @@ * * This file is part of the traintastic source code. * - * Copyright (C) 2019-2021 Reinder Feenstra + * Copyright (C) 2019-2022 Reinder Feenstra * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -26,7 +26,7 @@ #endif #include "options.hpp" #include "core/eventloop.hpp" -#include "core/traintastic.hpp" +#include "traintastic/traintastic.hpp" #include "log/log.hpp" #include #include diff --git a/server/src/os/windows/trayicon.cpp b/server/src/os/windows/trayicon.cpp index b943a0f6..a31a6984 100644 --- a/server/src/os/windows/trayicon.cpp +++ b/server/src/os/windows/trayicon.cpp @@ -3,7 +3,7 @@ * * This file is part of the traintastic source code. * - * Copyright (C) 2021 Reinder Feenstra + * Copyright (C) 2021-2022 Reinder Feenstra * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,7 +23,7 @@ #include "trayicon.hpp" #include #include "../../core/eventloop.hpp" -#include "../../core/traintastic.hpp" +#include "../../traintastic/traintastic.hpp" namespace Windows { diff --git a/server/src/core/settings.cpp b/server/src/traintastic/settings.cpp similarity index 98% rename from server/src/core/settings.cpp rename to server/src/traintastic/settings.cpp index 28c050c0..659f8eac 100644 --- a/server/src/core/settings.cpp +++ b/server/src/traintastic/settings.cpp @@ -1,5 +1,5 @@ /** - * server/src/core/settings.cpp + * server/src/traintastic/settings.cpp * * This file is part of the traintastic source code. * @@ -23,7 +23,7 @@ #include "settings.hpp" #include #include -#include "attributes.hpp" +#include "../core/attributes.hpp" #include "traintastic.hpp" #include "../log/log.hpp" #include "../utils/category.hpp" diff --git a/server/src/core/settings.hpp b/server/src/traintastic/settings.hpp similarity index 92% rename from server/src/core/settings.hpp rename to server/src/traintastic/settings.hpp index 3a0a2b75..64ca1562 100644 --- a/server/src/core/settings.hpp +++ b/server/src/traintastic/settings.hpp @@ -1,5 +1,5 @@ /** - * server/src/core/settings.hpp + * server/src/traintastic/settings.hpp * * This file is part of the traintastic source code. * @@ -20,12 +20,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef TRAINTASTIC_SERVER_CORE_SETTINGS_HPP -#define TRAINTASTIC_SERVER_CORE_SETTINGS_HPP +#ifndef TRAINTASTIC_SERVER_TRAINTASTIC_SETTINGS_HPP +#define TRAINTASTIC_SERVER_TRAINTASTIC_SETTINGS_HPP -#include "object.hpp" +#include "../core/object.hpp" #include -#include "property.hpp" +#include "../core/property.hpp" class Settings : public Object { diff --git a/server/src/core/traintastic.cpp b/server/src/traintastic/traintastic.cpp similarity index 98% rename from server/src/core/traintastic.cpp rename to server/src/traintastic/traintastic.cpp index 58bebfa9..405212cd 100644 --- a/server/src/core/traintastic.cpp +++ b/server/src/traintastic/traintastic.cpp @@ -1,5 +1,5 @@ /** - * server/src/core/traintastic.cpp + * server/src/traintastic/traintastic.cpp * * This file is part of the traintastic source code. * @@ -28,10 +28,9 @@ #include #include #include -#include "eventloop.hpp" -#include "settings.hpp" -#include "client.hpp" -#include "attributes.hpp" +#include "../core/eventloop.hpp" +#include "../core/client.hpp" +#include "../core/attributes.hpp" #include "../world/world.hpp" #include "../world/worldlist.hpp" #include "../world/worldloader.hpp" diff --git a/server/src/core/traintastic.hpp b/server/src/traintastic/traintastic.hpp similarity index 92% rename from server/src/core/traintastic.hpp rename to server/src/traintastic/traintastic.hpp index 082bd600..d038193b 100644 --- a/server/src/core/traintastic.hpp +++ b/server/src/traintastic/traintastic.hpp @@ -1,5 +1,5 @@ /** - * server/src/core/traintastic.hpp + * server/src/traintastic/traintastic.hpp * * This file is part of the traintastic source code. * @@ -20,17 +20,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef TRAINTASTIC_SERVER_CORE_TRAINTASTIC_HPP -#define TRAINTASTIC_SERVER_CORE_TRAINTASTIC_HPP +#ifndef TRAINTASTIC_SERVER_TRAINTASTIC_TRAINTASTIC_HPP +#define TRAINTASTIC_SERVER_TRAINTASTIC_TRAINTASTIC_HPP #include #include #include #include #include -#include "object.hpp" -#include "objectproperty.hpp" -#include "method.hpp" +#include "../core/object.hpp" +#include "../core/objectproperty.hpp" +#include "../core/method.hpp" #include "settings.hpp" #include "../world/world.hpp" #include "../world/worldlist.hpp" diff --git a/server/src/world/world.cpp b/server/src/world/world.cpp index 3b12ebac..ee1cddba 100644 --- a/server/src/world/world.cpp +++ b/server/src/world/world.cpp @@ -28,13 +28,13 @@ #include #include #include "worldsaver.hpp" -#include "../core/traintastic.hpp" +#include "../traintastic/traintastic.hpp" #include "../core/objectlisttablemodel.hpp" #include "../core/attributes.hpp" #include "../core/abstractvectorproperty.hpp" #include "../log/log.hpp" #include "../utils/displayname.hpp" -#include "../core/traintastic.hpp" +#include "../traintastic/traintastic.hpp" using nlohmann::json; diff --git a/server/src/world/worldlist.cpp b/server/src/world/worldlist.cpp index 320c8fc9..9ae197bc 100644 --- a/server/src/world/worldlist.cpp +++ b/server/src/world/worldlist.cpp @@ -3,7 +3,7 @@ * * This file is part of the traintastic source code. * - * Copyright (C) 2019-2020 Reinder Feenstra + * Copyright (C) 2019-2020,2022 Reinder Feenstra * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,7 +23,7 @@ #include "worldlist.hpp" #include #include -#include "../core/traintastic.hpp" +#include "../traintastic/traintastic.hpp" #include "../log/log.hpp" #include "worldlisttablemodel.hpp" #include "ctwreader.hpp"