summaryrefslogtreecommitdiff
path: root/assetFactory/object.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-02-21 01:25:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-02-21 01:25:34 +0000
commited7c2a6a73f24f97a0f04c2e6be6862ffe54b585 (patch)
tree810350a653292d54621b7c4e72275bcd48dc6785 /assetFactory/object.h
parentAdd missing override (diff)
downloadilt-ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585.tar.bz2
ilt-ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585.tar.xz
ilt-ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585.zip
Support for loading objects, uses and model factories from an XML resource
Diffstat (limited to 'assetFactory/object.h')
-rw-r--r--assetFactory/object.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/assetFactory/object.h b/assetFactory/object.h
index da28c1f..1069f66 100644
--- a/assetFactory/object.h
+++ b/assetFactory/object.h
@@ -1,15 +1,26 @@
#pragma once
+#include "persistence.h"
#include "shape.h"
#include "stdTypeDefs.hpp"
#include "use.h"
-class Object : public StdTypeDefs<Object>, public Shape {
+class Object : public StdTypeDefs<Object>, public Shape, public Persistence::Persistable {
public:
+ Object() = default;
Object(std::string i);
CreatedFaces createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) const override;
Use::Collection uses;
std::string id;
+
+private:
+ friend Persistence::SelectionPtrBase<std::shared_ptr<Object>, true>;
+ bool persist(Persistence::PersistenceStore & store) override;
+ std::string
+ getId() const override
+ {
+ return id;
+ };
};