SerializeServer Class Reference
[Kernel Module]

#include <serializeserver.h>

Inheritance diagram for SerializeServer:

RootServer< SerializeServer > Root Server< SerializeServer > Object TreeNode< Root > Referenced Counted Serialized List< Root > ListNode< Root >

List of all members.

Detailed Description

Stores all serializers in one place. Serializers has to be created here.

Public Member Functions

 SerializeServer (const char *id)
virtual ~SerializeServer ()
bool SetDefaultFormat (const string &format)
const string & GetDefaultFormat ()
bool RegisterSerializer (const string &class_name, const string &format)
bool Serialize (Serialized *obj, const string &file_path)
SerializedDeserialize (const string &file_path, Serialized *obj=NULL)

Private Member Functions

long Serialize (Serialized *obj, byte_t *&buffer, const char *format=NULL)
SerializedDeserialize (const byte_t *buffer, long buff_size, Serialized *obj=NULL, const char *format=NULL)
SerializerNewSerializer (const char *format=NULL)
bool IsSerializer (const char *format=NULL)

Private Attributes

string default_format
 Name of default format.
string default_serializer
 Class name of default serializer used when format is not specified.
hash_map< string,
string > 
 Hash map of all registered serializers.

Constructor & Destructor Documentation

SerializeServer::SerializeServer ( const char *  id  ) 


SerializeServer::~SerializeServer (  )  [virtual]


Member Function Documentation

bool SerializeServer::SetDefaultFormat ( const string &  format  ) 

Sets default format. The serializer of this format will be used when format is not set explicitly.

format Identifier of serialize format.
True if serializer of specified format is found.

const string & SerializeServer::GetDefaultFormat (  )  [inline]

Returns defult format.

Default format.

bool SerializeServer::RegisterSerializer ( const string &  class_name,
const string &  format 

Registers serializer of given class. This serializer will be associated with specified format.

class_name Class name of serializer.
format Identifier of data format.
True if successful.

bool SerializeServer::Serialize ( Serialized obj,
const string &  file_path 

Serialized * SerializeServer::Deserialize ( const string &  file_path,
Serialized obj = NULL 

long SerializeServer::Serialize ( Serialized obj,
byte_t *&  buffer,
const char *  format = NULL 
) [private]

Serialized * SerializeServer::Deserialize ( const byte_t buffer,
long  buff_size,
Serialized obj = NULL,
const char *  format = NULL 
) [private]

Serializer * SerializeServer::NewSerializer ( const char *  format = NULL  )  [private]

Cerates new serializer of given class name. Each serializer is a NOH child of serialize server.

format Identifier of data format.
Pointer to new object.

bool SerializeServer::IsSerializer ( const char *  format = NULL  )  [private]

Member Data Documentation

string SerializeServer::default_format [private]

Name of default format.

string SerializeServer::default_serializer [private]

Class name of default serializer used when format is not specified.

hash_map<string, string> SerializeServer::serializers_map [private]

Hash map of all registered serializers.

The documentation for this class was generated from the following files:
Generated on Sat Oct 20 14:47:36 2007 for Dark Oberon by  doxygen 1.5.3