freesecs::secstwo::xml_serializer_t Class Reference

Serialiser from FREESECS internal representation to FREESECS-defined XML format XML generation is done using libxml2 library. More...

#include <secstwo_serialize.h>

Collaboration diagram for freesecs::secstwo::xml_serializer_t:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< pmsg_t > msg_container_t
 Message container type define.
typedef std::string data_container_t
 XML data type define.

Public Member Functions

 xml_serializer_t (pdata_item_t pitem)
 Ctor for data item serialization.
 xml_serializer_t (pmsg_t pmsg)
 Ctor for message serialization.
 ~xml_serializer_t ()
 Dtor.
const char * get ()
 Serialized data getter.

Static Public Member Functions

static int to_file (int fd, const msg_container_t &msg_container)
 Serialize a series of messages into a given file The function throws anexception is serialization goes wrong.
static int to_mem (data_container_t &container, const msg_container_t &msg_container)
 Serialize a series of messages into libstdc++ std::string The function throws anexception is serialization goes wrong.

Protected Member Functions

 xml_serializer_t (pdata_item_t, xmlTextWriter *)
 Protected ctor for iterative serialization into the same xml document.
 xml_serializer_t (pmsg_t, xmlTextWriter *)
 Protected ctor for iterative serialization into the same xml document.


Detailed Description

Serialiser from FREESECS internal representation to FREESECS-defined XML format XML generation is done using libxml2 library.

See also:
data_item_t

Definition at line 247 of file secstwo_serialize.h.


Constructor & Destructor Documentation

xml_serializer_t::xml_serializer_t ( pdata_item_t  pitem  ) 

Ctor for data item serialization.

Parameters:
pitem Data item to serialise. The ctor may throw an empty exception if serialization process goes wrong

Definition at line 604 of file secstwo_serialize.cpp.

xml_serializer_t::xml_serializer_t ( pmsg_t  pmsg  ) 

Ctor for message serialization.

Parameters:
pmsg Message to serialise. The ctor may throw an empty exception if serialization process goes wrong

Definition at line 642 of file secstwo_serialize.cpp.


Member Function Documentation

const char * xml_serializer_t::get (  ) 

Serialized data getter.

Returns:
Ptr to the c-string containing serialised data in XML format

Definition at line 686 of file secstwo_serialize.cpp.

int xml_serializer_t::to_file ( int  fd,
const msg_container_t msg_container 
) [static]

Serialize a series of messages into a given file The function throws anexception is serialization goes wrong.

Parameters:
fd File to store serialised data into.
msg_container Container with messages to serialize
Returns:
Operation status
Return values:
0 All have been serialized well

Definition at line 732 of file secstwo_serialize.cpp.

int xml_serializer_t::to_mem ( data_container_t container,
const msg_container_t msg_container 
) [static]

Serialize a series of messages into libstdc++ std::string The function throws anexception is serialization goes wrong.

Parameters:
container output libstdc++ std::string.
msg_container Container with messages to serialize
Returns:
Operation status
Return values:
0 All have been serialized well

Definition at line 741 of file secstwo_serialize.cpp.


The documentation for this class was generated from the following files:

Generated on Sun Jun 20 08:10:08 2010 for FREESECS secstwo by  doxygen 1.5.6