32#ifdef _QX_ENABLE_BOOST_SERIALIZATION
53#include <boost/archive/archive_exception.hpp>
54#include <boost/serialization/serialization.hpp>
55#include <boost/serialization/nvp.hpp>
71#define QX_STR_SERIALIZATION_ERROR "Serialization error : '%ERR%'"
72#define QX_STR_DESERIALIZATION_ERROR "Deserialization error : '%ERR%'"
80template <
class T,
class ArchiveInput = QX_DEFAULT_ARCHIVE_INPUT,
class ArchiveOutput = QX_DEFAULT_ARCHIVE_OUTPUT>
82{
public:
static qx_bool toFile(
const T & obj,
const QString & sFileName,
unsigned int flags = boost::archive::no_header); };
88template <
class T,
class ArchiveInput = QX_DEFAULT_ARCHIVE_INPUT,
class ArchiveOutput = QX_DEFAULT_ARCHIVE_OUTPUT>
90{
public:
static qx_bool fromFile(T & obj,
const QString & sFileName,
unsigned int flags = boost::archive::no_header); };
96template <
class T,
class ArchiveInput = QX_DEFAULT_ARCHIVE_INPUT,
class ArchiveOutput = QX_DEFAULT_ARCHIVE_OUTPUT>
98{
public:
static qx_bool toFileCompressed(
const T & obj,
const QString & sFileName,
unsigned int flags = boost::archive::no_header,
int iCompressionLevel = -1); };
104template <
class T,
class ArchiveInput = QX_DEFAULT_ARCHIVE_INPUT,
class ArchiveOutput = QX_DEFAULT_ARCHIVE_OUTPUT>
112template <
class T,
class ArchiveInput = QX_DEFAULT_ARCHIVE_INPUT,
class ArchiveOutput = QX_DEFAULT_ARCHIVE_OUTPUT>
114{
public:
static QString
toString(
const T & obj,
unsigned int flags = boost::archive::no_header); };
120template <
class T,
class ArchiveInput = QX_DEFAULT_ARCHIVE_INPUT,
class ArchiveOutput = QX_DEFAULT_ARCHIVE_OUTPUT>
122{
public:
static qx_bool fromString(T & obj,
const QString & sString,
unsigned int flags = boost::archive::no_header); };
128template <
class T,
class ArchiveInput = QX_DEFAULT_ARCHIVE_INPUT,
class ArchiveOutput = QX_DEFAULT_ARCHIVE_OUTPUT>
136template <
class T,
class ArchiveInput = QX_DEFAULT_ARCHIVE_INPUT,
class ArchiveOutput = QX_DEFAULT_ARCHIVE_OUTPUT>
138{
public:
static qx_bool fromByteArray(T & obj,
const QByteArray & data,
unsigned int flags = boost::archive::no_header); };
142#include "../../inl/QxSerialize/QxArchive.inl"
145namespace serialization {
149#if _QX_SERIALIZE_POLYMORPHIC
174#if _QX_SERIALIZE_BINARY
185#if _QX_SERIALIZE_TEXT
207#if _QX_SERIALIZE_PORTABLE_BINARY
220#if _QX_SERIALIZE_WIDE_BINARY
231#if _QX_SERIALIZE_WIDE_TEXT
242#if _QX_SERIALIZE_WIDE_XML
qx_bool : QxOrm library boolean type with code and description message when an error occured
Concrete class registered into QxOrm context.
Provide a class helper to retrieve the class name under const char * format.
List of parameters to compile and build QxOrm library.
#define QX_DEFAULT_ARCHIVE_INPUT
#define QX_DEFAULT_ARCHIVE_OUTPUT
#define QX_ARCHIVE_NAMESPACE_FCT_IMPL(T, INPUT, OUTPUT)
qx::trait::is_archive_wide<T>::value : define if a boost::archive type uses wide string character and...
Portable binary input archive using little endian format.
Portable binary output archive using little endian format.
qx::QxArchive_FromByteArray : provide some tools to serialize a class registered into QxOrm context i...
static qx_bool fromByteArray(T &obj, const QByteArray &data, unsigned int flags=boost::archive::no_header)
qx::QxArchive_FromFileCompressed : provide some tools to serialize a class registered into QxOrm cont...
static qx_bool fromFileCompressed(T &obj, const QString &sFileName, unsigned int flags=boost::archive::no_header)
qx::QxArchive_FromFile : provide some tools to serialize a class registered into QxOrm context into/f...
static qx_bool fromFile(T &obj, const QString &sFileName, unsigned int flags=boost::archive::no_header)
qx::QxArchive_FromString : provide some tools to serialize a class registered into QxOrm context into...
static qx_bool fromString(T &obj, const QString &sString, unsigned int flags=boost::archive::no_header)
qx::QxArchive_ToByteArray : provide some tools to serialize a class registered into QxOrm context int...
static QByteArray toByteArray(const T &obj, type_string *owner=NULL, unsigned int flags=boost::archive::no_header)
qx::trait::archive_wide_traits< ArchiveInput >::type_string type_string
qx::QxArchive_ToFileCompressed : provide some tools to serialize a class registered into QxOrm contex...
static qx_bool toFileCompressed(const T &obj, const QString &sFileName, unsigned int flags=boost::archive::no_header, int iCompressionLevel=-1)
qx::QxArchive_ToFile : provide some tools to serialize a class registered into QxOrm context into/fro...
static qx_bool toFile(const T &obj, const QString &sFileName, unsigned int flags=boost::archive::no_header)
qx::QxArchive_ToString : provide some tools to serialize a class registered into QxOrm context into/f...
static QString toString(const T &obj, unsigned int flags=boost::archive::no_header)
qx_bool : boolean type with code and description message when an error occured
std::conditional< is_wide, std::wstring, std::string >::type type_string
qx::trait::get_class_name<T>::get() : return class name of type T under const char * format,...
qx::trait::is_qx_registered<T>::value : return true if T is registered into QxOrm context to provide ...
Root namespace for all QxOrm library features.