VR-Forces 4.0.4 Class Documentation
include/makArchives/DtSerialize.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtSerialize.h,v $ $Revision: 1.7 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00012 #ifndef DtSerialize_H_
00013 #define DtSerialize_H_
00014 
00015 
00017 //
00022 //
00024 //
00027 //
00034 //
00037 //
00040 //
00042 //
00047 //
00054 //
00057 //
00068 //
00069 //
00080 //
00083 //
00093 
00094 
00095 #include <boost/preprocessor/stringize.hpp>
00096 #include <boost/serialization/nvp.hpp>
00097 
00098 class portable_binary_oarchive;
00099 class portable_binary_iarchive;
00100 
00101 namespace boost
00102 {
00103    namespace archive
00104    {
00105       class xml_oarchive;
00106       class xml_iarchive;
00107       class binary_oarchive;
00108       class binary_iarchive;
00109       class text_oarchive;
00110       class text_iarchive;
00111    }
00112    namespace serialization
00113    {
00114       class access;     
00115    }
00116 }
00117 
00119 #define DT_DECLARE_serialize_FUNCTIONS\
00120    friend class boost::serialization::access;\
00121    void serialize(boost::archive::xml_oarchive&, const unsigned int version = 0);\
00122    void serialize(boost::archive::xml_iarchive&, const unsigned int version = 0);\
00123    void serialize(boost::archive::binary_oarchive&, const unsigned int version = 0);\
00124    void serialize(boost::archive::binary_iarchive&, const unsigned int version = 0);\
00125    void serialize(boost::archive::text_oarchive&, const unsigned int version = 0);\
00126    void serialize(boost::archive::text_iarchive&, const unsigned int version = 0);
00127 
00128 #define DT_DECLARE_PORTABLE_serialize_FUNCTIONS\
00129    friend class boost::serialization::access;\
00130    void serialize(portable_binary_oarchive&, const unsigned int version = 0);\
00131    void serialize(portable_binary_iarchive&, const unsigned int version = 0);
00132 
00133 #define DT_DECLARE_ALL_serialize_FUNCTIONS\
00134    friend class boost::serialization::access;\
00135    void serialize(boost::archive::xml_oarchive&, const unsigned int version = 0);\
00136    void serialize(boost::archive::xml_iarchive&, const unsigned int version = 0);\
00137    void serialize(boost::archive::binary_oarchive&, const unsigned int version = 0);\
00138    void serialize(boost::archive::binary_iarchive&, const unsigned int version = 0);\
00139    void serialize(boost::archive::text_oarchive&, const unsigned int version = 0);\
00140    void serialize(boost::archive::text_iarchive&, const unsigned int version = 0);\
00141    void serialize(portable_binary_oarchive&, const unsigned int version = 0);\
00142    void serialize(portable_binary_iarchive&, const unsigned int version = 0);
00143    
00144 
00146 #define DT_SERIALIZE(NAME)\
00147    boost::serialization::make_nvp(BOOST_PP_STRINGIZE(NAME),NAME)
00148 
00152 #define DT_SERIALIZE_REMOVE_PREFIX(NAME,PREFIX_SIZE)\
00153    boost::serialization::make_nvp(BOOST_PP_STRINGIZE(NAME) + PREFIX_SIZE,NAME)
00154 
00157 #define DT_SERIALIZE_MEMBER(NAME) DT_SERIALIZE_REMOVE_PREFIX(NAME,2)
00158 
00160 #define DT_SERIALIZE_BASE(BASE_CLASS) BOOST_SERIALIZATION_BASE_OBJECT_NVP(BASE_CLASS)
00161 
00162 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)