| QxOrm 1.4.6 C++ Object Relational Mapping library

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

- File List
- File Members

QxSerializeInclude.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_SERIALIZE_INCLUDE_H_
    00034 #define _QX_SERIALIZE_INCLUDE_H_
    00035
    00036 #ifdef _MSC_VER
    00037 #pragma once
    00038 #endif
    00039
    00040 #include <QxCommon/QxConfig.h>
    00041
    00042 #ifdef _MSC_VER
    00043 #pragma warning(push)
    00044 #pragma warning(disable:4189)
    00045 #pragma warning(disable:4996)
    00046 #endif // _MSC_VER
    00047
    00048 #if _QX_SERIALIZE_POLYMORPHIC
    00049 #include <boost/archive/polymorphic_iarchive.hpp>
    00050 #include <boost/archive/polymorphic_oarchive.hpp>
    00051 #include <boost/archive/polymorphic_binary_iarchive.hpp>
    00052 #include <boost/archive/polymorphic_binary_oarchive.hpp>
    00053 #include <boost/archive/polymorphic_text_iarchive.hpp>
    00054 #include <boost/archive/polymorphic_text_oarchive.hpp>
    00055 #include <boost/archive/polymorphic_xml_iarchive.hpp>
    00056 #include <boost/archive/polymorphic_xml_oarchive.hpp>
    00057 #endif // _QX_SERIALIZE_POLYMORPHIC
    00058
    00059 #if _QX_SERIALIZE_BINARY
    00060 #include <boost/archive/binary_iarchive.hpp>
    00061 #include <boost/archive/binary_oarchive.hpp>
    00062 #endif // _QX_SERIALIZE_BINARY
    00063
    00064 #if _QX_SERIALIZE_TEXT
    00065 #include <boost/archive/text_iarchive.hpp>
    00066 #include <boost/archive/text_oarchive.hpp>
    00067 #endif // _QX_SERIALIZE_TEXT
    00068
    00069 #if _QX_SERIALIZE_XML
    00070 #include <boost/archive/xml_iarchive.hpp>
    00071 #include <boost/archive/xml_oarchive.hpp>
    00072 #endif // _QX_SERIALIZE_XML
    00073
    00074 #if _QX_SERIALIZE_WIDE_BINARY
    00075 #include <boost/archive/binary_wiarchive.hpp>
    00076 #include <boost/archive/binary_woarchive.hpp>
    00077 #endif // _QX_SERIALIZE_WIDE_BINARY
    00078
    00079 #if _QX_SERIALIZE_WIDE_TEXT
    00080 #include <boost/archive/text_wiarchive.hpp>
    00081 #include <boost/archive/text_woarchive.hpp>
    00082 #endif // _QX_SERIALIZE_WIDE_TEXT
    00083
    00084 #if _QX_SERIALIZE_WIDE_XML
    00085 #include <boost/archive/xml_wiarchive.hpp>
    00086 #include <boost/archive/xml_woarchive.hpp>
    00087 #endif // _QX_SERIALIZE_WIDE_XML
    00088
    00089 #if _QX_SERIALIZE_PORTABLE_BINARY
    00090 #include <QxSerialize/boost/portable_binary/portable_iarchive.hpp>
    00091 #include <QxSerialize/boost/portable_binary/portable_oarchive.hpp>
    00092 #endif // _QX_SERIALIZE_PORTABLE_BINARY
    00093
    00094 #ifndef _QX_BOOST_ARCHIVE_SERIALIZER_IMPL_DEFINED_
    00095 #define _QX_BOOST_ARCHIVE_SERIALIZER_IMPL_DEFINED_
    00096 #if (BOOST_VERSION > 103800)
    00097 #include <boost/archive/impl/archive_serializer_map.ipp>
    00098 #else // (BOOST_VERSION > 103800)
    00099 #include <boost/archive/impl/archive_pointer_oserializer.ipp>
    00100 #include <boost/archive/impl/archive_pointer_iserializer.ipp>
    00101 #endif // (BOOST_VERSION > 103800)
    00102 #include <boost/archive/impl/basic_binary_oprimitive.ipp>
    00103 #include <boost/archive/impl/basic_binary_iprimitive.ipp>
    00104 #include <boost/archive/impl/basic_binary_oarchive.ipp>
    00105 #include <boost/archive/impl/basic_binary_iarchive.ipp>
    00106 #if _QX_SERIALIZE_TEXT
    00107 #include <boost/archive/impl/basic_text_oprimitive.ipp>
    00108 #include <boost/archive/impl/basic_text_iprimitive.ipp>
    00109 #include <boost/archive/impl/basic_text_oarchive.ipp>
    00110 #include <boost/archive/impl/basic_text_iarchive.ipp>
    00111 #endif // _QX_SERIALIZE_TEXT
    00112 #if (BOOST_VERSION > 103800)
    00113 #else // (BOOST_VERSION > 103800)
    00114 #if _QX_INCLUDE_BOOST_SERIALIZE_ARCHIVE_IMPL_IPP
    00115 #if _QX_SERIALIZE_TEXT
    00116 #include <boost/archive/impl/text_oarchive_impl.ipp>
    00117 #include <boost/archive/impl/text_iarchive_impl.ipp>
    00118 #endif // _QX_SERIALIZE_TEXT
    00119 #if _QX_SERIALIZE_XML
    00120 #include <boost/archive/impl/xml_oarchive_impl.ipp>
    00121 #include <boost/archive/impl/xml_iarchive_impl.ipp>
    00122 #endif // _QX_SERIALIZE_XML
    00123 #if _QX_SERIALIZE_WIDE_TEXT
    00124 #include <boost/archive/impl/text_woarchive_impl.ipp>
    00125 #include <boost/archive/impl/text_wiarchive_impl.ipp>
    00126 #endif // _QX_SERIALIZE_WIDE_TEXT
    00127 #if _QX_SERIALIZE_WIDE_XML
    00128 #include <boost/archive/impl/xml_woarchive_impl.ipp>
    00129 #include <boost/archive/impl/xml_wiarchive_impl.ipp>
    00130 #endif // _QX_SERIALIZE_WIDE_XML
    00131 #endif // _QX_INCLUDE_BOOST_SERIALIZE_ARCHIVE_IMPL_IPP
    00132 #endif // (BOOST_VERSION > 103800)
    00133 #endif // _QX_BOOST_ARCHIVE_SERIALIZER_IMPL_DEFINED_
    00134
    00135 #ifdef _MSC_VER
    00136 #pragma warning(pop)
    00137 #endif // _MSC_VER
    00138
    00139 #ifndef QX_DEFAULT_ARCHIVE_INPUT // && QX_DEFAULT_ARCHIVE_OUTPUT
    00140 #if _QX_SERIALIZE_POLYMORPHIC
    00141 #define QX_DEFAULT_ARCHIVE_INPUT boost::archive::polymorphic_binary_iarchive
    00142 #define QX_DEFAULT_ARCHIVE_OUTPUT boost::archive::polymorphic_binary_oarchive
    00143 #elif _QX_SERIALIZE_BINARY
    00144 #define QX_DEFAULT_ARCHIVE_INPUT boost::archive::binary_iarchive
    00145 #define QX_DEFAULT_ARCHIVE_OUTPUT boost::archive::binary_oarchive
    00146 #elif _QX_SERIALIZE_TEXT
    00147 #define QX_DEFAULT_ARCHIVE_INPUT boost::archive::text_iarchive
    00148 #define QX_DEFAULT_ARCHIVE_OUTPUT boost::archive::text_oarchive
    00149 #elif _QX_SERIALIZE_XML
    00150 #define QX_DEFAULT_ARCHIVE_INPUT boost::archive::xml_iarchive
    00151 #define QX_DEFAULT_ARCHIVE_OUTPUT boost::archive::xml_oarchive
    00152 #elif _QX_SERIALIZE_PORTABLE_BINARY
    00153 #define QX_DEFAULT_ARCHIVE_INPUT eos::portable_iarchive
    00154 #define QX_DEFAULT_ARCHIVE_OUTPUT eos::portable_oarchive
    00155 #elif _QX_SERIALIZE_WIDE_BINARY
    00156 #define QX_DEFAULT_ARCHIVE_INPUT boost::archive::binary_wiarchive
    00157 #define QX_DEFAULT_ARCHIVE_OUTPUT boost::archive::binary_woarchive
    00158 #elif _QX_SERIALIZE_WIDE_TEXT
    00159 #define QX_DEFAULT_ARCHIVE_INPUT boost::archive::text_wiarchive
    00160 #define QX_DEFAULT_ARCHIVE_OUTPUT boost::archive::text_woarchive
    00161 #elif _QX_SERIALIZE_WIDE_XML
    00162 #define QX_DEFAULT_ARCHIVE_INPUT boost::archive::xml_wiarchive
    00163 #define QX_DEFAULT_ARCHIVE_OUTPUT boost::archive::xml_woarchive
    00164 #endif // _QX_SERIALIZE_BINARY
    00165 #endif // QX_DEFAULT_ARCHIVE_INPUT
    00166
    00167 #ifndef QX_CLONE_STRING_STREAM // && QX_CLONE_BINARY_OUTPUT_ARCHIVE && QX_CLONE_BINARY_INPUT_ARCHIVE
    00168 #if _QX_SERIALIZE_POLYMORPHIC
    00169 #define QX_CLONE_STRING_STREAM std::stringstream
    00170 #define QX_CLONE_BINARY_OUTPUT_ARCHIVE boost::archive::polymorphic_binary_oarchive
    00171 #define QX_CLONE_BINARY_INPUT_ARCHIVE boost::archive::polymorphic_binary_iarchive
    00172 #elif _QX_SERIALIZE_WIDE_BINARY
    00173 #define QX_CLONE_STRING_STREAM std::wstringstream
    00174 #define QX_CLONE_BINARY_OUTPUT_ARCHIVE boost::archive::binary_woarchive
    00175 #define QX_CLONE_BINARY_INPUT_ARCHIVE boost::archive::binary_wiarchive
    00176 #elif _QX_SERIALIZE_BINARY
    00177 #define QX_CLONE_STRING_STREAM std::stringstream
    00178 #define QX_CLONE_BINARY_OUTPUT_ARCHIVE boost::archive::binary_oarchive
    00179 #define QX_CLONE_BINARY_INPUT_ARCHIVE boost::archive::binary_iarchive
    00180 #elif _QX_SERIALIZE_PORTABLE_BINARY
    00181 #define QX_CLONE_STRING_STREAM std::stringstream
    00182 #define QX_CLONE_BINARY_OUTPUT_ARCHIVE eos::portable_oarchive
    00183 #define QX_CLONE_BINARY_INPUT_ARCHIVE eos::portable_iarchive
    00184 #endif // _QX_SERIALIZE_WIDE_BINARY
    00185 #else
    00186 #define QX_CLONE_NEED_BINARY_TO_INCREASE_PERFORMANCE "qx::clone() need binary archive for best performance"
    00187 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
    00188 #  pragma message (QX_CLONE_NEED_BINARY_TO_INCREASE_PERFORMANCE)
    00189 #elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
    00190 #  warning QX_CLONE_NEED_BINARY_TO_INCREASE_PERFORMANCE
    00191 #endif // defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
    00192 #endif // QX_CLONE_STRING_STREAM
    00193
    00194 #endif // _QX_SERIALIZE_INCLUDE_H_
    00195 #endif // _QX_ENABLE_BOOST_SERIALIZATION