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