|
| virtual bool | IsTagSkippingSupported () const override |
| | Checks if skipping to the end of a tag on EndTag() is supported.
|
| |
| virtual bool | BeginTag (const CArchiveTag &tag) override |
| | Begins a tagged section in the archive.
|
| |
| virtual bool | BeginMultiTag (const CArchiveTag &tag, const CArchiveTag &subTag, int &count) override |
| | Begins a tagged section containing multiple elements of the same type.
|
| |
| virtual bool | EndTag (const CArchiveTag &tag) override |
| | Ends a tagged section in the archive.
|
| |
| virtual bool | Process (QByteArray &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (QString &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (bool &value) override |
| | Processes (reads or writes) a boolean value.
|
| |
| virtual bool | Process (char &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (quint8 &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (qint8 &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (quint16 &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (qint16 &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (quint32 &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (qint32 &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (quint64 &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (qint64 &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (float &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (double &value) override |
| | Process primitive type.
|
| |
| virtual bool | Process (QByteArray &value) override |
| | Process primitive type.
|
| |
| virtual bool | ProcessData (void *dataPtr, int size) override |
| | Process binary data block.
|
| |
| virtual bool | IsStoring () const override |
| | Checks if this archive is in storing (writing) or loading (reading) mode.
|
| |
| virtual const IVersionInfo & | GetVersionInfo () const override |
| | Gets version information for the archived stream.
|
| |
| virtual bool | ProcessBits (void *dataPtr, int bitsCount, int bytesCount) override |
| | Process binary data block.
|
| |
| template<typename Primitive > |
| bool | TagAndProcess (const CArchiveTag &tag, Primitive &value) |
| |
| virtual | ~IPolymorphic () |
| |
| | CXmlDocumentInfoBase () |
| |
| bool | IsCommentEnabled () const |
| | Check if comments in XML document are enabled.
|
| |
| void | SetCommentEnabled (bool state=true) |
| | Allows comments in XML document.
|
| |
|
| | CXmlWriteArchiveBase (const IVersionInfo *versionInfoPtr, const CArchiveTag &rootTag) |
| |
| bool | MakeIndent () |
| |
| bool | WriteXmlHeader () |
| | Write XML header.
|
| |
| bool | WriteXmlFooter () |
| | Write XML footer.
|
| |
| bool | WriteTextNode (const QByteArray &text) override |
| | Write single unformatted text node.
|
| |
| virtual bool | WriteString (const QByteArray &value)=0 |
| |
| | CTextWriteArchiveBase (const IVersionInfo *versionInfoPtr) |
| |
| | CWriteArchiveBase (const IVersionInfo *versionInfoPtr) |
| | Constructor.
|
| |
| bool | SerializeAcfHeader () |
| | Serialize standard header.
|
| |
| | CArchiveBase () |
| |
| virtual void | DecorateMessage (IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const |
| | Decorate message parts before outputting.
|
| |
| virtual bool | IsLogConsumed (const IInformationProvider::InformationCategory *categoryPtr=NULL, const int *flagsPtr=NULL) const |
| | Check if any log message is consumed.
|
| |
| virtual bool | SendLogMessage (IInformationProvider::InformationCategory category, int id, const QString &message, const QString &messageSource, int flags=0) const |
| | Send any message to log.
|
| |
Base class for XML storing archives.
Definition at line 17 of file CXmlWriteArchiveBase.h.
| virtual bool iser::CXmlWriteArchiveBase::BeginMultiTag |
( |
const CArchiveTag & |
tag, |
|
|
const CArchiveTag & |
subTag, |
|
|
int & |
count |
|
) |
| |
|
overridevirtual |
Begins a tagged section containing multiple elements of the same type.
BeginMultiTag is used for serializing collections, arrays, or lists where you have multiple items of the same structure. The count parameter works differently for reading vs. writing:
- Writing: Pass the number of elements you will serialize
- Reading: The archive sets count to the number of elements stored
- Parameters
-
| tag | Main container tag for the entire collection |
| subTag | Tag type for each individual element in the collection |
| count | [in/out] For writing: number of elements to serialize For reading: set by archive to number of stored elements |
- Returns
- true if successful, false on error
if (archive.IsStoring()) {
int count = m_items.count();
archive.BeginMultiTag(listTag, itemTag, count);
for (const Item& item : m_items) {
archive.BeginTag(itemTag);
item.Serialize(archive);
archive.EndTag(itemTag);
}
archive.EndTag(listTag);
}
else {
int count;
archive.BeginMultiTag(listTag, itemTag, count);
m_items.clear();
for (int i = 0; i < count; ++i) {
archive.BeginTag(itemTag);
Item item;
item.Serialize(archive);
m_items.append(item);
archive.EndTag(itemTag);
}
archive.EndTag(listTag);
}
- See also
- BeginTag(), EndTag()
Reimplemented from iser::CArchiveBase.
| virtual bool iser::CXmlWriteArchiveBase::IsTagSkippingSupported |
( |
| ) |
const |
|
overridevirtual |
Checks if skipping to the end of a tag on EndTag() is supported.
Some archive types (like XML) support skipping unread content within a tag, allowing forward compatibility. When reading an archive created by a newer version that added fields, this feature lets you skip unknown data.
- Returns
- true if the archive supports tag skipping, false otherwise
- Note
- Binary archives typically don't support skipping, requiring all data to be read sequentially.
-
XML and JSON archives usually support skipping.
if (archive.IsTagSkippingSupported()) {
} else {
}
- See also
- EndTag()
Reimplemented from iser::CArchiveBase.