#include <CollectionSerializers.h>
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. |
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.