| QxOrm 1.2.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 ** http://sourceforge.net/projects/qxorm/
    00005 ** Original file by Lionel Marty
    00006 **
    00007 ** This file is part of the QxOrm library
    00008 **
    00009 ** This software is provided 'as-is', without any express or implied
    00010 ** warranty. In no event will the authors be held liable for any
    00011 ** damages arising from the use of this software.
    00012 **
    00013 ** GNU Lesser General Public License Usage
    00014 ** This file must be used under the terms of the GNU Lesser
    00015 ** General Public License version 2.1 as published by the Free Software
    00016 ** Foundation and appearing in the file 'license.lgpl.txt' included in the
    00017 ** packaging of this file.  Please review the following information to
    00018 ** ensure the GNU Lesser General Public License version 2.1 requirements
    00019 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    00020 **
    00021 ** If you have questions regarding the use of this file, please contact :
    00022 ** contact@qxorm.com
    00023 **
    00024 ****************************************************************************/
    00025
    00026 #ifndef _QX_REGISTER_H_
    00027 #define _QX_REGISTER_H_
    00028
    00029 #ifdef _MSC_VER
    00030 #pragma once
    00031 #endif
    00032
    00040 #ifdef _MSC_VER
    00041 #pragma warning(push)
    00042 #pragma warning(disable:4996)
    00043 #pragma warning(disable:4094)
    00044 #endif // _MSC_VER
    00045
    00046 #include <boost/mpl/if.hpp>
    00047 #include <boost/mpl/logical.hpp>
    00048 #include <boost/static_assert.hpp>
    00049
    00050 #include <QxCommon/QxConfig.h>
    00051 #include <QxCommon/QxMacro.h>
    00052
    00053 #include <QxRegister/QxClass.h>
    00054
    00055 #include <QxFactory/QxFactory.h>
    00056
    00057 #include <QxSerialize/QxSerializeInvoker.h>
    00058 #include <QxSerialize/QxBoostSerializeHelper/QxBoostSerializeRegisterHelper.h>
    00059 #include <QxSerialize/boost/QxExportDllMacroHpp.h>
    00060 #include <QxSerialize/boost/QxExportDllMacroCpp.h>
    00061
    00062 #include <QxTraits/is_qx_registered.h>
    00063
    00064 #define QX_REGISTER_CLASS_MAPPING_FCT_HPP(dllImportExport, className) \
    00065 namespace qx { template <> dllImportExport void register_class(QxClass< className > & t) BOOST_USED; }
    00066
    00067 #define QX_REGISTER_CLASS_MAPPING_FCT_EMPTY_CPP(className) \
    00068 namespace qx { template <> void register_class(QxClass< className > & t) { Q_UNUSED(t); } }
    00069
    00070 #define QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(Archive, className) \
    00071 namespace boost { namespace serialization { \
    00072 inline void serialize(Archive & ar, className & t, const unsigned int file_version) \
    00073 { \
    00074    BOOST_STATIC_ASSERT(qx::trait::is_qx_registered< className >::value); \
    00075    typedef boost::mpl::if_c< Archive::is_saving::value, qx::serialization::detail::saver< Archive, className >, qx::serialization::detail::loader< Archive, className > >::type type_invoker; \
    00076    type_invoker::invoke(ar, t, file_version); \
    00077 } } } // namespace boost::serialization
    00078
    00079 #define QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, Archive, className) \
    00080 namespace boost { namespace serialization { \
    00081 dllImportExport void serialize(Archive & ar, className & t, const unsigned int file_version) BOOST_USED; \
    00082 } } // namespace boost::serialization
    00083
    00084 #define QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(Archive, className) \
    00085 namespace boost { namespace serialization { \
    00086 inline void serialize(Archive & ar, className & t, const unsigned int file_version) \
    00087 { Q_UNUSED(ar); Q_UNUSED(t); Q_UNUSED(file_version); \
    00088 } } } // namespace boost::serialization
    00089
    00090 #define QX_SERIALIZE_ARCHIVE_TEMPLATE_HPP(className) \
    00091 namespace boost { namespace serialization { \
    00092 template <class Archive> \
    00093 void serialize(Archive & ar, className & t, const unsigned int file_version); \
    00094 } } // namespace boost::serialization
    00095
    00096 #if _QX_SERIALIZE_POLYMORPHIC
    00097 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) \
    00098 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::polymorphic_oarchive, className) \
    00099 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::polymorphic_iarchive, className) \
    00100 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_binary_oarchive, className) \
    00101 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_binary_iarchive, className) \
    00102 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_text_oarchive, className) \
    00103 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_text_iarchive, className) \
    00104 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_xml_oarchive, className) \
    00105 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::polymorphic_xml_iarchive, className) \
    00106 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::binary_oarchive, className) \
    00107 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::binary_iarchive, className) \
    00108 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::text_oarchive, className) \
    00109 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::text_iarchive, className) \
    00110 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::xml_oarchive, className) \
    00111 QX_SERIALIZE_IMPLEMENT_ARCHIVE_EMPTY_CPP(boost::archive::xml_iarchive, className)
    00112 // ---
    00113 #define QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) \
    00114 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::polymorphic_oarchive, className) \
    00115 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::polymorphic_iarchive, className) \
    00116 QX_SERIALIZE_ARCHIVE_TEMPLATE_HPP(className)
    00117 #else // _QX_SERIALIZE_POLYMORPHIC
    00118 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) /* Nothing */
    00119 #define QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) /* Nothing */
    00120 #endif // _QX_SERIALIZE_POLYMORPHIC
    00121
    00122 #if _QX_SERIALIZE_BINARY
    00123 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) \
    00124 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_oarchive, className) \
    00125 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_iarchive, className)
    00126 // ---
    00127 #define QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) \
    00128 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_oarchive, className) \
    00129 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_iarchive, className)
    00130 #else // _QX_SERIALIZE_BINARY
    00131 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) /* Nothing */
    00132 #define QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00133 #endif // _QX_SERIALIZE_BINARY
    00134
    00135 #if _QX_SERIALIZE_TEXT
    00136 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) \
    00137 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_oarchive, className) \
    00138 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_iarchive, className)
    00139 // ---
    00140 #define QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) \
    00141 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_oarchive, className) \
    00142 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_iarchive, className)
    00143 #else // _QX_SERIALIZE_TEXT
    00144 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) /* Nothing */
    00145 #define QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) /* Nothing */
    00146 #endif // _QX_SERIALIZE_TEXT
    00147
    00148 #if _QX_SERIALIZE_XML
    00149 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) \
    00150 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_oarchive, className) \
    00151 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_iarchive, className)
    00152 // ---
    00153 #define QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) \
    00154 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_oarchive, className) \
    00155 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_iarchive, className)
    00156 #else // _QX_SERIALIZE_XML
    00157 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) /* Nothing */
    00158 #define QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) /* Nothing */
    00159 #endif // _QX_SERIALIZE_XML
    00160
    00161 #if _QX_SERIALIZE_PORTABLE_BINARY
    00162 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) \
    00163 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(eos::portable_oarchive, className) \
    00164 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(eos::portable_iarchive, className)
    00165 // ---
    00166 #define QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) \
    00167 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, eos::portable_oarchive, className) \
    00168 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, eos::portable_iarchive, className)
    00169 #else // _QX_SERIALIZE_PORTABLE_BINARY
    00170 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) /* Nothing */
    00171 #define QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00172 #endif // _QX_SERIALIZE_PORTABLE_BINARY
    00173
    00174 #if _QX_SERIALIZE_WIDE_BINARY
    00175 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) \
    00176 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_woarchive, className) \
    00177 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::binary_wiarchive, className)
    00178 // ---
    00179 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) \
    00180 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_woarchive, className) \
    00181 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::binary_wiarchive, className)
    00182 #else // _QX_SERIALIZE_WIDE_BINARY
    00183 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) /* Nothing */
    00184 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) /* Nothing */
    00185 #endif // _QX_SERIALIZE_WIDE_BINARY
    00186
    00187 #if _QX_SERIALIZE_WIDE_TEXT
    00188 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) \
    00189 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_woarchive, className) \
    00190 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::text_wiarchive, className)
    00191 // ---
    00192 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) \
    00193 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_woarchive, className) \
    00194 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::text_wiarchive, className)
    00195 #else // _QX_SERIALIZE_WIDE_TEXT
    00196 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) /* Nothing */
    00197 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) /* Nothing */
    00198 #endif // _QX_SERIALIZE_WIDE_TEXT
    00199
    00200 #if _QX_SERIALIZE_WIDE_XML
    00201 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className) \
    00202 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_woarchive, className) \
    00203 QX_SERIALIZE_IMPLEMENT_ARCHIVE_CPP(boost::archive::xml_wiarchive, className)
    00204 // ---
    00205 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className) \
    00206 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_woarchive, className) \
    00207 QX_SERIALIZE_ARCHIVE_HPP(dllImportExport, boost::archive::xml_wiarchive, className)
    00208 #else // _QX_SERIALIZE_WIDE_XML
    00209 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className) /* Nothing */
    00210 #define QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className) /* Nothing */
    00211 #endif // _QX_SERIALIZE_WIDE_XML
    00212
    00213 #define QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_CPP(className) \
    00214 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_POLYMORPHIC_CPP(className) \
    00215 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_BINARY_CPP(className) \
    00216 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_TEXT_CPP(className) \
    00217 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_XML_CPP(className) \
    00218 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_PORTABLE_BINARY_CPP(className) \
    00219 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_BINARY_CPP(className) \
    00220 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_TEXT_CPP(className) \
    00221 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_WIDE_XML_CPP(className)
    00222
    00223 #define QX_SERIALIZE_LIST_ARCHIVE_HPP(dllImportExport, className) \
    00224 QX_SERIALIZE_LIST_ARCHIVE_POLYMORPHIC_HPP(dllImportExport, className) \
    00225 QX_SERIALIZE_LIST_ARCHIVE_BINARY_HPP(dllImportExport, className) \
    00226 QX_SERIALIZE_LIST_ARCHIVE_TEXT_HPP(dllImportExport, className) \
    00227 QX_SERIALIZE_LIST_ARCHIVE_XML_HPP(dllImportExport, className) \
    00228 QX_SERIALIZE_LIST_ARCHIVE_PORTABLE_BINARY_HPP(dllImportExport, className) \
    00229 QX_SERIALIZE_LIST_ARCHIVE_WIDE_BINARY_HPP(dllImportExport, className) \
    00230 QX_SERIALIZE_LIST_ARCHIVE_WIDE_TEXT_HPP(dllImportExport, className) \
    00231 QX_SERIALIZE_LIST_ARCHIVE_WIDE_XML_HPP(dllImportExport, className)
    00232
    00233 #if _QX_WRITE_BOOST_CLASS_EXPORT_IN_HPP_FILE
    00234 #define QX_BOOST_CLASS_EXPORT_HPP(className) BOOST_CLASS_EXPORT_GUID(className, #className)
    00235 #else
    00236 #define QX_BOOST_CLASS_EXPORT_HPP(className) /* Nothing */
    00237 #endif // _QX_WRITE_BOOST_CLASS_EXPORT_IN_HPP_FILE
    00238
    00239 #if _QX_WRITE_BOOST_CLASS_EXPORT_IN_CPP_FILE
    00240 #define QX_BOOST_CLASS_EXPORT_CPP(className) BOOST_CLASS_EXPORT_GUID(className, #className)
    00241 #else
    00242 #define QX_BOOST_CLASS_EXPORT_CPP(className) /* Nothing */
    00243 #endif // _QX_WRITE_BOOST_CLASS_EXPORT_IN_CPP_FILE
    00244
    00245 #define QX_REGISTER_FRIEND_CLASS(className) \
    00246 template <class T> friend void qx::register_class(T & t);
    00247
    00248 #define QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00249 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxDataMemberX< className >) \
    00250 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxSingleton< qx::QxDataMemberX< className > >) \
    00251 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxClass< className >) \
    00252 QX_DLL_EXPORT_TEMPLATE_HPP(class, qx::QxSingleton< qx::QxClass< className > >)
    00253
    00254 #define QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00255 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxDataMemberX< className >) \
    00256 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxSingleton< qx::QxDataMemberX< className > >) \
    00257 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxClass< className >) \
    00258 QX_DLL_EXPORT_TEMPLATE_CPP(class, qx::QxSingleton< qx::QxClass< className > >)
    00259
    00260 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00261 QX_SET_REGISTERED(className) \
    00262 QX_REGISTER_CLASS_NAME(className) \
    00263 QX_REGISTER_BASE_CLASS(className, baseClass) \
    00264 QX_REGISTER_FACTORY_COMPLEX_CLASS_NAME_HPP(className, classNameFormatted) \
    00265 QX_REGISTER_BOOST_SERIALIZE_HELPER_COMPLEX_CLASS_NAME(className, classNameFormatted) \
    00266 QX_BOOST_CLASS_EXPORT_HPP(className) \
    00267 BOOST_CLASS_VERSION(className, version)
    00268
    00269 #define QX_REGISTER_HPP(className, baseClass, version) \
    00270 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, className)
    00271
    00272 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00273 QX_BOOST_CLASS_EXPORT_CPP(className) \
    00274 QX_REGISTER_FACTORY_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00275 QX_REGISTER_BOOST_SERIALIZE_HELPER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00276 QX_SERIALIZE_IMPLEMENT_LIST_ARCHIVE_CPP(className)
    00277
    00278 #define QX_REGISTER_CPP(className) \
    00279 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, className)
    00280
    00281 #ifdef _MSC_VER
    00282 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, classNameFormatted) \
    00283 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00284 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_EXPORT_HELPER, className) \
    00285 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_EXPORT_HELPER, className)
    00286 // ---
    00287 #define QX_REGISTER_HPP_EXPORT_DLL(className, baseClass, version) \
    00288 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, className)
    00289 #else // _MSC_VER
    00290 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, classNameFormatted) \
    00291 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00292 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00293 QX_BOOST_EXPORT_SERIALIZATION_HPP(className) \
    00294 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_EXPORT_HELPER, className) \
    00295 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_EXPORT_HELPER, className)
    00296 // ---
    00297 #define QX_REGISTER_HPP_EXPORT_DLL(className, baseClass, version) \
    00298 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL(className, baseClass, version, className)
    00299 #endif // _MSC_VER
    00300
    00301 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL(className, baseClass, version, classNameFormatted) \
    00302 QX_REGISTER_COMPLEX_CLASS_NAME_HPP(className, baseClass, version, classNameFormatted) \
    00303 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_HPP(className) \
    00304 QX_BOOST_EXPORT_SERIALIZATION_HPP(className) \
    00305 QX_SERIALIZE_LIST_ARCHIVE_HPP(QX_DLL_IMPORT_HELPER, className) \
    00306 QX_REGISTER_CLASS_MAPPING_FCT_HPP(QX_DLL_IMPORT_HELPER, className)
    00307
    00308 #define QX_REGISTER_HPP_IMPORT_DLL(className, baseClass, version) \
    00309 QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL(className, baseClass, version, className)
    00310
    00311 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL(className, classNameFormatted) \
    00312 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00313 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00314 QX_BOOST_EXPORT_SERIALIZATION_CPP(className)
    00315
    00316 #define QX_REGISTER_CPP_EXPORT_DLL(className) \
    00317 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL(className, className)
    00318
    00319 #ifdef _MSC_VER
    00320 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, classNameFormatted) \
    00321 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted)
    00322 // ---
    00323 #define QX_REGISTER_CPP_IMPORT_DLL(className) \
    00324 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, className)
    00325 #else // _MSC_VER
    00326 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, classNameFormatted) \
    00327 QX_REGISTER_COMPLEX_CLASS_NAME_CPP(className, classNameFormatted) \
    00328 QX_DLL_EXPORT_TEMPLATE_QX_CLASS_CPP(className) \
    00329 QX_BOOST_EXPORT_SERIALIZATION_CPP(className)
    00330 // ---
    00331 #define QX_REGISTER_CPP_IMPORT_DLL(className) \
    00332 QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL(className, className)
    00333 #endif // _MSC_VER
    00334
    00335 #define QX_REGISTER_ABSTRACT_CLASS(className) \
    00336 BOOST_SERIALIZATION_ASSUME_ABSTRACT(className) \
    00337 namespace boost { namespace serialization { \
    00338 template<class Archive> \
    00339 inline void load_construct_data(Archive & ar, className * t, const unsigned int file_version) \
    00340 { Q_UNUSED(ar); Q_UNUSED(t); Q_UNUSED(file_version); } \
    00341 } } // namespace boost::serialization
    00342
    00343 /* -- Create your macro (in your precompiled header) replacing "MY_DLL"
    00344 #ifdef _BUILDING_MY_DLL
    00345 #define QX_REGISTER_HPP_MY_DLL QX_REGISTER_HPP_EXPORT_DLL
    00346 #define QX_REGISTER_CPP_MY_DLL QX_REGISTER_CPP_EXPORT_DLL
    00347 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_HPP_EXPORT_DLL
    00348 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_CPP_EXPORT_DLL
    00349 #else
    00350 #define QX_REGISTER_HPP_MY_DLL QX_REGISTER_HPP_IMPORT_DLL
    00351 #define QX_REGISTER_CPP_MY_DLL QX_REGISTER_CPP_IMPORT_DLL
    00352 #define QX_REGISTER_COMPLEX_CLASS_NAME_HPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_HPP_IMPORT_DLL
    00353 #define QX_REGISTER_COMPLEX_CLASS_NAME_CPP_MY_DLL QX_REGISTER_COMPLEX_CLASS_NAME_CPP_IMPORT_DLL
    00354 #endif // _BUILDING_MY_DLL
    00355 */
    00356
    00357 #ifdef _MSC_VER
    00358 #pragma warning(pop)
    00359 #endif // _MSC_VER
    00360
    00361 #endif // _QX_REGISTER_H_

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines