aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/machina')
-rw-r--r--src/engine/machina/Stateful.hpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/engine/machina/Stateful.hpp b/src/engine/machina/Stateful.hpp
index 1a72db5..8dbf23d 100644
--- a/src/engine/machina/Stateful.hpp
+++ b/src/engine/machina/Stateful.hpp
@@ -18,21 +18,28 @@
#ifndef MACHINA_STATEFUL_HPP
#define MACHINA_STATEFUL_HPP
+#include <stdint.h>
+
+#include "redlandmm/World.hpp"
#include "redlandmm/Model.hpp"
namespace Machina {
class Stateful {
public:
+ Stateful();
+
virtual ~Stateful() {}
virtual void write_state(Redland::Model& model) = 0;
- Redland::Node id() const { return _id; }
- void set_id(const Redland::Node& id) { _id = id; }
+ Redland::Node id(Redland::World& world) const;
+
+private:
+ static uint64_t _next_id;
-protected:
- Redland::Node _id;
+ uint64_t _id;
+ mutable Redland::Node _rdf_id;
};
} // namespace Machina