blob: cb7ef36b452999715b1127a191c03b1b8275edc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
};
|