Started canvas component work, and moving to unique network pointers (build is broken)

This commit is contained in:
Yousef Khadadeh 2025-12-11 16:05:41 +03:00
parent d3d080620a
commit 5b5aef8369
33 changed files with 750 additions and 468 deletions

View file

@ -0,0 +1,20 @@
#pragma once
#include "../CoordSpaceHelper.hpp"
#include "CanvasComponent.hpp"
#include <Helpers/NetworkingObjects/NetObjManagerTypeList.hpp>
#include "../VersionConstants.hpp"
class CanvasComponentContainer {
public:
CanvasComponentContainer();
CanvasComponentContainer(CanvasComponent::CompType type);
static void register_class(NetworkingObjects::NetObjManagerTypeList& t);
void save_file(cereal::PortableBinaryOutputArchive& a) const;
void load_file(cereal::PortableBinaryInputArchive& a, VersionNumber version);
const std::unique_ptr<CanvasComponent>& get_comp();
const CoordSpaceHelper& get_coords();
private:
std::unique_ptr<CanvasComponent> allocate_comp(CanvasComponent::CompType type);
std::unique_ptr<CanvasComponent> comp;
CoordSpaceHelper coords;
};