| QxOrm 1.4.3 C++ Object Relational Mapping library

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

- File List
- File Members

is_container.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_IS_CONTAINER_H_
    00033 #define _QX_IS_CONTAINER_H_
    00034
    00035 #ifdef _MSC_VER
    00036 #pragma once
    00037 #endif
    00038
    00046 #include <boost/mpl/if.hpp>
    00047 #include <boost/mpl/or.hpp>
    00048 #include <boost/mpl/logical.hpp>
    00049
    00050 #include <QxTraits/is_boost_unordered_map.h>
    00051 #include <QxTraits/is_boost_unordered_set.h>
    00052 #include <QxTraits/is_qt_hash.h>
    00053 #include <QxTraits/is_qt_linked_list.h>
    00054 #include <QxTraits/is_qt_list.h>
    00055 #include <QxTraits/is_qt_map.h>
    00056 #include <QxTraits/is_qt_multi_hash.h>
    00057 #include <QxTraits/is_qt_multi_map.h>
    00058 #include <QxTraits/is_qt_set.h>
    00059 #include <QxTraits/is_qt_vector.h>
    00060 #include <QxTraits/is_qx_collection.h>
    00061 #include <QxTraits/is_std_list.h>
    00062 #include <QxTraits/is_std_map.h>
    00063 #include <QxTraits/is_std_set.h>
    00064 #include <QxTraits/is_std_vector.h>
    00065 #include <QxTraits/is_std_unordered_map.h>
    00066 #include <QxTraits/is_std_unordered_set.h>
    00067
    00068 #include <QxCollection/QxCollection.h>
    00069
    00070 namespace qx {
    00071 namespace trait {
    00072
    00077 template <typename T>
    00078 struct is_container : public boost::mpl::false_ { ; };
    00079
    00080 template <typename Key, typename Value>
    00081 struct is_container< boost::unordered_map<Key, Value> > : public boost::mpl::true_ { ; };
    00082
    00083 template <typename Key, typename Value>
    00084 struct is_container< boost::unordered_map<Key, Value> & > : public boost::mpl::true_ { ; };
    00085
    00086 template <typename Key, typename Value>
    00087 struct is_container< const boost::unordered_map<Key, Value> > : public boost::mpl::true_ { ; };
    00088
    00089 template <typename Key, typename Value>
    00090 struct is_container< const boost::unordered_map<Key, Value> & > : public boost::mpl::true_ { ; };
    00091
    00092 template <typename Key, typename Value>
    00093 struct is_container< boost::unordered_multimap<Key, Value> > : public boost::mpl::true_ { ; };
    00094
    00095 template <typename Key, typename Value>
    00096 struct is_container< boost::unordered_multimap<Key, Value> & > : public boost::mpl::true_ { ; };
    00097
    00098 template <typename Key, typename Value>
    00099 struct is_container< const boost::unordered_multimap<Key, Value> > : public boost::mpl::true_ { ; };
    00100
    00101 template <typename Key, typename Value>
    00102 struct is_container< const boost::unordered_multimap<Key, Value> & > : public boost::mpl::true_ { ; };
    00103
    00104 template <typename T>
    00105 struct is_container< boost::unordered_set<T> > : public boost::mpl::true_ { ; };
    00106
    00107 template <typename T>
    00108 struct is_container< boost::unordered_set<T> & > : public boost::mpl::true_ { ; };
    00109
    00110 template <typename T>
    00111 struct is_container< const boost::unordered_set<T> > : public boost::mpl::true_ { ; };
    00112
    00113 template <typename T>
    00114 struct is_container< const boost::unordered_set<T> & > : public boost::mpl::true_ { ; };
    00115
    00116 template <typename T>
    00117 struct is_container< boost::unordered_multiset<T> > : public boost::mpl::true_ { ; };
    00118
    00119 template <typename T>
    00120 struct is_container< boost::unordered_multiset<T> & > : public boost::mpl::true_ { ; };
    00121
    00122 template <typename T>
    00123 struct is_container< const boost::unordered_multiset<T> > : public boost::mpl::true_ { ; };
    00124
    00125 template <typename T>
    00126 struct is_container< const boost::unordered_multiset<T> & > : public boost::mpl::true_ { ; };
    00127
    00128 template <typename Key, typename Value>
    00129 struct is_container< QHash<Key, Value> > : public boost::mpl::true_ { ; };
    00130
    00131 template <typename Key, typename Value>
    00132 struct is_container< QHash<Key, Value> & > : public boost::mpl::true_ { ; };
    00133
    00134 template <typename Key, typename Value>
    00135 struct is_container< const QHash<Key, Value> > : public boost::mpl::true_ { ; };
    00136
    00137 template <typename Key, typename Value>
    00138 struct is_container< const QHash<Key, Value> & > : public boost::mpl::true_ { ; };
    00139
    00140 template <typename T>
    00141 struct is_container< QLinkedList<T> > : public boost::mpl::true_ { ; };
    00142
    00143 template <typename T>
    00144 struct is_container< QLinkedList<T> & > : public boost::mpl::true_ { ; };
    00145
    00146 template <typename T>
    00147 struct is_container< const QLinkedList<T> > : public boost::mpl::true_ { ; };
    00148
    00149 template <typename T>
    00150 struct is_container< const QLinkedList<T> & > : public boost::mpl::true_ { ; };
    00151
    00152 template <typename T>
    00153 struct is_container< QList<T> > : public boost::mpl::true_ { ; };
    00154
    00155 template <typename T>
    00156 struct is_container< QList<T> & > : public boost::mpl::true_ { ; };
    00157
    00158 template <typename T>
    00159 struct is_container< const QList<T> > : public boost::mpl::true_ { ; };
    00160
    00161 template <typename T>
    00162 struct is_container< const QList<T> & > : public boost::mpl::true_ { ; };
    00163
    00164 template <typename Key, typename Value>
    00165 struct is_container< QMap<Key, Value> > : public boost::mpl::true_ { ; };
    00166
    00167 template <typename Key, typename Value>
    00168 struct is_container< QMap<Key, Value> & > : public boost::mpl::true_ { ; };
    00169
    00170 template <typename Key, typename Value>
    00171 struct is_container< const QMap<Key, Value> > : public boost::mpl::true_ { ; };
    00172
    00173 template <typename Key, typename Value>
    00174 struct is_container< const QMap<Key, Value> & > : public boost::mpl::true_ { ; };
    00175
    00176 template <typename Key, typename Value>
    00177 struct is_container< QMultiHash<Key, Value> > : public boost::mpl::true_ { ; };
    00178
    00179 template <typename Key, typename Value>
    00180 struct is_container< QMultiHash<Key, Value> & > : public boost::mpl::true_ { ; };
    00181
    00182 template <typename Key, typename Value>
    00183 struct is_container< const QMultiHash<Key, Value> > : public boost::mpl::true_ { ; };
    00184
    00185 template <typename Key, typename Value>
    00186 struct is_container< const QMultiHash<Key, Value> & > : public boost::mpl::true_ { ; };
    00187
    00188 template <typename Key, typename Value>
    00189 struct is_container< QMultiMap<Key, Value> > : public boost::mpl::true_ { ; };
    00190
    00191 template <typename Key, typename Value>
    00192 struct is_container< QMultiMap<Key, Value> & > : public boost::mpl::true_ { ; };
    00193
    00194 template <typename Key, typename Value>
    00195 struct is_container< const QMultiMap<Key, Value> > : public boost::mpl::true_ { ; };
    00196
    00197 template <typename Key, typename Value>
    00198 struct is_container< const QMultiMap<Key, Value> & > : public boost::mpl::true_ { ; };
    00199
    00200 template <typename T>
    00201 struct is_container< QSet<T> > : public boost::mpl::true_ { ; };
    00202
    00203 template <typename T>
    00204 struct is_container< QSet<T> & > : public boost::mpl::true_ { ; };
    00205
    00206 template <typename T>
    00207 struct is_container< const QSet<T> > : public boost::mpl::true_ { ; };
    00208
    00209 template <typename T>
    00210 struct is_container< const QSet<T> & > : public boost::mpl::true_ { ; };
    00211
    00212 template <typename T>
    00213 struct is_container< QVector<T> > : public boost::mpl::true_ { ; };
    00214
    00215 template <typename T>
    00216 struct is_container< QVector<T> & > : public boost::mpl::true_ { ; };
    00217
    00218 template <typename T>
    00219 struct is_container< const QVector<T> > : public boost::mpl::true_ { ; };
    00220
    00221 template <typename T>
    00222 struct is_container< const QVector<T> & > : public boost::mpl::true_ { ; };
    00223
    00224 template <typename Key, typename Value>
    00225 struct is_container< qx::QxCollection<Key, Value> > : public boost::mpl::true_ { ; };
    00226
    00227 template <typename Key, typename Value>
    00228 struct is_container< qx::QxCollection<Key, Value> & > : public boost::mpl::true_ { ; };
    00229
    00230 template <typename Key, typename Value>
    00231 struct is_container< const qx::QxCollection<Key, Value> > : public boost::mpl::true_ { ; };
    00232
    00233 template <typename Key, typename Value>
    00234 struct is_container< const qx::QxCollection<Key, Value> & > : public boost::mpl::true_ { ; };
    00235
    00236 template <typename T>
    00237 struct is_container< std::list<T> > : public boost::mpl::true_ { ; };
    00238
    00239 template <typename T>
    00240 struct is_container< std::list<T> & > : public boost::mpl::true_ { ; };
    00241
    00242 template <typename T>
    00243 struct is_container< const std::list<T> > : public boost::mpl::true_ { ; };
    00244
    00245 template <typename T>
    00246 struct is_container< const std::list<T> & > : public boost::mpl::true_ { ; };
    00247
    00248 template <typename Key, typename Value>
    00249 struct is_container< std::map<Key, Value> > : public boost::mpl::true_ { ; };
    00250
    00251 template <typename Key, typename Value>
    00252 struct is_container< std::map<Key, Value> & > : public boost::mpl::true_ { ; };
    00253
    00254 template <typename Key, typename Value>
    00255 struct is_container< const std::map<Key, Value> > : public boost::mpl::true_ { ; };
    00256
    00257 template <typename Key, typename Value>
    00258 struct is_container< const std::map<Key, Value> & > : public boost::mpl::true_ { ; };
    00259
    00260 template <typename T>
    00261 struct is_container< std::set<T> > : public boost::mpl::true_ { ; };
    00262
    00263 template <typename T>
    00264 struct is_container< std::set<T> & > : public boost::mpl::true_ { ; };
    00265
    00266 template <typename T>
    00267 struct is_container< const std::set<T> > : public boost::mpl::true_ { ; };
    00268
    00269 template <typename T>
    00270 struct is_container< const std::set<T> & > : public boost::mpl::true_ { ; };
    00271
    00272 template <typename T>
    00273 struct is_container< std::vector<T> > : public boost::mpl::true_ { ; };
    00274
    00275 template <typename T>
    00276 struct is_container< std::vector<T> & > : public boost::mpl::true_ { ; };
    00277
    00278 template <typename T>
    00279 struct is_container< const std::vector<T> > : public boost::mpl::true_ { ; };
    00280
    00281 template <typename T>
    00282 struct is_container< const std::vector<T> & > : public boost::mpl::true_ { ; };
    00283
    00284 #ifdef _QX_CPP_11_CONTAINER
    00285 #ifndef BOOST_NO_CXX11_STD_UNORDERED
    00286
    00287 template <typename Key, typename Value>
    00288 struct is_container< std::unordered_map<Key, Value> > : public boost::mpl::true_ { ; };
    00289
    00290 template <typename Key, typename Value>
    00291 struct is_container< std::unordered_map<Key, Value> & > : public boost::mpl::true_ { ; };
    00292
    00293 template <typename Key, typename Value>
    00294 struct is_container< const std::unordered_map<Key, Value> > : public boost::mpl::true_ { ; };
    00295
    00296 template <typename Key, typename Value>
    00297 struct is_container< const std::unordered_map<Key, Value> & > : public boost::mpl::true_ { ; };
    00298
    00299 template <typename Key, typename Value>
    00300 struct is_container< std::unordered_multimap<Key, Value> > : public boost::mpl::true_ { ; };
    00301
    00302 template <typename Key, typename Value>
    00303 struct is_container< std::unordered_multimap<Key, Value> & > : public boost::mpl::true_ { ; };
    00304
    00305 template <typename Key, typename Value>
    00306 struct is_container< const std::unordered_multimap<Key, Value> > : public boost::mpl::true_ { ; };
    00307
    00308 template <typename Key, typename Value>
    00309 struct is_container< const std::unordered_multimap<Key, Value> & > : public boost::mpl::true_ { ; };
    00310
    00311 template <typename T>
    00312 struct is_container< std::unordered_set<T> > : public boost::mpl::true_ { ; };
    00313
    00314 template <typename T>
    00315 struct is_container< std::unordered_set<T> & > : public boost::mpl::true_ { ; };
    00316
    00317 template <typename T>
    00318 struct is_container< const std::unordered_set<T> > : public boost::mpl::true_ { ; };
    00319
    00320 template <typename T>
    00321 struct is_container< const std::unordered_set<T> & > : public boost::mpl::true_ { ; };
    00322
    00323 template <typename T>
    00324 struct is_container< std::unordered_multiset<T> > : public boost::mpl::true_ { ; };
    00325
    00326 template <typename T>
    00327 struct is_container< std::unordered_multiset<T> & > : public boost::mpl::true_ { ; };
    00328
    00329 template <typename T>
    00330 struct is_container< const std::unordered_multiset<T> > : public boost::mpl::true_ { ; };
    00331
    00332 template <typename T>
    00333 struct is_container< const std::unordered_multiset<T> & > : public boost::mpl::true_ { ; };
    00334
    00335 #endif // BOOST_NO_CXX11_STD_UNORDERED
    00336 #endif // _QX_CPP_11_CONTAINER
    00337
    00338 } // namespace trait
    00339 } // namespace qx
    00340
    00341 #endif // _QX_IS_CONTAINER_H_