32#ifndef _QX_XML_WRITER_H_
33#define _QX_XML_WRITER_H_
39#include <QtCore/qhash.h>
40#include <QtCore/qbytearray.h>
41#include <QtCore/qdatastream.h>
43#if (QT_VERSION >= QT_VERSION_CHECK(4, 8, 0))
44#include <QtCore/QXmlStreamWriter>
46#include <QtXml/QXmlStreamWriter>
49#define QX_XML_PREFIX_BINARY_DATA_KEY "qx_binary_data_key_"
50#define QX_XML_ATTRIBUTE_IS_BINARY_DATA "qx_is_binary_data"
71 QxXmlWriter() : QXmlStreamWriter(& m_pStringWriter), m_lKeyBinaryData(0) { initQxXmlWriter(); }
74 QString
getXml()
const {
return m_pStringWriter; }
84 inline void initQxXmlWriter() { setAutoFormatting(
true); setAutoFormattingIndent(3); }
#define QX_XML_PREFIX_BINARY_DATA_KEY
QX_DLL_EXPORT QDataStream & operator<<(QDataStream &stream, const qx::QxXmlWriter &xmlWriter)
QHashIterator< QString, type_byte_arr_ptr > type_hash_bin_data_itr
type_hash_bin_data_itr getBinaryDataItr() const
QString writeBinaryData(const QString &namespaceUri, const QString &name, type_byte_arr_ptr pData)
QHash< QString, type_byte_arr_ptr > type_hash_bin_data
type_hash_bin_data m_mapBinaryData
QString getNextKeyBinaryData()
long getBinaryDataCount() const
std::shared_ptr< QByteArray > type_byte_arr_ptr
QString writeBinaryData(const QString &qualifiedName, type_byte_arr_ptr pData)
Root namespace for all QxOrm library features.