QxOrm  1.5.0
C++ Object Relational Mapping library
QxExportDllBoostArchive.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_BOOST_ARCHIVE_H_
00034 #define _QX_EXPORT_DLL_BOOST_ARCHIVE_H_
00035 
00036 #ifdef _MSC_VER
00037 #pragma once
00038 #endif
00039 
00040 #include <QxCommon/QxConfig.h>
00041 
00042 #if _QX_USE_EXPORT_DLL_BOOST_SERIALIZATION_SINGLETON
00043 #if (! _QX_BUILDING_QX_ORM)
00044 
00045 #include <QxSerialize/boost/QxImportDllBoostArchive.h>
00046 
00047 #if (BOOST_VERSION > 103800)
00048 #define QX_BOOST_EXPORT_ARCHIVE_SERIALIZER_MAP_SINGLETON_HPP(Archive) \
00049 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::archive_serializer_map, Archive)
00050 #else // (BOOST_VERSION > 103800)
00051 #define QX_BOOST_EXPORT_ARCHIVE_SERIALIZER_MAP_SINGLETON_HPP(Archive) /* Nothing */
00052 #endif // (BOOST_VERSION > 103800)
00053 
00054 #if (BOOST_VERSION > 103800)
00055 #define QX_BOOST_EXPORT_ARCHIVE_SERIALIZER_MAP_HPP(ArchiveIn, ArchiveOut) \
00056 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(class, boost::archive::detail::archive_serializer_map, ArchiveIn) \
00057 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(class, boost::archive::detail::archive_serializer_map, ArchiveOut)
00058 #else // (BOOST_VERSION > 103800)
00059 #define QX_BOOST_EXPORT_ARCHIVE_SERIALIZER_MAP_HPP(ArchiveIn, ArchiveOut) \
00060 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(class, boost::archive::detail::archive_pointer_iserializer, ArchiveIn) \
00061 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(class, boost::archive::detail::archive_pointer_oserializer, ArchiveOut)
00062 #endif // (BOOST_VERSION > 103800)
00063 
00064 #if (BOOST_VERSION >= 104100)
00065 #define QX_BOOST_EXPORT_ARCHIVE_SAVE_POINTER_TYPE_HPP(Archive) \
00066 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(struct, boost::archive::detail::save_pointer_type, Archive) \
00067 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::save_pointer_type, Archive)
00068 #else // (BOOST_VERSION >= 104100)
00069 #define QX_BOOST_EXPORT_ARCHIVE_SAVE_POINTER_TYPE_HPP(Archive) /* Nothing */
00070 #endif // (BOOST_VERSION >= 104100)
00071 
00072 #if (BOOST_VERSION >= 104100)
00073 #define QX_BOOST_EXPORT_ARCHIVE_SAVE_NON_POINTER_TYPE_HPP(Archive) \
00074 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(struct, boost::archive::detail::save_non_pointer_type, Archive) \
00075 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::save_non_pointer_type, Archive)
00076 #else // (BOOST_VERSION >= 104100)
00077 #define QX_BOOST_EXPORT_ARCHIVE_SAVE_NON_POINTER_TYPE_HPP(Archive) /* Nothing */
00078 #endif // (BOOST_VERSION >= 104100)
00079 
00080 #if (BOOST_VERSION >= 104100)
00081 #define QX_BOOST_EXPORT_ARCHIVE_SAVE_ENUM_TYPE_HPP(Archive) \
00082 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(struct, boost::archive::detail::save_enum_type, Archive) \
00083 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::save_enum_type, Archive)
00084 #else // (BOOST_VERSION >= 104100)
00085 #define QX_BOOST_EXPORT_ARCHIVE_SAVE_ENUM_TYPE_HPP(Archive) /* Nothing */
00086 #endif // (BOOST_VERSION >= 104100)
00087 
00088 #if (BOOST_VERSION >= 104100)
00089 #define QX_BOOST_EXPORT_ARCHIVE_SAVE_ARRAY_TYPE_HPP(Archive) \
00090 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(struct, boost::archive::detail::save_array_type, Archive) \
00091 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::save_array_type, Archive)
00092 #else // (BOOST_VERSION >= 104100)
00093 #define QX_BOOST_EXPORT_ARCHIVE_SAVE_ARRAY_TYPE_HPP(Archive) /* Nothing */
00094 #endif // (BOOST_VERSION >= 104100)
00095 
00096 #if (BOOST_VERSION >= 104100)
00097 #define QX_BOOST_EXPORT_ARCHIVE_LOAD_POINTER_TYPE_HPP(Archive) \
00098 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(struct, boost::archive::detail::load_pointer_type, Archive) \
00099 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::load_pointer_type, Archive)
00100 #else // (BOOST_VERSION >= 104100)
00101 #define QX_BOOST_EXPORT_ARCHIVE_LOAD_POINTER_TYPE_HPP(Archive) /* Nothing */
00102 #endif // (BOOST_VERSION >= 104100)
00103 
00104 #if (BOOST_VERSION >= 104100)
00105 #define QX_BOOST_EXPORT_ARCHIVE_LOAD_NON_POINTER_TYPE_HPP(Archive) \
00106 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(struct, boost::archive::detail::load_non_pointer_type, Archive) \
00107 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::load_non_pointer_type, Archive)
00108 #else // (BOOST_VERSION >= 104100)
00109 #define QX_BOOST_EXPORT_ARCHIVE_LOAD_NON_POINTER_TYPE_HPP(Archive) /* Nothing */
00110 #endif // (BOOST_VERSION >= 104100)
00111 
00112 #if (BOOST_VERSION >= 104100)
00113 #define QX_BOOST_EXPORT_ARCHIVE_LOAD_ENUM_TYPE_HPP(Archive) \
00114 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(struct, boost::archive::detail::load_enum_type, Archive) \
00115 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::load_enum_type, Archive)
00116 #else // (BOOST_VERSION >= 104100)
00117 #define QX_BOOST_EXPORT_ARCHIVE_LOAD_ENUM_TYPE_HPP(Archive) /* Nothing */
00118 #endif // (BOOST_VERSION >= 104100)
00119 
00120 #if (BOOST_VERSION >= 104100)
00121 #define QX_BOOST_EXPORT_ARCHIVE_LOAD_ARRAY_TYPE_HPP(Archive) \
00122 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(struct, boost::archive::detail::load_array_type, Archive) \
00123 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::load_array_type, Archive)
00124 #else // (BOOST_VERSION >= 104100)
00125 #define QX_BOOST_EXPORT_ARCHIVE_LOAD_ARRAY_TYPE_HPP(Archive) /* Nothing */
00126 #endif // (BOOST_VERSION >= 104100)
00127 
00128 #define QX_BOOST_EXPORT_ARCHIVE_INTERFACE_IARCHIVE_HPP(Archive) \
00129 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(class, boost::archive::detail::interface_iarchive, Archive) \
00130 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::interface_iarchive, Archive)
00131 
00132 #define QX_BOOST_EXPORT_ARCHIVE_INTERFACE_OARCHIVE_HPP(Archive) \
00133 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(class, boost::archive::detail::interface_oarchive, Archive) \
00134 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::interface_oarchive, Archive)
00135 
00136 #define QX_BOOST_EXPORT_ARCHIVE_COMMON_IARCHIVE_HPP(Archive) \
00137 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(class, boost::archive::detail::common_iarchive, Archive) \
00138 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::common_iarchive, Archive)
00139 
00140 #define QX_BOOST_EXPORT_ARCHIVE_COMMON_OARCHIVE_HPP(Archive) \
00141 QX_DLL_EXPORT_TEMPLATE_T_P1_HPP(class, boost::archive::detail::common_oarchive, Archive) \
00142 QX_DLL_EXPORT_TEMPLATE_T_U_P1_HPP(class, boost::serialization::singleton, boost::archive::detail::common_oarchive, Archive)
00143 
00144 #define QX_BOOST_EXPORT_ARCHIVE_INTERFACE_HPP(ArchiveIn, ArchiveOut) \
00145 QX_BOOST_EXPORT_ARCHIVE_INTERFACE_IARCHIVE_HPP(ArchiveIn) \
00146 QX_BOOST_EXPORT_ARCHIVE_INTERFACE_OARCHIVE_HPP(ArchiveOut)
00147 
00148 #define QX_BOOST_EXPORT_ARCHIVE_COMMON_HPP(ArchiveIn, ArchiveOut) \
00149 QX_BOOST_EXPORT_ARCHIVE_COMMON_IARCHIVE_HPP(ArchiveIn) \
00150 QX_BOOST_EXPORT_ARCHIVE_COMMON_OARCHIVE_HPP(ArchiveOut)
00151 
00152 #define QX_BOOST_EXPORT_ARCHIVE_HPP(ArchiveIn, ArchiveOut) \
00153 QX_BOOST_EXPORT_ARCHIVE_SERIALIZER_MAP_SINGLETON_HPP(ArchiveIn) \
00154 QX_BOOST_EXPORT_ARCHIVE_SERIALIZER_MAP_SINGLETON_HPP(ArchiveOut) \
00155 QX_BOOST_EXPORT_ARCHIVE_SAVE_NON_POINTER_TYPE_HPP(ArchiveIn) \
00156 QX_BOOST_EXPORT_ARCHIVE_SAVE_NON_POINTER_TYPE_HPP(ArchiveOut) \
00157 QX_BOOST_EXPORT_ARCHIVE_SAVE_POINTER_TYPE_HPP(ArchiveIn) \
00158 QX_BOOST_EXPORT_ARCHIVE_SAVE_POINTER_TYPE_HPP(ArchiveOut) \
00159 QX_BOOST_EXPORT_ARCHIVE_SAVE_ENUM_TYPE_HPP(ArchiveIn) \
00160 QX_BOOST_EXPORT_ARCHIVE_SAVE_ENUM_TYPE_HPP(ArchiveOut) \
00161 QX_BOOST_EXPORT_ARCHIVE_SAVE_ARRAY_TYPE_HPP(ArchiveIn) \
00162 QX_BOOST_EXPORT_ARCHIVE_SAVE_ARRAY_TYPE_HPP(ArchiveOut) \
00163 QX_BOOST_EXPORT_ARCHIVE_LOAD_NON_POINTER_TYPE_HPP(ArchiveIn) \
00164 QX_BOOST_EXPORT_ARCHIVE_LOAD_NON_POINTER_TYPE_HPP(ArchiveOut) \
00165 QX_BOOST_EXPORT_ARCHIVE_LOAD_POINTER_TYPE_HPP(ArchiveIn) \
00166 QX_BOOST_EXPORT_ARCHIVE_LOAD_POINTER_TYPE_HPP(ArchiveOut) \
00167 QX_BOOST_EXPORT_ARCHIVE_LOAD_ENUM_TYPE_HPP(ArchiveIn) \
00168 QX_BOOST_EXPORT_ARCHIVE_LOAD_ENUM_TYPE_HPP(ArchiveOut) \
00169 QX_BOOST_EXPORT_ARCHIVE_LOAD_ARRAY_TYPE_HPP(ArchiveIn) \
00170 QX_BOOST_EXPORT_ARCHIVE_LOAD_ARRAY_TYPE_HPP(ArchiveOut)
00171 
00172 #define QX_BOOST_EXPORT_ARCHIVE_ALL_HPP(ArchiveIn, ArchiveOut) \
00173 QX_BOOST_EXPORT_ARCHIVE_HPP(ArchiveIn, ArchiveOut) \
00174 QX_BOOST_EXPORT_ARCHIVE_INTERFACE_HPP(ArchiveIn, ArchiveOut) \
00175 QX_BOOST_EXPORT_ARCHIVE_COMMON_HPP(ArchiveIn, ArchiveOut)
00176 
00177 #if _QX_SERIALIZE_POLYMORPHIC
00178    QX_BOOST_EXPORT_ARCHIVE_HPP(boost::archive::polymorphic_iarchive, boost::archive::polymorphic_oarchive)
00179    QX_BOOST_EXPORT_ARCHIVE_HPP(boost::archive::polymorphic_binary_iarchive, boost::archive::polymorphic_binary_oarchive)
00180    QX_BOOST_EXPORT_ARCHIVE_HPP(boost::archive::polymorphic_text_iarchive, boost::archive::polymorphic_text_oarchive)
00181    QX_BOOST_EXPORT_ARCHIVE_HPP(boost::archive::polymorphic_xml_iarchive, boost::archive::polymorphic_xml_oarchive)
00182 #endif // _QX_SERIALIZE_POLYMORPHIC
00183 
00184 #if _QX_SERIALIZE_BINARY
00185    QX_BOOST_EXPORT_ARCHIVE_ALL_HPP(boost::archive::binary_iarchive, boost::archive::binary_oarchive)
00186 #endif // _QX_SERIALIZE_BINARY
00187 
00188 #if _QX_SERIALIZE_TEXT
00189    QX_BOOST_EXPORT_ARCHIVE_ALL_HPP(boost::archive::text_iarchive, boost::archive::text_oarchive)
00190 #endif // _QX_SERIALIZE_TEXT
00191 
00192 #if _QX_SERIALIZE_XML
00193    QX_BOOST_EXPORT_ARCHIVE_ALL_HPP(boost::archive::xml_iarchive, boost::archive::xml_oarchive)
00194 #endif // _QX_SERIALIZE_XML
00195 
00196 #if _QX_SERIALIZE_PORTABLE_BINARY
00197    QX_BOOST_EXPORT_ARCHIVE_SERIALIZER_MAP_HPP(eos::portable_iarchive, eos::portable_oarchive)
00198    QX_BOOST_EXPORT_ARCHIVE_ALL_HPP(eos::portable_iarchive, eos::portable_oarchive)
00199 #endif // _QX_SERIALIZE_PORTABLE_BINARY
00200 
00201 #if _QX_SERIALIZE_WIDE_BINARY
00202    QX_BOOST_EXPORT_ARCHIVE_ALL_HPP(boost::archive::binary_wiarchive, boost::archive::binary_woarchive)
00203 #endif // _QX_SERIALIZE_WIDE_BINARY
00204 
00205 #if _QX_SERIALIZE_WIDE_TEXT
00206    QX_BOOST_EXPORT_ARCHIVE_ALL_HPP(boost::archive::text_wiarchive, boost::archive::text_woarchive)
00207 #endif // _QX_SERIALIZE_WIDE_TEXT
00208 
00209 #if _QX_SERIALIZE_WIDE_XML
00210    QX_BOOST_EXPORT_ARCHIVE_ALL_HPP(boost::archive::xml_wiarchive, boost::archive::xml_woarchive)
00211 #endif // _QX_SERIALIZE_WIDE_XML
00212 
00213 #if _QX_USE_SERIALIZE_POLYMORPHIC_PATCH
00214 namespace boost { namespace archive {
00215 template <>
00216 inline void xml_iarchive_impl<naked_xml_iarchive>::load(std::basic_string< unsigned short, std::char_traits<unsigned short>, std::allocator<unsigned short> > & s)
00217 { Q_UNUSED(s); qAssert(false); }
00218 template <>
00219 inline void xml_oarchive_impl<xml_oarchive>::save(std::basic_string< unsigned short, std::char_traits<unsigned short>, std::allocator<unsigned short> > const & s)
00220 { Q_UNUSED(s); qAssert(false); }
00221 } } // namespace boost::archive
00222 #endif // _QX_USE_SERIALIZE_POLYMORPHIC_PATCH
00223 
00224 #endif // (! _QX_BUILDING_QX_ORM)
00225 #endif // _QX_USE_EXPORT_DLL_BOOST_SERIALIZATION_SINGLETON
00226 #endif // _QX_EXPORT_DLL_BOOST_ARCHIVE_H_
00227 #endif // _QX_ENABLE_BOOST_SERIALIZATION