#include <CollectionSerializers.h>
Arrays have known and fixed sizes with preallocated elements, which can and should be taken advantage of during serialization.
Definition at line 20 of file CollectionSerializers.h.
Public Member Functions | |
void | serialize (std::string &str) const |
implement serialization by iterating over all elements and serializing them. | |
int | deserialize (std::istream &in) throw (SerializationException) |
implement deserialization by iterator over (the fixed number of) elements and deserializing them. | |
int | deserializeXML_RPC (std::istream &in) throw (SerializationException) |
Support array deserialization of XML_RPC using. | |
void | serializeXML_RPC (std::string &str) const throw (SerializationException) |
Support array serialization using. | |
Protected Member Functions | |
virtual iterator * | getIterator () |
virtual method implemented by actual collection to return a SerializeArray iterator. | |
virtual const_iterator * | getIterator () const |
virtual method implemented by actual collection to return a SerializeArray const_iterator. | |
Classes | |
class | const_iterator |
SerializeArray must be able to iterate over the elements in a const fashion for serialization. More... | |
class | iterator |
SerializeArray must be able to iterate over elements for deserialization. More... |
void mace::_SerializeArray< Value >::serialize | ( | std::string & | str | ) | const [inline, virtual] |
implement serialization by iterating over all elements and serializing them.
Since an array has fixed size, no extra work is needed, since the deserialization should read the same number of elements.
Implements mace::Serializable.
Reimplemented in mace::_SerializeList< Value >, mace::_SerializeList< pthread_t >, and mace::_SerializeList< uint64_t >.
Definition at line 49 of file CollectionSerializers.h.
int mace::_SerializeArray< Value >::deserializeXML_RPC | ( | std::istream & | in | ) | throw (SerializationException) [inline, virtual] |
Support array deserialization of XML_RPC using.
<array><data></data>...</array>
Reimplemented from mace::Serializable.
Reimplemented in mace::_SerializeList< Value >, mace::_SerializeList< pthread_t >, and mace::_SerializeList< uint64_t >.
Definition at line 67 of file CollectionSerializers.h.
void mace::_SerializeArray< Value >::serializeXML_RPC | ( | std::string & | str | ) | const throw (SerializationException) [inline, virtual] |
Support array serialization using.
<array><data></data>...</array>
Reimplemented from mace::Serializable.
Definition at line 88 of file CollectionSerializers.h.