Completely removed MainServer code. All server code is now part of the program

This commit is contained in:
Yousef Khadadeh 2025-12-17 14:46:27 +03:00
parent 0b67c9cc46
commit 26d807ce87
31 changed files with 459 additions and 512 deletions

View file

@ -8,7 +8,6 @@
#include "GridModifyTool.hpp"
#include "../InputManager.hpp"
#include "../SharedTypes.hpp"
#include "../Server/CommandList.hpp"
#include <memory>
#include <optional>
#include <Helpers/ConvertVec.hpp>
@ -80,13 +79,6 @@ void DrawingProgram::parallel_loop_all_components(std::function<void(const Canva
parallel_loop_container(components->get_data(), func);
}
std::unordered_set<ServerClientID> DrawingProgram::get_used_resources() const {
std::unordered_set<ServerClientID> toRet;
//for(auto& c : components->get_data())
// c->obj->get_used_resources(toRet);
return toRet;
}
void DrawingProgram::erase_component_set(const std::unordered_set<CanvasComponentContainer::ObjInfoSharedPtr>& compsToErase) {
std::unordered_set<NetworkingObjects::NetObjID> idsToErase;
for(auto& c : compsToErase)

View file

@ -36,7 +36,6 @@ class DrawingProgram {
void add_file_to_canvas_by_path(const std::filesystem::path& filePath, Vector2f dropPos, bool addInSameThread);
void add_file_to_canvas_by_data(const std::string& fileName, std::string_view fileBuffer, Vector2f dropPos);
std::unordered_set<ServerClientID> get_used_resources() const;
void load_file(cereal::PortableBinaryInputArchive& a, VersionNumber version);
void save_file(cereal::PortableBinaryOutputArchive& a) const;
World& world;

View file

@ -1,6 +1,5 @@
#include "EyeDropperTool.hpp"
#include "DrawingProgram.hpp"
#include "../Server/CommandList.hpp"
#include "../MainProgram.hpp"
#include "../DrawData.hpp"
#include "DrawingProgramToolBase.hpp"

View file

@ -1,6 +1,5 @@
#include "ScreenshotTool.hpp"
#include "DrawingProgram.hpp"
#include "../Server/CommandList.hpp"
#include "../MainProgram.hpp"
#include "../DrawData.hpp"
#include "DrawingProgramToolBase.hpp"