| QxOrm 1.2.6 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
    00068 #include <QxTraits/is_qx_registered.h>
    00069
    00070 #define QX_REGISTER_CLASS_MAPPING_FCT_HPP(dllImportExport, className) \
    00071 namespace qx { template <> dllImportExport void register_class(QxClass< className > & t) BOOST_USED; }
    00072
    00073 #define QX_REGISTER_CLASS_MAPPING_FCT_EMPTY_CPP(className) \
    00074 namespace qx { template <> void register_class(QxClass< className > & t) { Q_UNUSED(t); } }
    00075
    00076 #define QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(Archive, className) \
    00077 namespace boost { namespace serialization { \
    00078 inline void serialize(Archive & ar, className & t, const unsigned int file_version) \
    00079 { \
    00080    BOOST_STATIC_ASSERT(qx::trait::is_qx_registered< className >::value); \
    00081    typedef boost::mpl::if_c< Archive::is_saving::value, qx::serialization::detail::saver< Archive, className >, qx::serialization::detail::loader< Archive, className > >::type type_invoker; \
    00082    type_invoker::invoke(ar, t, file_version); \
    00083 } } } // namespace boost::serialization
    00084
    00085 #define QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, Archive, className) \
    00086 namespace boost { namespace serialization { \
    00087 dllImportExport void serialize(Archive & ar, className & t, const unsigned int file_version) BOOST_USED; \
    00088 } } // namespace boost::serialization
    00089
    00090 #define QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(Archive, className) \
    00091 namespace boost { namespace serialization { \
    00092 inline void serialize(Archive & ar, className & t, const unsigned int file_version) \
    00093 { Q_UNUSED(ar); Q_UNUSED(t); Q_UNUSED(file_version); \
    00094 } } } // namespace boost::serialization
    00095
    00096 #define QX_SERIALIZE_ARCHIVE_TEMPLATE_HPP(className) \
    00097 namespace boost { namespace serialization { \
    00098 template <class Archive> \
    00099 void serialize(Archive & ar, className & t, const unsigned int file_version); \
    00100 } } // namespace boost::serialization
    00101
    00102 #if _QX_SERIALIZE_POLYMORPHIC
    00103 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) \
    00104 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::polymorphic_oarchive, className) \
    00105 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::polymorphic_iarchive, className) \
    00106 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_binary_oarchive, className) \
    00107 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_binary_iarchive, className) \
    00108 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_text_oarchive, className) \
    00109 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_text_iarchive, className) \
    00110 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_xml_oarchive, className) \
    00111 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_xml_iarchive, className) \
    00112 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::binary_oarchive, className) \
    00113 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::binary_iarchive, className) \
    00114 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::text_oarchive, className) \
    00115 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::text_iarchive, className) \
    00116 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::xml_oarchive, className) \
    00117 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::xml_iarchive, className)
    00118 // ---
    00119 #define QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) \
    00120 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::polymorphic_oarchive, className) \
    00121 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::polymorphic_iarchive, className) \
    00122 QX_SERIALIZE_ARCHIVE_TEMPLATE_HPP(className)
    00123 #else // _QX_SERIALIZE_POLYMORPHIC
    00124 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) /* Nothing */
    00125 #define QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) /* Nothing */
    00126 #endif // _QX_SERIALIZE_POLYMORPHIC
    00127
    00128 #if _QX_SERIALIZE_BINARY
    00129 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) \
    00130 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_oarchive, className) \
    00131 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_iarchive, className)
    00132 // ---
    00133 #define QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) \
    00134 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_oarchive, className) \
    00135 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_iarchive, className)
    00136 #else // _QX_SERIALIZE_BINARY
    00137 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) /* Nothing */
    00138 #define QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00139 #endif // _QX_SERIALIZE_BINARY
    00140
    00141 #if _QX_SERIALIZE_TEXT
    00142 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) \
    00143 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_oarchive, className) \
    00144 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_iarchive, className)
    00145 // ---
    00146 #define QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) \
    00147 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_oarchive, className) \
    00148 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_iarchive, className)
    00149 #else // _QX_SERIALIZE_TEXT
    00150 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) /* Nothing */
    00151 #define QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) /* Nothing */
    00152 #endif // _QX_SERIALIZE_TEXT
    00153
    00154 #if _QX_SERIALIZE_XML
    00155 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) \
    00156 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_oarchive, className) \
    00157 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_iarchive, className)
    00158 // ---
    00159 #define QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) \
    00160 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_oarchive, className) \
    00161 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_iarchive, className)
    00162 #else // _QX_SERIALIZE_XML
    00163 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) /* Nothing */
    00164 #define QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) /* Nothing */
    00165 #endif // _QX_SERIALIZE_XML
    00166
    00167 #if _QX_SERIALIZE_PORTABLE_BINARY
    00168 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) \
    00169 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(eos::portable_oarchive, className) \
    00170 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(eos::portable_iarchive, className)
    00171 // ---
    00172 #define QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) \
    00173 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, eos::portable_oarchive, className) \
    00174 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, eos::portable_iarchive, className)
    00175 #else // _QX_SERIALIZE_PORTABLE_BINARY
    00176 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) /* Nothing */
    00177 #define QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00178 #endif // _QX_SERIALIZE_PORTABLE_BINARY
    00179
    00180 #if _QX_SERIALIZE_WIDE_BINARY
    00181 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) \
    00182 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_woarchive, className) \
    00183 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_wiarchive, className)
    00184 // ---
    00185 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) \
    00186 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_woarchive, className) \
    00187 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_wiarchive, className)
    00188 #else // _QX_SERIALIZE_WIDE_BINARY
    00189 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) /* Nothing */
    00190 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00191 #endif // _QX_SERIALIZE_WIDE_BINARY
    00192
    00193 #if _QX_SERIALIZE_WIDE_TEXT
    00194 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) \
    00195 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_woarchive, className) \
    00196 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_wiarchive, className)
    00197 // ---
    00198 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) \
    00199 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_woarchive, className) \
    00200 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_wiarchive, className)
    00201 #else // _QX_SERIALIZE_WIDE_TEXT
    00202 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) /* Nothing */
    00203 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) /* Nothing */
    00204 #endif // _QX_SERIALIZE_WIDE_TEXT
    00205
    00206 #if _QX_SERIALIZE_WIDE_XML
    00207 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className) \
    00208 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_woarchive, className) \
    00209 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_wiarchive, className)
    00210 // ---
    00211 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className) \
    00212 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_woarchive, className) \
    00213 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_wiarchive, className)
    00214 #else // _QX_SERIALIZE_WIDE_XML
    00215 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className) /* Nothing */
    00216 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className) /* Nothing */
    00217 #endif // _QX_SERIALIZE_WIDE_XML
    00218
    00219 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_CPP(className) \
    00220 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) \
    00221 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) \
    00222 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) \
    00223 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) \
    00224 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) \
    00225 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) \
    00226 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) \
    00227 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className)
    00228
    00229 #define QX_SERIALIZE_LIST_ARCHIVE_HPP(dllImportExport, className) \
    00230 QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) \
    00231 QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) \
    00232 QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) \
    00233 QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) \
    00234 QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) \
    00235 QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) \
    00236 QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) \
    00237 QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className)
    00238
    00239 #if _QX_WRITE_BOOST_CLASS_EXPORT_IN_HPP_FILE
    00240 #define QX_BOOST_CLASS_EXPORT_HPP(className) BOOST_CLASS_EXPORT_GUID(className, #className)
    00241 #else
    00242 #define QX_BOOST_CLASS_EXPORT_HPP(className) /* Nothing */
    00243 #endif // _QX_WRITE_BOOST_CLASS_EXPORT_IN_HPP_FILE
    00244
    00245 #if _QX_WRITE_BOOST_CLASS_EXPORT_IN_CPP_FILE
    00246 #define QX_BOOST_CLASS_EXPORT_CPP(className) BOOST_CLASS_EXPORT_GUID(className, #className)
    00247 #else
    00248 #define QX_BOOST_CLASS_EXPORT_CPP(className) /* Nothing */
    00249 #endif // _QX_WRITE_BOOST_CLASS_EXPORT_IN_CPP_FILE
    00250
    00251 #define QX_REGISTER_FRIEND_CLASS(className) \
    00252 template <class T> friend void qx::register_class(T & t);
    00253
    00254 #define QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00255 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxDataMemberX< className >) \
    00256 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxSingleton< qx::QxDataMemberX< className > >) \
    00257 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxClass< className >) \
    00258 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxSingleton< qx::QxClass< className > >)
    00259
    00260 #define QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00261 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxDataMemberX< className >) \
    00262 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxSingleton< qx::QxDataMemberX< className > >) \
    00263 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxClass< className >) \
    00264 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxSingleton< qx::QxClass< className > >)
    00265
    00266 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00267 QX_SET_REGISTERED(className) \
    00268 QX_REGISTER_CLASS_NAME(className) \
    00269 QX_REGISTER_BASE_CLASS(className, baseClass) \
    00270 QX_REGISTER_FACTORY_COMPLEX_CLASS_NAME_HPP(className, classNameFormatted) \
    00271 QX_REGISTER_BOOST_SERIALIZE_HELPER_COMPLEX_CLASS_NAME(className, classNameFormatted) \
    00272 QX_BOOST_CLASS_EXPORT_HPP(className) \
    00273 BOOST_CLASS_VERSION(className, version)
    00274
    00275 #define QX_REGISTER_HPP(className, baseClass, version) \
    00276 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, className)
    00277
    00278 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00279 QX_BOOST_CLASS_EXPORT_CPP(className) \
    00280 QX_REGISTER_FACTORY_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00281 QX_REGISTER_BOOST_SERIALIZE_HELPER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00282 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_CPP(className)
    00283
    00284 #define QX_REGISTER_CPP(className) \
    00285 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, className)
    00286
    00287 #ifdef _MSC_VER
    00288 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, classNameFormatted) \
    00289 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00290 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_EXPORT_HELPER, className) \
    00291 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_EXPORT_HELPER, className)
    00292 // ---
    00293 #define QX_REGISTER_HPP_EXPORT_DLL(className, baseClass, version) \
    00294 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, className)
    00295 #else // _MSC_VER
    00296 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, classNameFormatted) \
    00297 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00298 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00299 QX_BOOST_EXPORT_SERIALIZATION_HPP(className) \
    00300 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_EXPORT_HELPER, className) \
    00301 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_EXPORT_HELPER, className)
    00302 // ---
    00303 #define QX_REGISTER_HPP_EXPORT_DLL(className, baseClass, version) \
    00304 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, className)
    00305 #endif // _MSC_VER
    00306
    00307 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL(className, baseClass, version, classNameFormatted) \
    00308 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00309 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00310 QX_BOOST_EXPORT_SERIALIZATION_HPP(className) \
    00311 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_IMPORT_HELPER, className) \
    00312 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_IMPORT_HELPER, className)
    00313
    00314 #define QX_REGISTER_HPP_IMPORT_DLL(className, baseClass, version) \
    00315 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL(className, baseClass, version, className)
    00316
    00317 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL(className, classNameFormatted) \
    00318 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00319 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00320 QX_BOOST_EXPORT_SERIALIZATION_CPP(className)
    00321
    00322 #define QX_REGISTER_CPP_EXPORT_DLL(className) \
    00323 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL(className, className)
    00324
    00325 #ifdef _MSC_VER
    00326 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, classNameFormatted) \
    00327 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted)
    00328 // ---
    00329 #define QX_REGISTER_CPP_IMPORT_DLL(className) \
    00330 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, className)
    00331 #else // _MSC_VER
    00332 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, classNameFormatted) \
    00333 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00334 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00335 QX_BOOST_EXPORT_SERIALIZATION_CPP(className)
    00336 // ---
    00337 #define QX_REGISTER_CPP_IMPORT_DLL(className) \
    00338 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, className)
    00339 #endif // _MSC_VER
    00340
    00341 #define QX_REGISTER_ABSTRACT_CLASS(className) \
    00342 BOOST_SERIALIZATION_ASSUME_ABSTRACT(className) \
    00343 namespace boost { namespace serialization { \
    00344 template<class Archive> \
    00345 inline void load_construct_data(Archive & ar, className * t, const unsigned int file_version) \
    00346 { Q_UNUSED(ar); Q_UNUSED(t); Q_UNUSED(file_version); } \
    00347 } } // namespace boost::serialization
    00348
    00349 /* -- Create your macro (in your precompiled header) replacing "MY_DLL"
    00350 #ifdef _BUILDING_MY_DLL
    00351 #define QX_REGISTER_HPP_MY_DLL QX_REGISTER_HPP_EXPORT_DLL
    00352 #define QX_REGISTER_CPP_MY_DLL QX_REGISTER_CPP_EXPORT_DLL
    00353 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL
    00354 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL
    00355 #else
    00356 #define QX_REGISTER_HPP_MY_DLL QX_REGISTER_HPP_IMPORT_DLL
    00357 #define QX_REGISTER_CPP_MY_DLL QX_REGISTER_CPP_IMPORT_DLL
    00358 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL
    00359 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL
    00360 #endif // _BUILDING_MY_DLL
    00361 */
    00362
    00363 #ifdef _MSC_VER
    00364 #pragma warning(pop)
    00365 #endif // _MSC_VER
    00366
    00367 #endif // _QX_REGISTER_H_