22 #ifndef QDENGINE_QDCORE_QD_OBJECT_LIST_CONTAINER_H 23 #define QDENGINE_QDCORE_QD_OBJECT_LIST_CONTAINER_H 25 #include "common/str.h" 26 #include "common/std/list.h" 39 const object_list_t &get_list()
const {
43 T *get_object(
const char *name);
44 const T *get_object(
const char *name)
const;
46 bool add_object(T *p);
47 bool remove_object(T *p);
48 bool rename_object(T *p,
const char *name);
49 bool remove_object(
const char *name);
50 bool is_in_list(
const char *name)
const {
51 return (get_object(name) != 0);
53 bool is_in_list(
const T *p)
const {
54 return (get_object(p->name()) != 0);
60 object_list_t _object_list;
65 if (get_object(p->name()))
return false;
73 if (!name)
return NULL;
76 if (!scumm_stricmp(name, (*it)->name()))
85 if (!name)
return NULL;
88 if (!scumm_stricmp(name, (*it)->name()))
99 _object_list.
erase(it);
109 T *p = get_object(name);
110 if (!p)
return false;
112 return remove_object(p);
135 _object_list.
clear();
142 #endif // QDENGINE_QDCORE_QD_OBJECT_LIST_CONTAINER_H
Definition: qd_object_list_container.h:32
iterator end()
Definition: list.h:240
Базовый класс для игровых ресурсов.
Definition: console.h:28
iterator begin()
Definition: list.h:227
void clear()
Definition: list.h:206
Definition: list_intern.h:48
Definition: list_intern.h:51
iterator erase(iterator pos)
Definition: list.h:95
void push_back(const t_T &element)
Definition: list.h:140