28 #ifndef WINTERMUTE_COLL_TEMPL_H 29 #define WINTERMUTE_COLL_TEMPL_H 31 #include "common/array.h" 32 #include "engines/wintermute/base/base_persistence_manager.h" 37 template<
typename TYPE>
41 int add(TYPE newElement) {
45 void remove_at(uint32 idx) {
48 void remove_at(uint32 idx, uint32 num) {
62 template <
typename TYPE>
67 if (persistMgr->getIsSaving()) {
69 persistMgr->transferSint32(
"ArraySize", &j);
73 persistMgr->transferPtr(
"", &obj);
77 persistMgr->transferSint32(
"ArraySize", &j);
78 for (
int i = 0; i < j; i++) {
80 persistMgr->transferPtr(
"", &obj);
93 if (persistMgr->getIsSaving()) {
95 persistMgr->transferSint32(
"ArraySize", &j);
99 persistMgr->transferCharPtr(
"", &obj);
103 persistMgr->transferSint32(
"ArraySize", &j);
104 for (
int i = 0; i < j; i++) {
105 char * obj =
nullptr;
106 persistMgr->transferCharPtr(
"", &obj);
119 if (persistMgr->getIsSaving()) {
121 persistMgr->transferSint32(
"ArraySize", &j);
124 const char * obj = *it;
125 persistMgr->transferConstChar(
"", &obj);
129 persistMgr->transferSint32(
"ArraySize", &j);
130 for (
int i = 0; i < j; i++) {
131 const char * obj =
nullptr;
132 persistMgr->transferConstChar(
"", &obj);
void insert_at(size_type idx, const T &element)
Definition: array.h:241
Definition: base_persistence_manager.h:55
void clear()
Definition: array.h:320
iterator end()
Definition: array.h:379
iterator begin()
Definition: array.h:374
void push_back(const T &element)
Definition: array.h:180
const T * const_iterator
Definition: array.h:55
Definition: coll_templ.h:38
size_type size() const
Definition: array.h:315
Definition: coll_templ.h:63
T remove_at(size_type idx)
Definition: array.h:260
Definition: achievements_tables.h:27