version 3.3

serializationmacros.h File Reference

#include <vrs/config.h>

Go to the source code of this file.

Namespaces

namespace  VRS

Defines

#define VRS_SERIALIZABLE(SO_CLASS)
#define VRS_SERIALIZABLE_ABSTRACT_CLASS(ABSTRACT_SO_CLASS)   virtual void serialize(::VRS::SerializationManager& manager);
#define VRS_SERIALIZABLE_NO_SO_CLASS(NO_SO_CLASS)
#define VRS_SERIALIZABLE_ENUM(ENUM)
#define VRS_SERIALIZABLE_CLASS_ENUM(ENUM)
#define VRS_SERIALIZATION_REGISTRATION(A)
#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE(A)
#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE_2(A)
#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE_3(A)
#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE_4(A)
#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE_5(A)
#define VRS_SERIALIZATION_PARENT_CLASS(MANAGER, PARENT)
#define VRS_SERIALIZATION_START_CLASS(MANAGER, ATTRIBUTE_NAME, OBJECT)   MANAGER.startClass(typeid(OBJECT).name(), ATTRIBUTE_NAME)
#define VRS_SERIALIZATION_END_CLASS(MANAGER, ATTRIBUTE_NAME, OBJECT)   MANAGER.endClass(typeid(OBJECT).name(), ATTRIBUTE_NAME)


Define Documentation

#define VRS_SERIALIZABLE ( SO_CLASS   ) 

Value:

static ::VRS::SharedObj* newInstance() { return new SO_CLASS; } \
    virtual void serialize(::VRS::SerializationManager& manager); \
    virtual bool isRegisteredForSerialization() const { return isRegisteredForSerialization_; } \
    static const bool isRegisteredForSerialization_;

#define VRS_SERIALIZABLE_ABSTRACT_CLASS ( ABSTRACT_SO_CLASS   )     virtual void serialize(::VRS::SerializationManager& manager);

#define VRS_SERIALIZABLE_CLASS_ENUM ( ENUM   ) 

Value:

friend inline void \
    serialization( \
        ::VRS::SerializationManager& manager, \
        const std::string& attributeName, \
        ENUM& attributeValue \
    ) { \
        serialization(manager, attributeName, reinterpret_cast<int&>(attributeValue)); \
    }

#define VRS_SERIALIZABLE_ENUM ( ENUM   ) 

Value:

inline void \
    serialization( \
        ::VRS::SerializationManager& manager, \
        const std::string& attributeName, \
        ENUM& attributeValue \
    ) { \
        serialization(manager, attributeName, reinterpret_cast<int&>(attributeValue)); \
    }

#define VRS_SERIALIZABLE_NO_SO_CLASS ( NO_SO_CLASS   ) 

Value:

void serialize(::VRS::SerializationManager& manager); \
    friend void \
    serialization( \
        ::VRS::SerializationManager& manager, \
        const std::string& attributeName, \
        NO_SO_CLASS& object \
    ) { \
        VRS_SERIALIZATION_START_CLASS(manager, attributeName, object); \
        object.serialize(manager); \
        VRS_SERIALIZATION_END_CLASS(manager, attributeName, object); \
    }

#define VRS_SERIALIZATION_END_CLASS ( MANAGER,
ATTRIBUTE_NAME,
OBJECT   )     MANAGER.endClass(typeid(OBJECT).name(), ATTRIBUTE_NAME)

#define VRS_SERIALIZATION_PARENT_CLASS ( MANAGER,
PARENT   ) 

Value:

MANAGER.startParentClass(typeid(PARENT).name()); \
        if(MANAGER.isReading() || MANAGER.isWriting()) { \
        PARENT::serialize(MANAGER); \
    } else { \
            static const VRS::ID classID = VRS::ID(typeid(PARENT).name()); \
        if(MANAGER.isRegistered(classID) || (classID == typeid(::VRS::SharedObj).name()) ) { \
                        MANAGER.serializeParent(classID.text()); \
                } else { \
                        PARENT::serialize(MANAGER); \
                } \
        } \
        MANAGER.endParentClass(typeid(PARENT).name());

#define VRS_SERIALIZATION_REGISTRATION (  ) 

Value:

const bool A::isRegisteredForSerialization_ = \
        ::VRS::SerializationManager::registerClass(A::ClassNameVRS(), A::newInstance);

#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE (  ) 

Value:

template<class T> \
    const bool A<T>::isRegisteredForSerialization_ = \
        ::VRS::SerializationManager::registerClass(A<T>::ClassNameVRS(), A<T>::newInstance);

#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE_2 (  ) 

Value:

template<class T1, class T2> \
    const bool A<T1, T2>::isRegisteredForSerialization_ = \
        ::VRS::SerializationManager::registerClass(A<T1, T2>::ClassNameVRS(), A<T1, T2>::newInstance);

#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE_3 (  ) 

Value:

template<class T1, class T2, class T3> \
    const bool A<T1, T2, T3>::isRegisteredForSerialization_ = \
        ::VRS::SerializationManager::registerClass(A<T1, T2, T3>::ClassNameVRS(), A<T1, T2, T3>::newInstance);

#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE_4 (  ) 

Value:

template<class T1, class T2, class T3, class T4> \
    const bool A<T1, T2, T3, T4>::isRegisteredForSerialization_ = \
        ::VRS::SerializationManager::registerClass(A<T1, T2, T3, T4>::ClassNameVRS(), A<T1, T2, T3, T4>::newInstance);

#define VRS_SERIALIZATION_REGISTRATION_TEMPLATE_5 (  ) 

Value:

template<class T1, class T2, class T3, class T4, class T5> \
    const bool A<T1, T2, T3, T4, T5>::isRegisteredForSerialization_ = \
        ::VRS::SerializationManager::registerClass(A<T1, T2, T3, T4, T5>::ClassNameVRS(), A<T1, T2, T3, T4, T5>::newInstance);

#define VRS_SERIALIZATION_START_CLASS ( MANAGER,
ATTRIBUTE_NAME,
OBJECT   )     MANAGER.startClass(typeid(OBJECT).name(), ATTRIBUTE_NAME)


Generated on Sun May 19 06:00:30 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact