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