mace::_SerializeArray< Value > Class Template Reference

#include <CollectionSerializers.h>

Inheritance diagram for mace::_SerializeArray< Value >:

Inheritance graph
[legend]
Collaboration diagram for mace::_SerializeArray< Value >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename Value>
class mace::_SerializeArray< Value >

Generic class for serializing arrays.

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 iteratorgetIterator ()
 virtual method implemented by actual collection to return a SerializeArray iterator.
virtual const_iteratorgetIterator () 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...

Member Function Documentation

template<typename Value>
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.

template<typename Value>
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.

template<typename Value>
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.


The documentation for this class was generated from the following file:

Generated on Sat Oct 4 21:30:37 2008 for Mace Library by  doxygen 1.5.5