#include <CollectionSerializers.h>
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_iterator * | getIterator () 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... |