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