QxOrm  1.4.5
C++ Object Relational Mapping library
QxExportDllMacroCpp.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 #ifdef _QX_ENABLE_BOOST_SERIALIZATION
00033 #ifndef _QX_EXPORT_DLL_MACRO_CPP_H_
00034 #define _QX_EXPORT_DLL_MACRO_CPP_H_
00035 
00036 #ifdef _MSC_VER
00037 #pragma once
00038 #endif
00039 
00040 #include <QxCommon/QxConfig.h>
00041 
00042 #include <QxSerialize/boost/QxExportDllMacroHpp.h>
00043 
00044 #if _QX_USE_EXPORT_DLL_BOOST_SERIALIZATION_SINGLETON
00045 
00046 #if (BOOST_VERSION < 106600)
00047 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_ISERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00048 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::archive::detail::pointer_iserializer, ArchiveIn, T) \
00049 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::pointer_iserializer, ArchiveIn, T)
00050 
00051 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_OSERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00052 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::archive::detail::pointer_oserializer, ArchiveOut, T) \
00053 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::pointer_oserializer, ArchiveOut, T)
00054 #else // (BOOST_VERSION < 106600)
00055 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_ISERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00056 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::archive::detail::pointer_iserializer, ArchiveIn, T)
00057 
00058 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_OSERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00059 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::archive::detail::pointer_oserializer, ArchiveOut, T)
00060 #endif // (BOOST_VERSION < 106600)
00061 
00062 #if _QX_SUPPORT_BOOST_SERIALIZE_SHARED_PTR_132
00063 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_ISERIALIZER_BOOST_132_HELPER_CPP(ArchiveIn, ArchiveOut, T) \
00064 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::archive::detail::pointer_iserializer, ArchiveIn, QX_BOOST_132_SHARED_PTR_HELPER(T)) \
00065 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::pointer_iserializer, ArchiveIn, QX_BOOST_132_SHARED_PTR_HELPER(T))
00066 #else // _QX_SUPPORT_BOOST_SERIALIZE_SHARED_PTR_132
00067 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_ISERIALIZER_BOOST_132_HELPER_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00068 #endif // _QX_SUPPORT_BOOST_SERIALIZE_SHARED_PTR_132
00069 
00070 #if _QX_SUPPORT_BOOST_SERIALIZE_SHARED_PTR_132
00071 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_OSERIALIZER_BOOST_132_HELPER_CPP(ArchiveIn, ArchiveOut, T) \
00072 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::archive::detail::pointer_oserializer, ArchiveOut, QX_BOOST_132_SHARED_PTR_HELPER(T)) \
00073 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::pointer_oserializer, ArchiveOut, QX_BOOST_132_SHARED_PTR_HELPER(T))
00074 #else // _QX_SUPPORT_BOOST_SERIALIZE_SHARED_PTR_132
00075 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_OSERIALIZER_BOOST_132_HELPER_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00076 #endif // _QX_SUPPORT_BOOST_SERIALIZE_SHARED_PTR_132
00077 
00078 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_ISERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00079 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::archive::detail::iserializer, ArchiveIn, T) \
00080 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::iserializer, ArchiveIn, T)
00081 
00082 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_OSERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00083 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::archive::detail::oserializer, ArchiveOut, T) \
00084 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::oserializer, ArchiveOut, T)
00085 
00086 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_EXTENDED_TYPE_ID_CPP(T) \
00087 QX_DLL_EXPORT_TEMPLATE_T_P1_CPP(class, boost::serialization::extended_type_info_typeid, T) \
00088 QX_DLL_EXPORT_TEMPLATE_T_U_P1_CPP(class, boost::serialization::singleton, boost::serialization::extended_type_info_typeid, T)
00089 
00090 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_VOID_CAST_PRIMITIVE_CPP(T) \
00091 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(class, boost::serialization::void_cast_detail::void_caster_primitive, T, QX_GET_BASE_CLASS_2(T)) \
00092 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::serialization::void_cast_detail::void_caster_primitive, T, QX_GET_BASE_CLASS_2(T))
00093 
00094 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_TYPE_INFO_IMPL_CPP(T) \
00095 QX_DLL_EXPORT_TEMPLATE_T_P1_CPP(struct, boost::serialization::type_info_implementation, T) \
00096 QX_DLL_EXPORT_TEMPLATE_T_U_P1_CPP(class, boost::serialization::singleton, boost::serialization::type_info_implementation, T)
00097 
00098 #if (BOOST_VERSION < 104100)
00099 #define QX_BOOST_EXPORT_SERIALIZATION_SAVE_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00100 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(struct, boost::archive::detail::save_pointer_type, ArchiveOut, T *) \
00101 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::save_pointer_type, ArchiveOut, T *)
00102 #else // (BOOST_VERSION < 104100)
00103 #define QX_BOOST_EXPORT_SERIALIZATION_SAVE_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00104 #endif // (BOOST_VERSION < 104100)
00105 
00106 #if (BOOST_VERSION < 104100)
00107 #define QX_BOOST_EXPORT_SERIALIZATION_SAVE_NON_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00108 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(struct, boost::archive::detail::save_non_pointer_type, ArchiveOut, T) \
00109 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::save_non_pointer_type, ArchiveOut, T)
00110 #else // (BOOST_VERSION < 104100)
00111 #define QX_BOOST_EXPORT_SERIALIZATION_SAVE_NON_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00112 #endif // (BOOST_VERSION < 104100)
00113 
00114 #if (BOOST_VERSION < 104100)
00115 #define QX_BOOST_EXPORT_SERIALIZATION_SAVE_ENUM_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00116 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(struct, boost::archive::detail::save_enum_type, ArchiveOut, T) \
00117 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::save_enum_type, ArchiveOut, T)
00118 #else // (BOOST_VERSION < 104100)
00119 #define QX_BOOST_EXPORT_SERIALIZATION_SAVE_ENUM_TYPE_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00120 #endif // (BOOST_VERSION < 104100)
00121 
00122 #if (BOOST_VERSION < 104100)
00123 #define QX_BOOST_EXPORT_SERIALIZATION_SAVE_ARRAY_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00124 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(struct, boost::archive::detail::save_array_type, ArchiveOut, T) \
00125 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::save_array_type, ArchiveOut, T)
00126 #else // (BOOST_VERSION < 104100)
00127 #define QX_BOOST_EXPORT_SERIALIZATION_SAVE_ARRAY_TYPE_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00128 #endif // (BOOST_VERSION < 104100)
00129 
00130 #if (BOOST_VERSION < 104100)
00131 #define QX_BOOST_EXPORT_SERIALIZATION_LOAD_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00132 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(struct, boost::archive::detail::load_pointer_type, ArchiveIn, T *) \
00133 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::load_pointer_type, ArchiveIn, T *)
00134 #else // (BOOST_VERSION < 104100)
00135 #define QX_BOOST_EXPORT_SERIALIZATION_LOAD_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00136 #endif // (BOOST_VERSION < 104100)
00137 
00138 #if (BOOST_VERSION < 104100)
00139 #define QX_BOOST_EXPORT_SERIALIZATION_LOAD_NON_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00140 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(struct, boost::archive::detail::load_non_pointer_type, ArchiveIn, T) \
00141 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::load_non_pointer_type, ArchiveIn, T)
00142 #else // (BOOST_VERSION < 104100)
00143 #define QX_BOOST_EXPORT_SERIALIZATION_LOAD_NON_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00144 #endif // (BOOST_VERSION < 104100)
00145 
00146 #if (BOOST_VERSION < 104100)
00147 #define QX_BOOST_EXPORT_SERIALIZATION_LOAD_ENUM_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00148 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(struct, boost::archive::detail::load_enum_type, ArchiveIn, T) \
00149 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::load_enum_type, ArchiveIn, T)
00150 #else // (BOOST_VERSION < 104100)
00151 #define QX_BOOST_EXPORT_SERIALIZATION_LOAD_ENUM_TYPE_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00152 #endif // (BOOST_VERSION < 104100)
00153 
00154 #if (BOOST_VERSION < 104100)
00155 #define QX_BOOST_EXPORT_SERIALIZATION_LOAD_ARRAY_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00156 QX_DLL_EXPORT_TEMPLATE_T_P1_P2_CPP(struct, boost::archive::detail::load_array_type, ArchiveIn, T) \
00157 QX_DLL_EXPORT_TEMPLATE_T_U_P1_P2_CPP(class, boost::serialization::singleton, boost::archive::detail::load_array_type, ArchiveIn, T)
00158 #else // (BOOST_VERSION < 104100)
00159 #define QX_BOOST_EXPORT_SERIALIZATION_LOAD_ARRAY_TYPE_CPP(ArchiveIn, ArchiveOut, T) /* Nothing */
00160 #endif // (BOOST_VERSION < 104100)
00161 
00162 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(ArchiveIn, ArchiveOut, T) \
00163 QX_BOOST_EXPORT_SERIALIZATION_IMPL_ISERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00164 QX_BOOST_EXPORT_SERIALIZATION_IMPL_OSERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00165 QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_ISERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00166 QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_OSERIALIZER_CPP(ArchiveIn, ArchiveOut, T) \
00167 QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_ISERIALIZER_BOOST_132_HELPER_CPP(ArchiveIn, ArchiveOut, T) \
00168 QX_BOOST_EXPORT_SERIALIZATION_IMPL_POINTER_OSERIALIZER_BOOST_132_HELPER_CPP(ArchiveIn, ArchiveOut, T) \
00169 QX_BOOST_EXPORT_SERIALIZATION_SAVE_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T) \
00170 QX_BOOST_EXPORT_SERIALIZATION_LOAD_POINTER_TYPE_CPP(ArchiveIn, ArchiveOut, T)
00171 
00172 #define QX_BOOST_EXPORT_SERIALIZATION_IMPL_CPP(T) \
00173 QX_BOOST_EXPORT_SERIALIZATION_IMPL_EXTENDED_TYPE_ID_CPP(T) \
00174 /*
00175 QX_BOOST_EXPORT_SERIALIZATION_IMPL_VOID_CAST_PRIMITIVE_CPP(T) \
00176 QX_BOOST_EXPORT_SERIALIZATION_IMPL_TYPE_INFO_IMPL_CPP(T)
00177 */
00178 
00179 #if _QX_SERIALIZE_POLYMORPHIC
00180 #define QX_BOOST_EXPORT_SERIALIZATION_POLYMORPHIC_CPP(T) \
00181 QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(boost::archive::polymorphic_iarchive, boost::archive::polymorphic_oarchive, T)
00182 #else // _QX_SERIALIZE_POLYMORPHIC
00183 #define QX_BOOST_EXPORT_SERIALIZATION_POLYMORPHIC_CPP(T) /* Nothing */
00184 #endif // _QX_SERIALIZE_POLYMORPHIC
00185 
00186 #if _QX_SERIALIZE_BINARY
00187 #define QX_BOOST_EXPORT_SERIALIZATION_BINARY_CPP(T) \
00188 QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(boost::archive::binary_iarchive, boost::archive::binary_oarchive, T)
00189 #else // _QX_SERIALIZE_BINARY
00190 #define QX_BOOST_EXPORT_SERIALIZATION_BINARY_CPP(T) /* Nothing */
00191 #endif // _QX_SERIALIZE_BINARY
00192 
00193 #if _QX_SERIALIZE_TEXT
00194 #define QX_BOOST_EXPORT_SERIALIZATION_TEXT_CPP(T) \
00195 QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(boost::archive::text_iarchive, boost::archive::text_oarchive, T)
00196 #else // _QX_SERIALIZE_TEXT
00197 #define QX_BOOST_EXPORT_SERIALIZATION_TEXT_CPP(T) /* Nothing */
00198 #endif // _QX_SERIALIZE_TEXT
00199 
00200 #if _QX_SERIALIZE_XML
00201 #define QX_BOOST_EXPORT_SERIALIZATION_XML_CPP(T) \
00202 QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(boost::archive::xml_iarchive, boost::archive::xml_oarchive, T)
00203 #else // _QX_SERIALIZE_XML
00204 #define QX_BOOST_EXPORT_SERIALIZATION_XML_CPP(T) /* Nothing */
00205 #endif // _QX_SERIALIZE_XML
00206 
00207 #if _QX_SERIALIZE_PORTABLE_BINARY
00208 #define QX_BOOST_EXPORT_SERIALIZATION_PORTABLE_BINARY_CPP(T) \
00209 QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(eos::portable_iarchive, eos::portable_oarchive, T)
00210 #else // _QX_SERIALIZE_PORTABLE_BINARY
00211 #define QX_BOOST_EXPORT_SERIALIZATION_PORTABLE_BINARY_CPP(T) /* Nothing */
00212 #endif // _QX_SERIALIZE_PORTABLE_BINARY
00213 
00214 #if _QX_SERIALIZE_WIDE_BINARY
00215 #define QX_BOOST_EXPORT_SERIALIZATION_WIDE_BINARY_CPP(T) \
00216 QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(boost::archive::binary_wiarchive, boost::archive::binary_woarchive, T)
00217 #else // _QX_SERIALIZE_WIDE_BINARY
00218 #define QX_BOOST_EXPORT_SERIALIZATION_WIDE_BINARY_CPP(T) /* Nothing */
00219 #endif // _QX_SERIALIZE_WIDE_BINARY
00220 
00221 #if _QX_SERIALIZE_WIDE_TEXT
00222 #define QX_BOOST_EXPORT_SERIALIZATION_WIDE_TEXT_CPP(T) \
00223 QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(boost::archive::text_wiarchive, boost::archive::text_woarchive, T)
00224 #else // _QX_SERIALIZE_WIDE_TEXT
00225 #define QX_BOOST_EXPORT_SERIALIZATION_WIDE_TEXT_CPP(T) /* Nothing */
00226 #endif // _QX_SERIALIZE_WIDE_TEXT
00227 
00228 #if _QX_SERIALIZE_WIDE_XML
00229 #define QX_BOOST_EXPORT_SERIALIZATION_WIDE_XML_CPP(T) \
00230 QX_BOOST_EXPORT_SERIALIZATION_IMPL_WITH_ARCHIVE_CPP(boost::archive::xml_wiarchive, boost::archive::xml_woarchive, T)
00231 #else // _QX_SERIALIZE_WIDE_XML
00232 #define QX_BOOST_EXPORT_SERIALIZATION_WIDE_XML_CPP(T) /* Nothing */
00233 #endif // _QX_SERIALIZE_WIDE_XML
00234 
00235 #define QX_BOOST_EXPORT_SERIALIZATION_CPP(T) \
00236 QX_BOOST_EXPORT_SERIALIZATION_IMPL_CPP(T) \
00237 QX_BOOST_EXPORT_SERIALIZATION_POLYMORPHIC_CPP(T) \
00238 QX_BOOST_EXPORT_SERIALIZATION_BINARY_CPP(T) \
00239 QX_BOOST_EXPORT_SERIALIZATION_TEXT_CPP(T) \
00240 QX_BOOST_EXPORT_SERIALIZATION_XML_CPP(T) \
00241 QX_BOOST_EXPORT_SERIALIZATION_PORTABLE_BINARY_CPP(T) \
00242 QX_BOOST_EXPORT_SERIALIZATION_WIDE_BINARY_CPP(T) \
00243 QX_BOOST_EXPORT_SERIALIZATION_WIDE_TEXT_CPP(T) \
00244 QX_BOOST_EXPORT_SERIALIZATION_WIDE_XML_CPP(T)
00245 
00246 #else // _QX_USE_EXPORT_DLL_BOOST_SERIALIZATION_SINGLETON
00247 
00248 #define QX_BOOST_EXPORT_SERIALIZATION_CPP(T) /* Nothing */
00249 
00250 #endif // _QX_USE_EXPORT_DLL_BOOST_SERIALIZATION_SINGLETON
00251 #endif // _QX_EXPORT_DLL_MACRO_CPP_H_
00252 #endif // _QX_ENABLE_BOOST_SERIALIZATION