Started canvas component work, and moving to unique network pointers (build is broken)
This commit is contained in:
parent
d3d080620a
commit
5b5aef8369
33 changed files with 750 additions and 468 deletions
20
src/CanvasComponents/CanvasComponentContainer.hpp
Normal file
20
src/CanvasComponents/CanvasComponentContainer.hpp
Normal 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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue