mace::_SerializeSet< Value > Class Template Reference

#include <CollectionSerializers.h>

Inheritance diagram for mace::_SerializeSet< Value >:

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

Collaboration graph
[legend]

List of all members.


Detailed Description

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

Generic class for serializing sets.

Sets are different from lists because there are no mutable iterators for sets. Deserialization must proceed by clearing elements then inserting new ones.

(a more efficient deserialization exists if the sets may be very similar to begin with, by reading in elements and only inserting if new, only removing if not in the serialized set. This could be pursued in the future.)

Definition at line 182 of file CollectionSerializers.h.


Public Member Functions

virtual void clear ()
 implementation should remove all elements from the set
virtual size_t size () const
 implementation should return the size of the set (for serialization purposes)
void serialize (std::string &str) const
 Serialize proceeds by serializing the size, and iterative over all elements serializing each one.
int deserialize (std::istream &in) throw (SerializationException)
 Deserialization proceeds by clearing the elements, deserializing the size, and reading that many elements.
int deserializeXML_RPC (std::istream &in) throw (SerializationException)
 XML_RPC (De)Serialization proceeds by array methods.
void serializeXML_RPC (std::string &str) const throw (SerializationException)
 XML_RPC (De)Serialization proceeds by array methods.

Protected Member Functions

virtual const_iteratorgetIterator () const
 implemented by the actual collection to return a _SerializeSet<Value>::const_iterator
virtual void add (const Value &v)
 implemented by the actual collection to add values to the set

Classes

class  const_iterator
 set serialization only requires const iteration, for serializing all the elements More...

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