54#ifdef _QX_ENABLE_BOOST_SERIALIZATION
63void dump(
const T & t,
bool bJsonFormat =
false)
72 sDump =
"Unable to dump element in JSON format : you must work with Qt5 and not define _QX_NO_JSON compilation option in 'QxOrm.pri' configuration file";
77#if _QX_SERIALIZE_POLYMORPHIC
78 sDump = qx::serialization::polymorphic_xml::to_string(t);
79#elif _QX_SERIALIZE_XML
80 sDump = qx::serialization::xml::to_string(t);
81#elif _QX_SERIALIZE_WIDE_XML
82 sDump = qx::serialization::wide::xml::to_string(t);
84 sDump =
"Unable to dump element : you must define '_QX_ENABLE_BOOST_SERIALIZATION' and '_QX_ENABLE_BOOST_SERIALIZATION_XML' (or '_QX_ENABLE_BOOST_SERIALIZATION_WIDE_XML') compilation options in 'QxOrm.pri' configuration file";
89 qDebug(
"[QxOrm] start dump '%s'", qPrintable(sName));
90 qDebug(
"%s", qPrintable(sDump));
91 qDebug(
"[QxOrm] end dump '%s'", qPrintable(sName));
101void dump(
const T & t,
bool bJsonFormat =
true)
104 qDebug(
"[QxOrm] qx::dump() : %s",
"not implemented when _QX_ENABLE_BOOST_SERIALIZATION compilation option is not defined (XML format) and _QX_NO_JSON compilation option is defined (JSON format)");
105 Q_UNUSED(t); Q_UNUSED(bJsonFormat);
107 if (! bJsonFormat) {
return; }
110 qDebug(
"[QxOrm] start dump '%s'", qPrintable(sName));
111 qDebug(
"%s", qPrintable(sDump));
112 qDebug(
"[QxOrm] end dump '%s'", qPrintable(sName));
Provide some tools to serialize a class registered into QxOrm context into/from binary/XML archive (f...
Provide a class helper to retrieve the class name under const char * format.
List of parameters to compile and build QxOrm library.
Provide a serialization engine with Qt QJson classes (this feature requires Qt5)
static const char * get()
void dump(const T &t, bool bJsonFormat=false)
qx::dump(const T & t, bool bJsonFormat) : dump class of type T registered into QxOrm context using XM...
QString to_string(const T &obj, unsigned int flags=1, const QString &format=QString())
Root namespace for all QxOrm library features.