//****************************************************************************** // RCF - Remote Call Framework // Copyright (c) 2005 - 2007. All rights reserved. // Consult your license for conditions of use. // Developed by Jarl Lindrud. // Contact: jlindrud@hotmail.com . //****************************************************************************** #ifndef INCLUDE_SF_SERIALIZEPARENT_HPP #define INCLUDE_SF_SERIALIZEPARENT_HPP #include namespace SF { class Archive; } #ifdef RCF_USE_SF_SERIALIZATION #include #include template void serializeParentImpl(Base *, Archive &ar, Derived &derived, boost::mpl::true_ *) { SF::SerializerPolymorphic::instantiate(); ar & SF::Archive::PARENT & static_cast(derived); } #endif #ifdef RCF_USE_BOOST_SERIALIZATION #include template void serializeParentImpl(Base *, Archive &ar, Derived &derived, boost::mpl::false_ *) { ar & boost::serialization::base_object(derived); } #endif template void serializeParent(Base *, Archive &ar, Derived &derived) { typedef typename boost::is_same::type type; serializeParentImpl( (Base*) 0, ar, derived, (type*) 0); } #if !defined(_MSC_VER) || _MSC_VER >= 1310 template void serializeParent(Archive &ar, Derived &derived) { serializeParent( (Base *) 0, ar, derived); } #endif #endif // ! INCLUDE_SF_SERIALIZEPARENT_HPP