From 7170c16a463fdb1f446ab7458270205bf08e7c89 Mon Sep 17 00:00:00 2001 From: ancarola Date: Tue, 22 Jan 2019 01:29:43 +0100 Subject: Signal change --- engine/include/object.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 engine/include/object.h (limited to 'engine/include/object.h') diff --git a/engine/include/object.h b/engine/include/object.h new file mode 100644 index 0000000..cb7ef36 --- /dev/null +++ b/engine/include/object.h @@ -0,0 +1,42 @@ +#pragma once + +#include +#include +#include +#include + +#include "types.h" + +namespace flat +{ + namespace core + { + class object; + } +} + +class flat::core::object +{ + std::string id; + + /* Common list of objects */ + static std::list 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& get_by_id(const std::string& id, std::vector&); + + static std::string random_id(uint8_t length = 8); +}; + -- cgit v1.2.1