| QxOrm 1.4.1 C++ Object Relational Mapping library

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

- File List
- File Members

QxRegister.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_REGISTER_H_
    00033 #define _QX_REGISTER_H_
    00034
    00035 #ifdef _MSC_VER
    00036 #pragma once
    00037 #endif
    00038
    00046 #ifdef _MSC_VER
    00047 #pragma warning(push)
    00048 #pragma warning(disable:4996)
    00049 #pragma warning(disable:4094)
    00050 #endif // _MSC_VER
    00051
    00052 #include <boost/mpl/if.hpp>
    00053 #include <boost/mpl/logical.hpp>
    00054 #include <boost/static_assert.hpp>
    00055
    00056 #include <QxCommon/QxConfig.h>
    00057 #include <QxCommon/QxMacro.h>
    00058
    00059 #include <QxRegister/QxClass.h>
    00060
    00061 #include <QxFactory/QxFactory.h>
    00062
    00063 #include <QxSerialize/QxSerializeInvoker.h>
    00064 #include <QxSerialize/QxBoostSerializeHelper/QxBoostSerializeRegisterHelper.h>
    00065 #include <QxSerialize/boost/QxExportDllMacroHpp.h>
    00066 #include <QxSerialize/boost/QxExportDllMacroCpp.h>
    00067 #include <QxSerialize/QDataStream/QxSerializeQDataStream_qx_registered_class.h>
    00068
    00069 #include <QxTraits/is_qx_registered.h>
    00070
    00071 #define QX_REGISTER_CLASS_MAPPING_FCT_HPP(dllImportExport, className) \
    00072 namespace qx { template <> dllImportExport void register_class(QxClass< className > & t) BOOST_USED; }
    00073
    00074 #define QX_REGISTER_SERIALIZE_QDATASTREAM_HPP(dllImportExport, className) \
    00075 dllImportExport QDataStream & operator<< (QDataStream & stream, const className & t) BOOST_USED; \
    00076 dllImportExport QDataStream & operator>> (QDataStream & stream, className & t) BOOST_USED;
    00077
    00078 #define QX_REGISTER_SERIALIZE_QDATASTREAM_CPP(className) \
    00079 QDataStream & operator<< (QDataStream & stream, const className & t) \
    00080 { return qx::QxSerializeRegistered< className >::save(stream, t); } \
    00081 QDataStream & operator>> (QDataStream & stream, className & t) \
    00082 { return qx::QxSerializeRegistered< className >::load(stream, t); }
    00083
    00084 #define QX_REGISTER_CLASS_MAPPING_FCT_EMPTY_CPP(className) \
    00085 namespace qx { template <> void register_class(QxClass< className > & t) { Q_UNUSED(t); } }
    00086
    00087 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00088 #define QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(Archive, className) \
    00089 namespace boost { namespace serialization { \
    00090 inline void serialize(Archive & ar, className & t, const unsigned int file_version) \
    00091 { \
    00092    BOOST_STATIC_ASSERT(qx::trait::is_qx_registered< className >::value); \
    00093    typedef boost::mpl::if_c< Archive::is_saving::value, qx::serialization::detail::saver< Archive, className >, qx::serialization::detail::loader< Archive, className > >::type type_invoker; \
    00094    type_invoker::invoke(ar, t, file_version); \
    00095 } } } // namespace boost::serialization
    00096 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00097
    00098 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00099 #define QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, Archive, className) \
    00100 namespace boost { namespace serialization { \
    00101 dllImportExport void serialize(Archive & ar, className & t, const unsigned int file_version) BOOST_USED; \
    00102 } } // namespace boost::serialization
    00103 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00104
    00105 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00106 #define QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(Archive, className) \
    00107 namespace boost { namespace serialization { \
    00108 inline void serialize(Archive & ar, className & t, const unsigned int file_version) \
    00109 { Q_UNUSED(ar); Q_UNUSED(t); Q_UNUSED(file_version); \
    00110 } } } // namespace boost::serialization
    00111 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00112
    00113 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00114 #define QX_SERIALIZE_ARCHIVE_TEMPLATE_HPP(className) \
    00115 namespace boost { namespace serialization { \
    00116 template <class Archive> \
    00117 void serialize(Archive & ar, className & t, const unsigned int file_version); \
    00118 } } // namespace boost::serialization
    00119 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00120
    00121 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00122 #if _QX_SERIALIZE_POLYMORPHIC
    00123 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) \
    00124 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::polymorphic_oarchive, className) \
    00125 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::polymorphic_iarchive, className) \
    00126 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_binary_oarchive, className) \
    00127 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_binary_iarchive, className) \
    00128 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_text_oarchive, className) \
    00129 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_text_iarchive, className) \
    00130 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_xml_oarchive, className) \
    00131 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_xml_iarchive, className) \
    00132 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::binary_oarchive, className) \
    00133 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::binary_iarchive, className) \
    00134 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::text_oarchive, className) \
    00135 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::text_iarchive, className) \
    00136 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::xml_oarchive, className) \
    00137 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::xml_iarchive, className)
    00138 // ---
    00139 #define QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) \
    00140 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::polymorphic_oarchive, className) \
    00141 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::polymorphic_iarchive, className) \
    00142 QX_SERIALIZE_ARCHIVE_TEMPLATE_HPP(className)
    00143 #else // _QX_SERIALIZE_POLYMORPHIC
    00144 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) /* Nothing */
    00145 #define QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) /* Nothing */
    00146 #endif // _QX_SERIALIZE_POLYMORPHIC
    00147 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00148
    00149 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00150 #if _QX_SERIALIZE_BINARY
    00151 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) \
    00152 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_oarchive, className) \
    00153 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_iarchive, className)
    00154 // ---
    00155 #define QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) \
    00156 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_oarchive, className) \
    00157 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_iarchive, className)
    00158 #else // _QX_SERIALIZE_BINARY
    00159 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) /* Nothing */
    00160 #define QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00161 #endif // _QX_SERIALIZE_BINARY
    00162 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00163
    00164 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00165 #if _QX_SERIALIZE_TEXT
    00166 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) \
    00167 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_oarchive, className) \
    00168 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_iarchive, className)
    00169 // ---
    00170 #define QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) \
    00171 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_oarchive, className) \
    00172 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_iarchive, className)
    00173 #else // _QX_SERIALIZE_TEXT
    00174 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) /* Nothing */
    00175 #define QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) /* Nothing */
    00176 #endif // _QX_SERIALIZE_TEXT
    00177 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00178
    00179 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00180 #if _QX_SERIALIZE_XML
    00181 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) \
    00182 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_oarchive, className) \
    00183 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_iarchive, className)
    00184 // ---
    00185 #define QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) \
    00186 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_oarchive, className) \
    00187 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_iarchive, className)
    00188 #else // _QX_SERIALIZE_XML
    00189 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) /* Nothing */
    00190 #define QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) /* Nothing */
    00191 #endif // _QX_SERIALIZE_XML
    00192 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00193
    00194 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00195 #if _QX_SERIALIZE_PORTABLE_BINARY
    00196 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) \
    00197 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(eos::portable_oarchive, className) \
    00198 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(eos::portable_iarchive, className)
    00199 // ---
    00200 #define QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) \
    00201 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, eos::portable_oarchive, className) \
    00202 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, eos::portable_iarchive, className)
    00203 #else // _QX_SERIALIZE_PORTABLE_BINARY
    00204 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) /* Nothing */
    00205 #define QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00206 #endif // _QX_SERIALIZE_PORTABLE_BINARY
    00207 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00208
    00209 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00210 #if _QX_SERIALIZE_WIDE_BINARY
    00211 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) \
    00212 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_woarchive, className) \
    00213 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_wiarchive, className)
    00214 // ---
    00215 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) \
    00216 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_woarchive, className) \
    00217 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_wiarchive, className)
    00218 #else // _QX_SERIALIZE_WIDE_BINARY
    00219 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) /* Nothing */
    00220 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00221 #endif // _QX_SERIALIZE_WIDE_BINARY
    00222 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00223
    00224 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00225 #if _QX_SERIALIZE_WIDE_TEXT
    00226 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) \
    00227 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_woarchive, className) \
    00228 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_wiarchive, className)
    00229 // ---
    00230 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) \
    00231 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_woarchive, className) \
    00232 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_wiarchive, className)
    00233 #else // _QX_SERIALIZE_WIDE_TEXT
    00234 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) /* Nothing */
    00235 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) /* Nothing */
    00236 #endif // _QX_SERIALIZE_WIDE_TEXT
    00237 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00238
    00239 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00240 #if _QX_SERIALIZE_WIDE_XML
    00241 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className) \
    00242 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_woarchive, className) \
    00243 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_wiarchive, className)
    00244 // ---
    00245 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className) \
    00246 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_woarchive, className) \
    00247 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_wiarchive, className)
    00248 #else // _QX_SERIALIZE_WIDE_XML
    00249 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className) /* Nothing */
    00250 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className) /* Nothing */
    00251 #endif // _QX_SERIALIZE_WIDE_XML
    00252 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00253
    00254 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00255 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_CPP(className) \
    00256 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) \
    00257 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) \
    00258 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) \
    00259 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) \
    00260 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) \
    00261 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) \
    00262 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) \
    00263 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className)
    00264 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00265
    00266 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00267 #define QX_SERIALIZE_LIST_ARCHIVE_HPP(dllImportExport, className) \
    00268 QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) \
    00269 QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) \
    00270 QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) \
    00271 QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) \
    00272 QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) \
    00273 QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) \
    00274 QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) \
    00275 QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className)
    00276 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00277
    00278 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00279 #if _QX_WRITE_BOOST_CLASS_EXPORT_IN_HPP_FILE
    00280 #define QX_BOOST_CLASS_EXPORT_HPP(className) BOOST_CLASS_EXPORT_GUID(className, #className)
    00281 #else
    00282 #define QX_BOOST_CLASS_EXPORT_HPP(className) /* Nothing */
    00283 #endif // _QX_WRITE_BOOST_CLASS_EXPORT_IN_HPP_FILE
    00284 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00285
    00286 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00287 #if _QX_WRITE_BOOST_CLASS_EXPORT_IN_CPP_FILE
    00288 #define QX_BOOST_CLASS_EXPORT_CPP(className) BOOST_CLASS_EXPORT_GUID(className, #className)
    00289 #else
    00290 #define QX_BOOST_CLASS_EXPORT_CPP(className) /* Nothing */
    00291 #endif // _QX_WRITE_BOOST_CLASS_EXPORT_IN_CPP_FILE
    00292 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00293
    00294 #define QX_REGISTER_FRIEND_CLASS(className) \
    00295 template <class T> friend void qx::register_class(T & t);
    00296
    00297 #define QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00298 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxDataMemberX< className >) \
    00299 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxSingleton< qx::QxDataMemberX< className > >) \
    00300 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxClass< className >) \
    00301 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxSingleton< qx::QxClass< className > >)
    00302
    00303 #define QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00304 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxDataMemberX< className >) \
    00305 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxSingleton< qx::QxDataMemberX< className > >) \
    00306 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxClass< className >) \
    00307 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxSingleton< qx::QxClass< className > >)
    00308
    00309 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00310 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00311 QX_SET_REGISTERED(className) \
    00312 QX_REGISTER_CLASS_NAME(className) \
    00313 QX_REGISTER_BASE_CLASS(className, baseClass) \
    00314 QX_REGISTER_FACTORY_COMPLEX_CLASS_NAME_HPP(className, classNameFormatted) \
    00315 QX_REGISTER_BOOST_SERIALIZE_HELPER_COMPLEX_CLASS_NAME(className, classNameFormatted) \
    00316 QX_BOOST_CLASS_EXPORT_HPP(className) \
    00317 BOOST_CLASS_VERSION(className, version)
    00318 #else // _QX_ENABLE_BOOST_SERIALIZATION
    00319 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00320 QX_SET_REGISTERED(className) \
    00321 QX_REGISTER_CLASS_NAME(className) \
    00322 QX_REGISTER_BASE_CLASS(className, baseClass) \
    00323 QX_REGISTER_FACTORY_COMPLEX_CLASS_NAME_HPP(className, classNameFormatted) \
    00324 BOOST_CLASS_VERSION(className, version)
    00325 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00326
    00327 #define QX_REGISTER_HPP(className, baseClass, version) \
    00328 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, className)
    00329
    00330 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00331 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00332 QX_BOOST_CLASS_EXPORT_CPP(className) \
    00333 QX_REGISTER_FACTORY_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00334 QX_REGISTER_BOOST_SERIALIZE_HELPER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00335 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_CPP(className)
    00336 #else // _QX_ENABLE_BOOST_SERIALIZATION
    00337 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00338 QX_REGISTER_FACTORY_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted)
    00339 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00340
    00341 #define QX_REGISTER_CPP(className) \
    00342 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, className)
    00343
    00344 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00345
    00346 #ifdef _MSC_VER
    00347 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, classNameFormatted) \
    00348 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00349 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_EXPORT_HELPER, className) \
    00350 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_EXPORT_HELPER, className) \
    00351 QX_REGISTER_SERIALIZE_QDATASTREAM_HPP(QX_DLL_EXPORT_HELPER, className)
    00352 // ---
    00353 #define QX_REGISTER_HPP_EXPORT_DLL(className, baseClass, version) \
    00354 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, className)
    00355 #else // _MSC_VER
    00356 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, classNameFormatted) \
    00357 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00358 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00359 QX_BOOST_EXPORT_SERIALIZATION_HPP(className) \
    00360 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_EXPORT_HELPER, className) \
    00361 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_EXPORT_HELPER, className) \
    00362 QX_REGISTER_SERIALIZE_QDATASTREAM_HPP(QX_DLL_EXPORT_HELPER, className)
    00363 // ---
    00364 #define QX_REGISTER_HPP_EXPORT_DLL(className, baseClass, version) \
    00365 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, className)
    00366 #endif // _MSC_VER
    00367
    00368 #else // _QX_ENABLE_BOOST_SERIALIZATION
    00369
    00370 #ifdef _MSC_VER
    00371 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, classNameFormatted) \
    00372 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00373 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_EXPORT_HELPER, className) \
    00374 QX_REGISTER_SERIALIZE_QDATASTREAM_HPP(QX_DLL_EXPORT_HELPER, className)
    00375 // ---
    00376 #define QX_REGISTER_HPP_EXPORT_DLL(className, baseClass, version) \
    00377 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, className)
    00378 #else // _MSC_VER
    00379 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, classNameFormatted) \
    00380 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00381 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00382 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_EXPORT_HELPER, className) \
    00383 QX_REGISTER_SERIALIZE_QDATASTREAM_HPP(QX_DLL_EXPORT_HELPER, className)
    00384 // ---
    00385 #define QX_REGISTER_HPP_EXPORT_DLL(className, baseClass, version) \
    00386 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, className)
    00387 #endif // _MSC_VER
    00388
    00389 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00390
    00391 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00392 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL(className, baseClass, version, classNameFormatted) \
    00393 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00394 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00395 QX_BOOST_EXPORT_SERIALIZATION_HPP(className) \
    00396 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_IMPORT_HELPER, className) \
    00397 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_IMPORT_HELPER, className) \
    00398 QX_REGISTER_SERIALIZE_QDATASTREAM_HPP(QX_DLL_IMPORT_HELPER, className)
    00399 #else // _QX_ENABLE_BOOST_SERIALIZATION
    00400 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL(className, baseClass, version, classNameFormatted) \
    00401 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00402 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00403 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_IMPORT_HELPER, className) \
    00404 QX_REGISTER_SERIALIZE_QDATASTREAM_HPP(QX_DLL_IMPORT_HELPER, className)
    00405 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00406
    00407 #define QX_REGISTER_HPP_IMPORT_DLL(className, baseClass, version) \
    00408 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL(className, baseClass, version, className)
    00409
    00410 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00411 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL(className, classNameFormatted) \
    00412 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00413 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00414 QX_BOOST_EXPORT_SERIALIZATION_CPP(className) \
    00415 QX_REGISTER_SERIALIZE_QDATASTREAM_CPP(className)
    00416 #else // _QX_ENABLE_BOOST_SERIALIZATION
    00417 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL(className, classNameFormatted) \
    00418 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00419 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00420 QX_REGISTER_SERIALIZE_QDATASTREAM_CPP(className)
    00421 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00422
    00423 #define QX_REGISTER_CPP_EXPORT_DLL(className) \
    00424 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL(className, className)
    00425
    00426 #ifdef _MSC_VER
    00427 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, classNameFormatted) \
    00428 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted)
    00429 // ---
    00430 #define QX_REGISTER_CPP_IMPORT_DLL(className) \
    00431 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, className)
    00432 #else // _MSC_VER
    00433 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00434 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, classNameFormatted) \
    00435 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00436 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00437 QX_BOOST_EXPORT_SERIALIZATION_CPP(className)
    00438 #else // _QX_ENABLE_BOOST_SERIALIZATION
    00439 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, classNameFormatted) \
    00440 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00441 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className)
    00442 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00443 // ---
    00444 #define QX_REGISTER_CPP_IMPORT_DLL(className) \
    00445 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, className)
    00446 #endif // _MSC_VER
    00447
    00448 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
    00449 #define QX_REGISTER_ABSTRACT_CLASS(className) \
    00450 BOOST_SERIALIZATION_ASSUME_ABSTRACT(className) \
    00451 namespace boost { namespace serialization { \
    00452 template<class Archive> \
    00453 inline void load_construct_data(Archive & ar, className * t, const unsigned int file_version) \
    00454 { Q_UNUSED(ar); Q_UNUSED(t); Q_UNUSED(file_version); } \
    00455 } } // namespace boost::serialization
    00456 #else // _QX_ENABLE_BOOST_SERIALIZATION
    00457 #define QX_REGISTER_ABSTRACT_CLASS(className) /* Nothing */
    00458 #endif // _QX_ENABLE_BOOST_SERIALIZATION
    00459
    00460 /* -- Create your macro (in your precompiled header) replacing "MY_DLL"
    00461 #ifdef _BUILDING_MY_DLL
    00462 #define QX_REGISTER_HPP_MY_DLL QX_REGISTER_HPP_EXPORT_DLL
    00463 #define QX_REGISTER_CPP_MY_DLL QX_REGISTER_CPP_EXPORT_DLL
    00464 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL
    00465 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL
    00466 #else
    00467 #define QX_REGISTER_HPP_MY_DLL QX_REGISTER_HPP_IMPORT_DLL
    00468 #define QX_REGISTER_CPP_MY_DLL QX_REGISTER_CPP_IMPORT_DLL
    00469 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL
    00470 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL
    00471 #endif // _BUILDING_MY_DLL
    00472 */
    00473
    00474 #ifdef _MSC_VER
    00475 #pragma warning(pop)
    00476 #endif // _MSC_VER
    00477
    00478 #endif // _QX_REGISTER_H_