tobicore  7.0.0
 All Classes Functions Variables Typedefs Enumerator Friends Groups Pages
TCSerializer Class Reference

Serializer interface for TCBlock. More...

#include <tobicore/TCSerializer.hpp>

+ Collaboration diagram for TCSerializer:

Public Member Functions

 TCSerializer (void)
 Constructor.
 TCSerializer (TCBlock *const block)
 Constructor.
virtual ~TCSerializer (void)
 Destructor.
TCSerializerSetMessage (TCBlock *const block)
 Sets the associated ICMessage.
virtual std::string * Serialize (std::string *buffer)=0
 Serializes to std::string.
virtual std::string * Deserialize (std::string *const buffer)=0
 Deserializes from std::string.
virtual std::string SerializeCp (void)
 Serializes to std::string.
virtual void DeserializeCp (const std::string &buffer)
 Deserializes from std::string.
virtual char * SerializeCh (char *buffer, const unsigned int bsize)
 Serializes to a char array.
virtual const char * DeserializeCh (const char *buffer, const unsigned int bsize)
 Deserializes from a char array.

Protected Attributes

TCBlock_message
 Pointer to the associated TCBlock.

Detailed Description

Serializer interface for TCBlock.

Exactly like ICSerializer or IDSerializer

See Also
ICSerializer, IDSerializer

Definition at line 32 of file TCSerializer.hpp.

Constructor & Destructor Documentation

TCSerializer::TCSerializer ( TCBlock *const  block)

Constructor.

  • block TCBlock to serialize/deserialize

Definition at line 30 of file TCSerializer.cpp.

Member Function Documentation

virtual std::string* TCSerializer::Deserialize ( std::string *const  buffer)
pure virtual

Deserializes from std::string.

  • buffer Pointer to the std::string that contains the result of a serialization and that will be used for the deserialization
    Returns
    A pointer to the buffer instance
const char * TCSerializer::DeserializeCh ( const char *  buffer,
const unsigned int  bsize 
)
virtual

Deserializes from a char array.

  • buffer Pointer to a char array that contains a serialized ICMessage and that will be used for deserialization
  • bsize Size of the char array

Definition at line 68 of file TCSerializer.cpp.

void TCSerializer::DeserializeCp ( const std::string &  buffer)
virtual

Deserializes from std::string.

  • buffer std::string that contains the result of a serialization and that will be used for the deserialization

Definition at line 49 of file TCSerializer.cpp.

virtual std::string* TCSerializer::Serialize ( std::string *  buffer)
pure virtual

Serializes to std::string.

  • buffer Pointer to the std::string that will contain the result of the serialization
    Returns
    Pointer to the buffer instance
char * TCSerializer::SerializeCh ( char *  buffer,
const unsigned int  bsize 
)
virtual

Serializes to a char array.

  • buffer Pointer to a char array that will contain the result of the serialization
  • bsize Size of the char array

Definition at line 54 of file TCSerializer.cpp.

std::string TCSerializer::SerializeCp ( void  )
virtual

Serializes to std::string.

Returns
std::string that contains the result of the serialization

Definition at line 43 of file TCSerializer.cpp.

TCSerializer * TCSerializer::SetMessage ( TCBlock *const  block)

Sets the associated ICMessage.

  • block TCBlock to serialize/deserialize
    Returns
    Pointer to the serializer instance

Definition at line 38 of file TCSerializer.cpp.

Member Data Documentation

TCBlock* TCSerializer::_message
protected

Pointer to the associated TCBlock.

Each TCSerializer has an associated TCBlock.

Definition at line 103 of file TCSerializer.hpp.


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