source/ariba/utility/serialization/Serialization.hpp File Reference

#include "../internal/Utilities.hpp"
#include <typeinfo>
#include <iostream>
#include "Data.hpp"
#include "Data.hpp"

Include dependency graph for Serialization.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  internal

Classes

class  SERIALIZATION_CLASS_NAME< __Y, __V >
class  Serializeable
class  VSerializeable
class  ExplicitSerializer

Defines

#define SERIALIZATION_NS   ariba::utility::serialization
#define SERIALIZATION_NS_INT   SERIALIZATION_NS::internal
#define SERIALIZATION_NS_BEGIN()   namespace ariba { namespace utility { namespace serialization {
#define SERIALIZATION_NS_END()   }}}
#define SERIALIZATION_METHOD_NAME   __mSerialization
#define SERIALIZATION_CLASS_NAME   __cSerialization
#define USING_SERIALIZATION   using namespace SERIALIZATION_NS;
#define using_serialization   USING_SERIALIZATION;
#define SERIALIZATION_USE_INTERNAL_NS
#define ISERIALIZATION_METHOD_BEGIN(Buffer, Const)
#define RSERIALIZATION_METHOD_BEGIN(Buffer)   ISERIALIZATION_METHOD_BEGIN( Buffer, )
#define SERIALIZATION_METHOD_BEGIN(Buffer)   ISERIALIZATION_METHOD_BEGIN( Buffer, const )
#define SERIALIZATION_METHOD_END()   __ok = true; } while (false); return __ok; }
#define sznMethodBegin(Buffer)   SERIALIZATION_METHOD_BEGIN( Buffer )
#define sznMethodEnd()   SERIALIZATION_METHOD_END()
#define SERIALIZEABLE
#define sznStub   SERIALIZEABLE
#define SERIALIZATION_BEGIN(Class, Variant, Buffer)
#define SERIALIZATION_END()   SERIALIZATION_METHOD_END() };
#define sznBegin(Class, Variant, Buffer)   SERIALIZATION_BEGIN( Class, Variant, Buffer )
#define sznBeginDefault(Class, Buffer)   SERIALIZATION_BEGIN( Class, DEFAULT_V, Buffer )
#define sznEnd()   SERIALIZATION_END()
#define VSERIALIZEABLE
#define VSERIALIZATION_BEGIN(Class)
#define VSERIALIZATION_END()   } return 0; }
#define VSERIALIZATION_REG(__variant)
#define VSERIALIZATION_DEFAULT(Class)
#define vsznStub   VSERIALIZEABLE
#define vsznBegin(Class)   VSERIALIZAION_BEGIN( Class )
#define vsznEnd()   VSERIALIZATION_END()
#define vsznRegister(Variant)   VSERIALIZATION_REG( Variant )
#define vsznDefault(Class)   VSERIALIZATION_DEFAULT( Class )
#define sznImplBegin(Class)   VSERIALIZAION_BEGIN( Class )
#define sznImplDefault(Class)   VSERIALIZATION_DEFAULT( Class )

Enumerations

enum  Mode { UNDEFINED = 0, SERIALIZE = 1, DESERIALIZE = 2, MEASURE = 3 }

Functions

template<int V, typename Y>
static finline
SERIALIZATION_CLASS_NAME< Y, V > & 
get_serializer (Y &obj)

Variables

const int DEFAULT_V = 0
const int STRING_V = 1


Define Documentation

#define ISERIALIZATION_METHOD_BEGIN ( Buffer,
Const   ) 

Value:

public: template<typename __X>  \
        finline bool SERIALIZATION_METHOD_NAME( __X& Buffer ) Const { \
        SERIALIZATION_USE_INTERNAL_NS \
        bool __ok = false; do {

Definition at line 101 of file Serialization.hpp.

#define RSERIALIZATION_METHOD_BEGIN ( Buffer   )     ISERIALIZATION_METHOD_BEGIN( Buffer, )

Definition at line 107 of file Serialization.hpp.

#define SERIALIZATION_BEGIN ( Class,
Variant,
Buffer   ) 

Value:

template<> \
        class SERIALIZATION_CLASS_NAME \
                <Class, SERIALIZATION_NS::Variant> : Class { \
        RSERIALIZATION_METHOD_BEGIN( Buffer )

Definition at line 128 of file Serialization.hpp.

#define SERIALIZATION_CLASS_NAME   __cSerialization

Definition at line 61 of file Serialization.hpp.

 
#define SERIALIZATION_END (  )     SERIALIZATION_METHOD_END() };

Definition at line 134 of file Serialization.hpp.

#define SERIALIZATION_METHOD_BEGIN ( Buffer   )     ISERIALIZATION_METHOD_BEGIN( Buffer, const )

Definition at line 110 of file Serialization.hpp.

 
#define SERIALIZATION_METHOD_END (  )     __ok = true; } while (false); return __ok; }

Definition at line 113 of file Serialization.hpp.

#define SERIALIZATION_METHOD_NAME   __mSerialization

#define SERIALIZATION_NS   ariba::utility::serialization

Definition at line 46 of file Serialization.hpp.

 
#define SERIALIZATION_NS_BEGIN (  )     namespace ariba { namespace utility { namespace serialization {

Definition at line 51 of file Serialization.hpp.

 
#define SERIALIZATION_NS_END (  )     }}}

Definition at line 54 of file Serialization.hpp.

#define SERIALIZATION_NS_INT   SERIALIZATION_NS::internal

Definition at line 47 of file Serialization.hpp.

#define SERIALIZATION_USE_INTERNAL_NS

Value:

using namespace SERIALIZATION_NS_INT; \
        using namespace SERIALIZATION_NS;

Definition at line 96 of file Serialization.hpp.

#define SERIALIZEABLE

Value:

public: template<typename __Y,int __V> \
        friend class ::SERIALIZATION_CLASS_NAME;

Definition at line 121 of file Serialization.hpp.

#define sznBegin ( Class,
Variant,
Buffer   )     SERIALIZATION_BEGIN( Class, Variant, Buffer )

Definition at line 138 of file Serialization.hpp.

#define sznBeginDefault ( Class,
Buffer   )     SERIALIZATION_BEGIN( Class, DEFAULT_V, Buffer )

