15 void Register(T
object)
override {
16 m_objects.push_back(
object);
20 void Remove(T
object)
override {
23 m_objects.remove(
object);
27 T Get(
int index)
const override {
28 if (index < 0 || index > m_size || m_size < 1)
return nullptr;
29 auto iter = m_objects.begin();
30 std::advance(iter, index);
34 std::list<T> GetAll()
const override {
38 int GetID(T
object)
const override {
39 auto it = std::find(m_objects.begin(), m_objects.end(),
object);
40 if (it == m_objects.end())
43 return std::distance(m_objects.begin(), it);
46 int GetSize()
const override {
52 std::list<T> m_objects;