| QxOrm 1.4.2 C++ Object Relational Mapping library

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

- File List
- File Members

QxSerializeQDataStream_std_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 #ifdef _QX_CPP_11_TUPLE
    00033 #ifndef BOOST_NO_CXX11_HDR_TUPLE
    00034 #ifndef _QX_SERIALIZE_QDATASTREAM_STD_TUPLE_H_
    00035 #define _QX_SERIALIZE_QDATASTREAM_STD_TUPLE_H_
    00036
    00037 #ifdef _MSC_VER
    00038 #pragma once
    00039 #endif
    00040
    00048 #include <QtCore/qdatastream.h>
    00049
    00050 #include <tuple>
    00051
    00052 template <typename T0, typename T1>
    00053 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1> & t)
    00054 {
    00055    stream << std::get<0>(t);
    00056    stream << std::get<1>(t);
    00057    return stream;
    00058 }
    00059
    00060 template <typename T0, typename T1, typename T2>
    00061 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1, T2> & t)
    00062 {
    00063    stream << std::get<0>(t);
    00064    stream << std::get<1>(t);
    00065    stream << std::get<2>(t);
    00066    return stream;
    00067 }
    00068
    00069 template <typename T0, typename T1, typename T2, typename T3>
    00070 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1, T2, T3> & t)
    00071 {
    00072    stream << std::get<0>(t);
    00073    stream << std::get<1>(t);
    00074    stream << std::get<2>(t);
    00075    stream << std::get<3>(t);
    00076    return stream;
    00077 }
    00078
    00079 template <typename T0, typename T1, typename T2, typename T3, typename T4>
    00080 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1, T2, T3, T4> & t)
    00081 {
    00082    stream << std::get<0>(t);
    00083    stream << std::get<1>(t);
    00084    stream << std::get<2>(t);
    00085    stream << std::get<3>(t);
    00086    stream << std::get<4>(t);
    00087    return stream;
    00088 }
    00089
    00090 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
    00091 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1, T2, T3, T4, T5> & t)
    00092 {
    00093    stream << std::get<0>(t);
    00094    stream << std::get<1>(t);
    00095    stream << std::get<2>(t);
    00096    stream << std::get<3>(t);
    00097    stream << std::get<4>(t);
    00098    stream << std::get<5>(t);
    00099    return stream;
    00100 }
    00101
    00102 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
    00103 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1, T2, T3, T4, T5, T6> & t)
    00104 {
    00105    stream << std::get<0>(t);
    00106    stream << std::get<1>(t);
    00107    stream << std::get<2>(t);
    00108    stream << std::get<3>(t);
    00109    stream << std::get<4>(t);
    00110    stream << std::get<5>(t);
    00111    stream << std::get<6>(t);
    00112    return stream;
    00113 }
    00114
    00115 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
    00116 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1, T2, T3, T4, T5, T6, T7> & t)
    00117 {
    00118    stream << std::get<0>(t);
    00119    stream << std::get<1>(t);
    00120    stream << std::get<2>(t);
    00121    stream << std::get<3>(t);
    00122    stream << std::get<4>(t);
    00123    stream << std::get<5>(t);
    00124    stream << std::get<6>(t);
    00125    stream << std::get<7>(t);
    00126    return stream;
    00127 }
    00128
    00129 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
    00130 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> & t)
    00131 {
    00132    stream << std::get<0>(t);
    00133    stream << std::get<1>(t);
    00134    stream << std::get<2>(t);
    00135    stream << std::get<3>(t);
    00136    stream << std::get<4>(t);
    00137    stream << std::get<5>(t);
    00138    stream << std::get<6>(t);
    00139    stream << std::get<7>(t);
    00140    stream << std::get<8>(t);
    00141    return stream;
    00142 }
    00143
    00144 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
    00145 QDataStream & operator<< (QDataStream & stream, const std::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> & t)
    00146 {
    00147    stream << std::get<0>(t);
    00148    stream << std::get<1>(t);
    00149    stream << std::get<2>(t);
    00150    stream << std::get<3>(t);
    00151    stream << std::get<4>(t);
    00152    stream << std::get<5>(t);
    00153    stream << std::get<6>(t);
    00154    stream << std::get<7>(t);
    00155    stream << std::get<8>(t);
    00156    stream << std::get<9>(t);
    00157    return stream;
    00158 }
    00159
    00160 template <typename T0, typename T1>
    00161 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1> & t)
    00162 {
    00163    stream >> std::get<0>(t);
    00164    stream >> std::get<1>(t);
    00165    return stream;
    00166 }
    00167
    00168 template <typename T0, typename T1, typename T2>
    00169 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1, T2> & t)
    00170 {
    00171    stream >> std::get<0>(t);
    00172    stream >> std::get<1>(t);
    00173    stream >> std::get<2>(t);
    00174    return stream;
    00175 }
    00176
    00177 template <typename T0, typename T1, typename T2, typename T3>
    00178 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1, T2, T3> & t)
    00179 {
    00180    stream >> std::get<0>(t);
    00181    stream >> std::get<1>(t);
    00182    stream >> std::get<2>(t);
    00183    stream >> std::get<3>(t);
    00184    return stream;
    00185 }
    00186
    00187 template <typename T0, typename T1, typename T2, typename T3, typename T4>
    00188 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1, T2, T3, T4> & t)
    00189 {
    00190    stream >> std::get<0>(t);
    00191    stream >> std::get<1>(t);
    00192    stream >> std::get<2>(t);
    00193    stream >> std::get<3>(t);
    00194    stream >> std::get<4>(t);
    00195    return stream;
    00196 }
    00197
    00198 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
    00199 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1, T2, T3, T4, T5> & t)
    00200 {
    00201    stream >> std::get<0>(t);
    00202    stream >> std::get<1>(t);
    00203    stream >> std::get<2>(t);
    00204    stream >> std::get<3>(t);
    00205    stream >> std::get<4>(t);
    00206    stream >> std::get<5>(t);
    00207    return stream;
    00208 }
    00209
    00210 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
    00211 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1, T2, T3, T4, T5, T6> & t)
    00212 {
    00213    stream >> std::get<0>(t);
    00214    stream >> std::get<1>(t);
    00215    stream >> std::get<2>(t);
    00216    stream >> std::get<3>(t);
    00217    stream >> std::get<4>(t);
    00218    stream >> std::get<5>(t);
    00219    stream >> std::get<6>(t);
    00220    return stream;
    00221 }
    00222
    00223 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
    00224 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1, T2, T3, T4, T5, T6, T7> & t)
    00225 {
    00226    stream >> std::get<0>(t);
    00227    stream >> std::get<1>(t);
    00228    stream >> std::get<2>(t);
    00229    stream >> std::get<3>(t);
    00230    stream >> std::get<4>(t);
    00231    stream >> std::get<5>(t);
    00232    stream >> std::get<6>(t);
    00233    stream >> std::get<7>(t);
    00234    return stream;
    00235 }
    00236
    00237 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
    00238 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> & t)
    00239 {
    00240    stream >> std::get<0>(t);
    00241    stream >> std::get<1>(t);
    00242    stream >> std::get<2>(t);
    00243    stream >> std::get<3>(t);
    00244    stream >> std::get<4>(t);
    00245    stream >> std::get<5>(t);
    00246    stream >> std::get<6>(t);
    00247    stream >> std::get<7>(t);
    00248    stream >> std::get<8>(t);
    00249    return stream;
    00250 }
    00251
    00252 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
    00253 QDataStream & operator>> (QDataStream & stream, std::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> & t)
    00254 {
    00255    stream >> std::get<0>(t);
    00256    stream >> std::get<1>(t);
    00257    stream >> std::get<2>(t);
    00258    stream >> std::get<3>(t);
    00259    stream >> std::get<4>(t);
    00260    stream >> std::get<5>(t);
    00261    stream >> std::get<6>(t);
    00262    stream >> std::get<7>(t);
    00263    stream >> std::get<8>(t);
    00264    stream >> std::get<9>(t);
    00265    return stream;
    00266 }
    00267
    00268 #endif // _QX_SERIALIZE_QDATASTREAM_STD_TUPLE_H_
    00269 #endif // BOOST_NO_CXX11_HDR_TUPLE
    00270 #endif // _QX_CPP_11_TUPLE