| QxOrm 1.4.7 C++ Object Relational Mapping library

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

- File List
- File Members

is_smart_ptr.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_SMART_PTR_H_
    00033 #define _QX_IS_SMART_PTR_H_
    00034
    00035 #ifdef _MSC_VER
    00036 #pragma once
    00037 #endif
    00038
    00046 #include <QxTraits/is_boost_intrusive_ptr.h>
    00047 #include <QxTraits/is_boost_scoped_ptr.h>
    00048 #include <QxTraits/is_boost_shared_ptr.h>
    00049 #include <QxTraits/is_boost_weak_ptr.h>
    00050 #include <QxTraits/is_qt_shared_data_ptr.h>
    00051 #include <QxTraits/is_qt_scoped_ptr.h>
    00052 #include <QxTraits/is_qt_shared_ptr.h>
    00053 #include <QxTraits/is_qt_weak_ptr.h>
    00054 #include <QxTraits/is_qx_dao_ptr.h>
    00055 #include <QxTraits/is_std_unique_ptr.h>
    00056 #include <QxTraits/is_std_shared_ptr.h>
    00057 #include <QxTraits/is_std_weak_ptr.h>
    00058
    00059 namespace qx {
    00060 namespace trait {
    00061
    00066 template <typename T>
    00067 struct is_smart_ptr : public std::false_type { ; };
    00068
    00069 #ifdef _QX_ENABLE_BOOST
    00070
    00071 template <typename T>
    00072 struct is_smart_ptr< boost::shared_ptr<T> > : public std::true_type { ; };
    00073
    00074 template <typename T>
    00075 struct is_smart_ptr< boost::shared_ptr<T> & > : public std::true_type { ; };
    00076
    00077 template <typename T>
    00078 struct is_smart_ptr< const boost::shared_ptr<T> > : public std::true_type { ; };
    00079
    00080 template <typename T>
    00081 struct is_smart_ptr< const boost::shared_ptr<T> & > : public std::true_type { ; };
    00082
    00083 template <typename T>
    00084 struct is_smart_ptr< boost::intrusive_ptr<T> > : public std::true_type { ; };
    00085
    00086 template <typename T>
    00087 struct is_smart_ptr< boost::intrusive_ptr<T> & > : public std::true_type { ; };
    00088
    00089 template <typename T>
    00090 struct is_smart_ptr< const boost::intrusive_ptr<T> > : public std::true_type { ; };
    00091
    00092 template <typename T>
    00093 struct is_smart_ptr< const boost::intrusive_ptr<T> & > : public std::true_type { ; };
    00094
    00095 template <typename T>
    00096 struct is_smart_ptr< boost::scoped_ptr<T> > : public std::true_type { ; };
    00097
    00098 template <typename T>
    00099 struct is_smart_ptr< boost::scoped_ptr<T> & > : public std::true_type { ; };
    00100
    00101 template <typename T>
    00102 struct is_smart_ptr< const boost::scoped_ptr<T> > : public std::true_type { ; };
    00103
    00104 template <typename T>
    00105 struct is_smart_ptr< const boost::scoped_ptr<T> & > : public std::true_type { ; };
    00106
    00107 template <typename T>
    00108 struct is_smart_ptr< boost::weak_ptr<T> > : public std::true_type { ; };
    00109
    00110 template <typename T>
    00111 struct is_smart_ptr< boost::weak_ptr<T> & > : public std::true_type { ; };
    00112
    00113 template <typename T>
    00114 struct is_smart_ptr< const boost::weak_ptr<T> > : public std::true_type { ; };
    00115
    00116 template <typename T>
    00117 struct is_smart_ptr< const boost::weak_ptr<T> & > : public std::true_type { ; };
    00118
    00119 #endif // _QX_ENABLE_BOOST
    00120
    00121 #if (QT_VERSION >= 0x040600)
    00122
    00123 template <typename T>
    00124 struct is_smart_ptr< QScopedPointer<T> > : public std::true_type { ; };
    00125
    00126 template <typename T>
    00127 struct is_smart_ptr< QScopedPointer<T> & > : public std::true_type { ; };
    00128
    00129 template <typename T>
    00130 struct is_smart_ptr< const QScopedPointer<T> > : public std::true_type { ; };
    00131
    00132 template <typename T>
    00133 struct is_smart_ptr< const QScopedPointer<T> & > : public std::true_type { ; };
    00134
    00135 #endif // (QT_VERSION >= 0x040600)
    00136
    00137 template <typename T>
    00138 struct is_smart_ptr< QSharedDataPointer<T> > : public std::true_type { ; };
    00139
    00140 template <typename T>
    00141 struct is_smart_ptr< QSharedDataPointer<T> & > : public std::true_type { ; };
    00142
    00143 template <typename T>
    00144 struct is_smart_ptr< const QSharedDataPointer<T> > : public std::true_type { ; };
    00145
    00146 template <typename T>
    00147 struct is_smart_ptr< const QSharedDataPointer<T> & > : public std::true_type { ; };
    00148
    00149 template <typename T>
    00150 struct is_smart_ptr< QSharedPointer<T> > : public std::true_type { ; };
    00151
    00152 template <typename T>
    00153 struct is_smart_ptr< QSharedPointer<T> & > : public std::true_type { ; };
    00154
    00155 template <typename T>
    00156 struct is_smart_ptr< const QSharedPointer<T> > : public std::true_type { ; };
    00157
    00158 template <typename T>
    00159 struct is_smart_ptr< const QSharedPointer<T> & > : public std::true_type { ; };
    00160
    00161 template <typename T>
    00162 struct is_smart_ptr< QWeakPointer<T> > : public std::true_type { ; };
    00163
    00164 template <typename T>
    00165 struct is_smart_ptr< QWeakPointer<T> & > : public std::true_type { ; };
    00166
    00167 template <typename T>
    00168 struct is_smart_ptr< const QWeakPointer<T> > : public std::true_type { ; };
    00169
    00170 template <typename T>
    00171 struct is_smart_ptr< const QWeakPointer<T> & > : public std::true_type { ; };
    00172
    00173 template <typename T>
    00174 struct is_smart_ptr< qx::dao::ptr<T> > : public std::true_type { ; };
    00175
    00176 template <typename T>
    00177 struct is_smart_ptr< qx::dao::ptr<T> & > : public std::true_type { ; };
    00178
    00179 template <typename T>
    00180 struct is_smart_ptr< const qx::dao::ptr<T> > : public std::true_type { ; };
    00181
    00182 template <typename T>
    00183 struct is_smart_ptr< const qx::dao::ptr<T> & > : public std::true_type { ; };
    00184
    00185 template <typename T>
    00186 struct is_smart_ptr< std::shared_ptr<T> > : public std::true_type { ; };
    00187
    00188 template <typename T>
    00189 struct is_smart_ptr< std::shared_ptr<T> & > : public std::true_type { ; };
    00190
    00191 template <typename T>
    00192 struct is_smart_ptr< const std::shared_ptr<T> > : public std::true_type { ; };
    00193
    00194 template <typename T>
    00195 struct is_smart_ptr< const std::shared_ptr<T> & > : public std::true_type { ; };
    00196
    00197 template <typename T>
    00198 struct is_smart_ptr< std::unique_ptr<T> > : public std::true_type { ; };
    00199
    00200 template <typename T>
    00201 struct is_smart_ptr< std::unique_ptr<T> & > : public std::true_type { ; };
    00202
    00203 template <typename T>
    00204 struct is_smart_ptr< const std::unique_ptr<T> > : public std::true_type { ; };
    00205
    00206 template <typename T>
    00207 struct is_smart_ptr< const std::unique_ptr<T> & > : public std::true_type { ; };
    00208
    00209 template <typename T>
    00210 struct is_smart_ptr< std::weak_ptr<T> > : public std::true_type { ; };
    00211
    00212 template <typename T>
    00213 struct is_smart_ptr< std::weak_ptr<T> & > : public std::true_type { ; };
    00214
    00215 template <typename T>
    00216 struct is_smart_ptr< const std::weak_ptr<T> > : public std::true_type { ; };
    00217
    00218 template <typename T>
    00219 struct is_smart_ptr< const std::weak_ptr<T> & > : public std::true_type { ; };
    00220
    00221 } // namespace trait
    00222 } // namespace qx
    00223
    00224 #endif // _QX_IS_SMART_PTR_H_