|
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
7 #ifndef ELM_SERIAL2_COLLECTION_H
8 #define ELM_SERIAL2_COLLECTION_H
10 #include <elm/assert.h>
11 #include <elm/serial2/serial.h>
12 #include <elm/data/Vector.h>
14 namespace elm {
namespace serial2 {
18 template <
class C,
class T>
31 C &coll = *
static_cast<C *
>(object);
34 for (
int i = 0; i < cnt; i++) {
43 const C &coll = *
static_cast<const C *
>(object);
56 template <
class C,
class T>
67 for(
int i = 0; i < tab.
count(); i++) {
80 for(
int i = 0; i < cnt; i++) {
98 template <
template <
class I>
class Coll,
class T>
114 Coll<T> &coll = *
static_cast<Coll<T> *
>(object);
117 for (
int i = 0; i < cnt; i++) {
126 const Coll<T> &coll = *
static_cast<const Coll<T> *
>(object);
129 for (
typename Coll<T>::Iterator
iter(coll);
iter;
iter++) {
141 template <
template <
class I>
class Coll,
class T>
148 #endif // ELM_SERIAL2_COLLECTION_H
virtual void * instantiate(void)
Definition: collections.h:110
virtual void unserialize(Unserializer &unserializer, void *object) const
Definition: collections.h:30
void __unserialize(Unserializer &s, const ArrayField< T > &field)
Definition: ArrayField.h:62
Definition: util_WAHVector.cpp:157
static rtti::Type & type(const C &v)
Definition: collections.h:25
void iter(const C &c, const F &f)
Definition: util.h:95
static void serialize(Serializer &s, const Coll< T > &v)
Definition: collections.h:137
static void serialize(Serializer &s, const C &v)
Definition: collections.h:52
virtual void endCompound(void *)=0
virtual bool nextItem(void)=0
void __serialize(Serializer &s, const ArrayField< T > &field)
Definition: ArrayField.h:50
static CollecAC __type
Definition: collections.h:102
Definition: collections.h:99
Type(string name="")
Definition: rtti.cpp:299
virtual void beginCompound(const void *object)=0
static void unserialize(Unserializer &s, C &v)
Definition: collections.h:53
virtual void unserialize(Unserializer &unserializer, void *object)
Definition: collections.h:112
static rtti::Type & type(const Coll< T > &v)
Definition: collections.h:105
Definition: Serializer.h:36
static CollectionSerializer __type
Definition: collections.h:22
static void unserialize(Unserializer &s, Coll< T > &v)
Definition: collections.h:138
Definition: collections.h:19
Definition: collections.h:16
virtual void serialize(Serializer &serializer, const void *object)
Definition: collections.h:125
CollectionSerializer(void)
Definition: collections.h:27
virtual void onItem(void)=0
static rtti::Type & type(void)
Definition: collections.h:104
Definition: Unserializer.h:15
int count(void) const
Definition: Array.h:71
CollecAC()
Definition: collections.h:107
virtual void endCompound(const void *)=0
virtual bool beginCompound(void *)=0
virtual void serialize(Serializer &serializer, const void *object) const
Definition: collections.h:42
virtual int countItems(void)=0
virtual void * instantiate(void) const
Definition: collections.h:28