| QxOrm 1.2.2 C++ Object Relational Mapping library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories

- File List
- File Members

QxSerialize_tuple.h
Go to the documentation of this file.

    00001 /****************************************************************************
    00002 **
    00003 ** http://www.qxorm.com/
    00004 ** http://sourceforge.net/projects/qxorm/
    00005 ** Original file by Lionel Marty
    00006 **
    00007 ** This file is part of the QxOrm library
    00008 **
    00009 ** This software is provided 'as-is', without any express or implied
    00010 ** warranty. In no event will the authors be held liable for any
    00011 ** damages arising from the use of this software.
    00012 **
    00013 ** GNU Lesser General Public License Usage
    00014 ** This file must be used under the terms of the GNU Lesser
    00015 ** General Public License version 2.1 as published by the Free Software
    00016 ** Foundation and appearing in the file 'license.lgpl.txt' included in the
    00017 ** packaging of this file.  Please review the following information to
    00018 ** ensure the GNU Lesser General Public License version 2.1 requirements
    00019 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    00020 **
    00021 ** If you have questions regarding the use of this file, please contact :
    00022 ** contact@qxorm.com
    00023 **
    00024 ****************************************************************************/
    00025
    00026 #ifndef _QX_SERIALIZE_BOOST_TUPLE_H_
    00027 #define _QX_SERIALIZE_BOOST_TUPLE_H_
    00028
    00029 #ifdef _MSC_VER
    00030 #pragma once
    00031 #endif
    00032
    00033 #include <boost/serialization/serialization.hpp>
    00034 #include <boost/serialization/split_free.hpp>
    00035 #include <boost/serialization/nvp.hpp>
    00036
    00037 #include <boost/tuple/tuple.hpp>
    00038 #include <boost/tuple/tuple_comparison.hpp>
    00039 #include <boost/tuple/tuple_io.hpp>
    00040
    00041 namespace boost {
    00042 namespace serialization {
    00043
    00044 template <class Archive, typename T0, typename T1>
    00045 inline void serialize(Archive & ar, boost::tuple<T0, T1> & t, const unsigned int file_version)
    00046 {
    00047    Q_UNUSED(file_version);
    00048    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00049    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00050 }
    00051
    00052 template <class Archive, typename T0, typename T1, typename T2>
    00053 inline void serialize(Archive & ar, boost::tuple<T0, T1, T2> & t, const unsigned int file_version)
    00054 {
    00055    Q_UNUSED(file_version);
    00056    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00057    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00058    ar & boost::serialization::make_nvp("tuple_3", boost::get<2>(t));
    00059 }
    00060
    00061 template <class Archive, typename T0, typename T1, typename T2, typename T3>
    00062 inline void serialize(Archive & ar, boost::tuple<T0, T1, T2, T3> & t, const unsigned int file_version)
    00063 {
    00064    Q_UNUSED(file_version);
    00065    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00066    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00067    ar & boost::serialization::make_nvp("tuple_3", boost::get<2>(t));
    00068    ar & boost::serialization::make_nvp("tuple_4", boost::get<3>(t));
    00069 }
    00070
    00071 template <class Archive, typename T0, typename T1, typename T2, typename T3, typename T4>
    00072 inline void serialize(Archive & ar, boost::tuple<T0, T1, T2, T3, T4> & t, const unsigned int file_version)
    00073 {
    00074    Q_UNUSED(file_version);
    00075    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00076    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00077    ar & boost::serialization::make_nvp("tuple_3", boost::get<2>(t));
    00078    ar & boost::serialization::make_nvp("tuple_4", boost::get<3>(t));
    00079    ar & boost::serialization::make_nvp("tuple_5", boost::get<4>(t));
    00080 }
    00081
    00082 template <class Archive, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
    00083 inline void serialize(Archive & ar, boost::tuple<T0, T1, T2, T3, T4, T5> & t, const unsigned int file_version)
    00084 {
    00085    Q_UNUSED(file_version);
    00086    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00087    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00088    ar & boost::serialization::make_nvp("tuple_3", boost::get<2>(t));
    00089    ar & boost::serialization::make_nvp("tuple_4", boost::get<3>(t));
    00090    ar & boost::serialization::make_nvp("tuple_5", boost::get<4>(t));
    00091    ar & boost::serialization::make_nvp("tuple_6", boost::get<5>(t));
    00092 }
    00093
    00094 template <class Archive, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
    00095 inline void serialize(Archive & ar, boost::tuple<T0, T1, T2, T3, T4, T5, T6> & t, const unsigned int file_version)
    00096 {
    00097    Q_UNUSED(file_version);
    00098    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00099    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00100    ar & boost::serialization::make_nvp("tuple_3", boost::get<2>(t));
    00101    ar & boost::serialization::make_nvp("tuple_4", boost::get<3>(t));
    00102    ar & boost::serialization::make_nvp("tuple_5", boost::get<4>(t));
    00103    ar & boost::serialization::make_nvp("tuple_6", boost::get<5>(t));
    00104    ar & boost::serialization::make_nvp("tuple_7", boost::get<6>(t));
    00105 }
    00106
    00107 template <class Archive, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
    00108 inline void serialize(Archive & ar, boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7> & t, const unsigned int file_version)
    00109 {
    00110    Q_UNUSED(file_version);
    00111    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00112    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00113    ar & boost::serialization::make_nvp("tuple_3", boost::get<2>(t));
    00114    ar & boost::serialization::make_nvp("tuple_4", boost::get<3>(t));
    00115    ar & boost::serialization::make_nvp("tuple_5", boost::get<4>(t));
    00116    ar & boost::serialization::make_nvp("tuple_6", boost::get<5>(t));
    00117    ar & boost::serialization::make_nvp("tuple_7", boost::get<6>(t));
    00118    ar & boost::serialization::make_nvp("tuple_8", boost::get<7>(t));
    00119 }
    00120
    00121 template <class Archive, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
    00122 inline void serialize(Archive & ar, boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> & t, const unsigned int file_version)
    00123 {
    00124    Q_UNUSED(file_version);
    00125    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00126    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00127    ar & boost::serialization::make_nvp("tuple_3", boost::get<2>(t));
    00128    ar & boost::serialization::make_nvp("tuple_4", boost::get<3>(t));
    00129    ar & boost::serialization::make_nvp("tuple_5", boost::get<4>(t));
    00130    ar & boost::serialization::make_nvp("tuple_6", boost::get<5>(t));
    00131    ar & boost::serialization::make_nvp("tuple_7", boost::get<6>(t));
    00132    ar & boost::serialization::make_nvp("tuple_8", boost::get<7>(t));
    00133    ar & boost::serialization::make_nvp("tuple_9", boost::get<8>(t));
    00134 }
    00135
    00136 template <class Archive, typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
    00137 inline void serialize(Archive & ar, boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> & t, const unsigned int file_version)
    00138 {
    00139    Q_UNUSED(file_version);
    00140    ar & boost::serialization::make_nvp("tuple_1", boost::get<0>(t));
    00141    ar & boost::serialization::make_nvp("tuple_2", boost::get<1>(t));
    00142    ar & boost::serialization::make_nvp("tuple_3", boost::get<2>(t));
    00143    ar & boost::serialization::make_nvp("tuple_4", boost::get<3>(t));
    00144    ar & boost::serialization::make_nvp("tuple_5", boost::get<4>(t));
    00145    ar & boost::serialization::make_nvp("tuple_6", boost::get<5>(t));
    00146    ar & boost::serialization::make_nvp("tuple_7", boost::get<6>(t));
    00147    ar & boost::serialization::make_nvp("tuple_8", boost::get<7>(t));
    00148    ar & boost::serialization::make_nvp("tuple_9", boost::get<8>(t));
    00149    ar & boost::serialization::make_nvp("tuple_10", boost::get<9>(t));
    00150 }
    00151
    00152 } // namespace boost
    00153 } // namespace serialization
    00154
    00155 #endif // _QX_SERIALIZE_BOOST_TUPLE_H_