mace::_SerializeList< Value > Class Template Reference

#include <CollectionSerializers.h>

Inheritance diagram for mace::_SerializeList< Value >:

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

Collaboration graph
[legend]

List of all members.


Detailed Description

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

Generic class for serializing lists.

Lists are like arrays, but for a variable number of elements. Serialization proceeds by allocating the right number of elements, then using array serialization. It avoids clearing all elements, required by some other data structures (like sets).

Definition at line 116 of file CollectionSerializers.h.


Public Member Functions

virtual size_t size () const
 deserialization must be able to fix the number of elements
virtual void add (const Value &v)
 serialization needs to know the number of elements
void serialize (std::string &str) const
 serialize the size of the list, then use array serialization
int deserialize (std::istream &in) throw (SerializationException)
 deserialize and set the size of the list, then use array deserialization
int deserializeXML_RPC (std::istream &in) throw (SerializationException)
 Support array XML_RPC serialization by clearing all elements, then adding elements as they are read.

Member Function Documentation

template<typename Value>
virtual void mace::_SerializeList< Value >::add ( const Value &  v  )  [inline, virtual]

serialization needs to know the number of elements

XML_RPC cannot use efficient techniques, so will add elements as it reads them.

Definition at line 120 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