summaryrefslogtreecommitdiffstats
path: root/engine/include/object.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'engine/include/object.hpp')
-rw-r--r--engine/include/object.hpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/engine/include/object.hpp b/engine/include/object.hpp
new file mode 100644
index 0000000..cb7ef36
--- /dev/null
+++ b/engine/include/object.hpp
@@ -0,0 +1,42 @@
+#pragma once
+
+#include <list>
+#include <vector>
+#include <string>
+#include <initializer_list>
+
+#include "types.h"
+
+namespace flat
+{
+ namespace core
+ {
+ class object;
+ }
+}
+
+class flat::core::object
+{
+ std::string id;
+
+ /* Common list of objects */
+ static std::list<object*> all_objects;
+
+public:
+
+ object();
+ ~object();
+
+ void set_id(const std::string&);
+
+ const std::string& get_id() const;
+
+ /* Static accessors to allObject */
+
+ static bool is_allocated(object*);
+
+ static std::vector<object*>& get_by_id(const std::string& id, std::vector<object*>&);
+
+ static std::string random_id(uint8_t length = 8);
+};
+