QxOrm
1.5.0
C++ Object Relational Mapping library
|
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_KEY_VALUE_H_ 00033 #define _QX_IS_CONTAINER_KEY_VALUE_H_ 00034 00035 #ifdef _MSC_VER 00036 #pragma once 00037 #endif 00038 00046 #include <QxTraits/is_container.h> 00047 00048 namespace qx { 00049 namespace trait { 00050 00055 template <typename T> 00056 struct is_container_key_value : public std::false_type { ; }; 00057 00058 #ifdef _QX_ENABLE_BOOST 00059 00060 template <typename Key, typename Value> 00061 struct is_container_key_value< boost::unordered_map<Key, Value> > : public std::true_type { ; }; 00062 00063 template <typename Key, typename Value> 00064 struct is_container_key_value< boost::unordered_map<Key, Value> & > : public std::true_type { ; }; 00065 00066 template <typename Key, typename Value> 00067 struct is_container_key_value< const boost::unordered_map<Key, Value> > : public std::true_type { ; }; 00068 00069 template <typename Key, typename Value> 00070 struct is_container_key_value< const boost::unordered_map<Key, Value> & > : public std::true_type { ; }; 00071 00072 template <typename Key, typename Value> 00073 struct is_container_key_value< boost::unordered_multimap<Key, Value> > : public std::true_type { ; }; 00074 00075 template <typename Key, typename Value> 00076 struct is_container_key_value< boost::unordered_multimap<Key, Value> & > : public std::true_type { ; }; 00077 00078 template <typename Key, typename Value> 00079 struct is_container_key_value< const boost::unordered_multimap<Key, Value> > : public std::true_type { ; }; 00080 00081 template <typename Key, typename Value> 00082 struct is_container_key_value< const boost::unordered_multimap<Key, Value> & > : public std::true_type { ; }; 00083 00084 #endif // _QX_ENABLE_BOOST 00085 00086 template <typename Key, typename Value> 00087 struct is_container_key_value< QHash<Key, Value> > : public std::true_type { ; }; 00088 00089 template <typename Key, typename Value> 00090 struct is_container_key_value< QHash<Key, Value> & > : public std::true_type { ; }; 00091 00092 template <typename Key, typename Value> 00093 struct is_container_key_value< const QHash<Key, Value> > : public std::true_type { ; }; 00094 00095 template <typename Key, typename Value> 00096 struct is_container_key_value< const QHash<Key, Value> & > : public std::true_type { ; }; 00097 00098 template <typename Key, typename Value> 00099 struct is_container_key_value< QMap<Key, Value> > : public std::true_type { ; }; 00100 00101 template <typename Key, typename Value> 00102 struct is_container_key_value< QMap<Key, Value> & > : public std::true_type { ; }; 00103 00104 template <typename Key, typename Value> 00105 struct is_container_key_value< const QMap<Key, Value> > : public std::true_type { ; }; 00106 00107 template <typename Key, typename Value> 00108 struct is_container_key_value< const QMap<Key, Value> & > : public std::true_type { ; }; 00109 00110 template <typename Key, typename Value> 00111 struct is_container_key_value< QMultiHash<Key, Value> > : public std::true_type { ; }; 00112 00113 template <typename Key, typename Value> 00114 struct is_container_key_value< QMultiHash<Key, Value> & > : public std::true_type { ; }; 00115 00116 template <typename Key, typename Value> 00117 struct is_container_key_value< const QMultiHash<Key, Value> > : public std::true_type { ; }; 00118 00119 template <typename Key, typename Value> 00120 struct is_container_key_value< const QMultiHash<Key, Value> & > : public std::true_type { ; }; 00121 00122 template <typename Key, typename Value> 00123 struct is_container_key_value< QMultiMap<Key, Value> > : public std::true_type { ; }; 00124 00125 template <typename Key, typename Value> 00126 struct is_container_key_value< QMultiMap<Key, Value> & > : public std::true_type { ; }; 00127 00128 template <typename Key, typename Value> 00129 struct is_container_key_value< const QMultiMap<Key, Value> > : public std::true_type { ; }; 00130 00131 template <typename Key, typename Value> 00132 struct is_container_key_value< const QMultiMap<Key, Value> & > : public std::true_type { ; }; 00133 00134 template <typename Key, typename Value> 00135 struct is_container_key_value< qx::QxCollection<Key, Value> > : public std::true_type { ; }; 00136 00137 template <typename Key, typename Value> 00138 struct is_container_key_value< qx::QxCollection<Key, Value> & > : public std::true_type { ; }; 00139 00140 template <typename Key, typename Value> 00141 struct is_container_key_value< const qx::QxCollection<Key, Value> > : public std::true_type { ; }; 00142 00143 template <typename Key, typename Value> 00144 struct is_container_key_value< const qx::QxCollection<Key, Value> & > : public std::true_type { ; }; 00145 00146 template <typename Key, typename Value> 00147 struct is_container_key_value< std::map<Key, Value> > : public std::true_type { ; }; 00148 00149 template <typename Key, typename Value> 00150 struct is_container_key_value< std::map<Key, Value> & > : public std::true_type { ; }; 00151 00152 template <typename Key, typename Value> 00153 struct is_container_key_value< const std::map<Key, Value> > : public std::true_type { ; }; 00154 00155 template <typename Key, typename Value> 00156 struct is_container_key_value< const std::map<Key, Value> & > : public std::true_type { ; }; 00157 00158 template <typename Key, typename Value> 00159 struct is_container_key_value< std::unordered_map<Key, Value> > : public std::true_type { ; }; 00160 00161 template <typename Key, typename Value> 00162 struct is_container_key_value< std::unordered_map<Key, Value> & > : public std::true_type { ; }; 00163 00164 template <typename Key, typename Value> 00165 struct is_container_key_value< const std::unordered_map<Key, Value> > : public std::true_type { ; }; 00166 00167 template <typename Key, typename Value> 00168 struct is_container_key_value< const std::unordered_map<Key, Value> & > : public std::true_type { ; }; 00169 00170 template <typename Key, typename Value> 00171 struct is_container_key_value< std::unordered_multimap<Key, Value> > : public std::true_type { ; }; 00172 00173 template <typename Key, typename Value> 00174 struct is_container_key_value< std::unordered_multimap<Key, Value> & > : public std::true_type { ; }; 00175 00176 template <typename Key, typename Value> 00177 struct is_container_key_value< const std::unordered_multimap<Key, Value> > : public std::true_type { ; }; 00178 00179 template <typename Key, typename Value> 00180 struct is_container_key_value< const std::unordered_multimap<Key, Value> & > : public std::true_type { ; }; 00181 00182 } // namespace trait 00183 } // namespace qx 00184 00185 #endif // _QX_IS_CONTAINER_KEY_VALUE_H_