Hyperspace::KeyValueSerializerPool Class Reference

A static pool of serializers to be used by Gates to serialize/deserialize Key/Value information. More...

#include <HyperspaceCore/KeyValueSerializerPool>

Static Public Member Functions

static void add (KeyValueSerializer *serializer)
 
static KeyValueSerializerserializer (const QByteArray &dataType)
 
static KeyValueSerializerdeserializer (const QByteArray &contentType)
 

Detailed Description

A static pool of serializers to be used by Gates to serialize/deserialize Key/Value information.

KeyValueSerializerPool contains all the serializers which should be used in a Global scope for all Gates of an application to deserialize and serialize data. Your application should add to its Pool all the serializers it wants to use.

See also
Hyperspace::KeyValueSerializer

Member Function Documentation

void Hyperspace::KeyValueSerializerPool::add ( KeyValueSerializer serializer)
static

Adds a serializer to the pool

Parameters
serializerThe serializer to add to the pool
KeyValueSerializer * Hyperspace::KeyValueSerializerPool::serializer ( const QByteArray &  dataType)
static

Request a serializer. If the serializer is not supported/implemented, a null pointer is returned

dataType The data type the serializer must return when serializing data

Returns
a pointer to the serializer requested with the "type" parameter.
KeyValueSerializer * Hyperspace::KeyValueSerializerPool::deserializer ( const QByteArray &  contentType)
static

Request a deserializer. If the deserializer is not supported/implemented, a null pointer is returned

contentType The content type the serializer must handle

Returns
a pointer to the serializer requested, or null if it doesn't exist in the pool.