Definition at line 140 of file Serialization.hpp.

 
#define sznEnd (  )     SERIALIZATION_END()

Definition at line 142 of file Serialization.hpp.

#define sznImplBegin ( Class   )     VSERIALIZAION_BEGIN( Class )

Definition at line 194 of file Serialization.hpp.

#define sznImplDefault ( Class   )     VSERIALIZATION_DEFAULT( Class )

Definition at line 195 of file Serialization.hpp.

#define sznMethodBegin ( Buffer   )     SERIALIZATION_METHOD_BEGIN( Buffer )

Definition at line 117 of file Serialization.hpp.

 
#define sznMethodEnd (  )     SERIALIZATION_METHOD_END()

Definition at line 118 of file Serialization.hpp.

#define sznStub   SERIALIZEABLE

Definition at line 125 of file Serialization.hpp.

#define using_serialization   USING_SERIALIZATION;

Definition at line 66 of file Serialization.hpp.

Referenced by operator<<().

#define USING_SERIALIZATION   using namespace SERIALIZATION_NS;

Definition at line 65 of file Serialization.hpp.

#define VSERIALIZATION_BEGIN ( Class   ) 

Value:

size_t Class::SERIALIZATION_METHOD_NAME( \
                SERIALIZATION_NS::Mode __mode, \
                Data& __data, \
                int __variant \
        ) { \
        USING_SERIALIZATION; \
        SERIALIZATION_USE_INTERNAL_NS; \
        switch (__variant) {

Definition at line 153 of file Serialization.hpp.

#define VSERIALIZATION_DEFAULT ( Class   ) 

 
#define VSERIALIZATION_END (  )     } return 0; }

Definition at line 163 of file Serialization.hpp.

#define VSERIALIZATION_REG ( __variant   ) 

Value:

case __variant: \
        switch (__mode) { \
        case SERIALIZE: \
        __data = data_serialize_v<__variant>(*this); \
        return __data.getLength(); \
        case DESERIALIZE: \
        return data_deserialize_v<__variant>(*this, __data); \
        case MEASURE: \
        return data_length_v<__variant>(*this); \
        case UNDEFINED: \
        return 0; \
        } break;

Definition at line 166 of file Serialization.hpp.

#define VSERIALIZEABLE

Value:

SERIALIZEABLE \
        virtual size_t SERIALIZATION_METHOD_NAME( \
                SERIALIZATION_NS::Mode __mode, \
                Data& __data, \
                int __variant = SERIALIZATION_NS::DEFAULT_V \
        );

Definition at line 145 of file Serialization.hpp.

#define vsznBegin ( Class   )     VSERIALIZAION_BEGIN( Class )

Definition at line 188 of file Serialization.hpp.

#define vsznDefault ( Class   )     VSERIALIZATION_DEFAULT( Class )

Definition at line 191 of file Serialization.hpp.

 
#define vsznEnd (  )     VSERIALIZATION_END()

Definition at line 189 of file Serialization.hpp.

#define vsznRegister ( Variant   )     VSERIALIZATION_REG( Variant )

Definition at line 190 of file Serialization.hpp.

#define vsznStub   VSERIALIZEABLE

Definition at line 187 of file Serialization.hpp.


Enumeration Type Documentation

enum Mode

Enumerator:
UNDEFINED 
SERIALIZE 
DESERIALIZE 
MEASURE 

Definition at line 84 of file Serialization.hpp.


Function Documentation

template<int V, typename Y>
static finline SERIALIZATION_CLASS_NAME<Y, V>& get_serializer ( Y &  obj  )  [inline, static]

TODO: doc

Definition at line 262 of file Serialization.hpp.


Variable Documentation

const int DEFAULT_V = 0

Definition at line 80 of file Serialization.hpp.

const int STRING_V = 1

Definition at line 81 of file Serialization.hpp.


Generated on Wed May 27 18:23:23 2009 for Ariba by  doxygen 1.5.6