ICF 3.1.1.10
Technical documentation of ICF Libraries
iser::IArchive Class Referenceabstract

Represent input/output persistence archive. More...

#include <IArchive.h>

Inheritance diagram for iser::IArchive:
Collaboration diagram for iser::IArchive:

Public Types

enum  MessageId { MI_TAG_ERROR = 0x3f320a0 , MI_TAG_SKIPPED }
 

Public Member Functions

virtual bool IsChanging () const =0
 Check if this archive processing change the object state.
 
virtual bool IsTagSkippingSupported () const =0
 Check if skiping to the end of tag on EndTag is supported.
 
virtual const IVersionInfo & GetVersionInfo () const =0
 Get version of archived stream for specific versioning type.
 
virtual bool ProcessGroup (const CArchiveTag &tag, std::function< bool(IArchive &)> groupArchiveFn)=0
 Process some group of elements encapsulated in single tag.
 
virtual bool ProcessAnyList (const CArchiveTag &listTag, const CArchiveTag &subTag, int count, std::function< bool(int, IArchive &)> iterArchiveFn, std::function< bool(int)> resizeFn=nullptr)=0
 Process some list of elements.
 
virtual bool ProcessGroupList (const CArchiveTag &listTag, const CArchiveTag &groupTag, int count, std::function< bool(int, IArchive &)> groupArchiveFn, std::function< bool(int)> resizeFn=nullptr)=0
 Process list of elements in groups.
 
virtual bool ProcessObject (const CArchiveTag &tag, ISerializable &object)=0
 Process object enclosed by some tag.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, bool &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, char &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, quint8 &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, qint8 &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, quint16 &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, qint16 &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, quint32 &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, qint32 &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, quint64 &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, qint64 &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, float &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, double &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, QByteArray &value)=0
 Process primitive type.
 
virtual bool ProcessLeaf (const CArchiveTag &tag, QString &value)=0
 Process primitive type.
 
virtual bool ProcessBytes (const CArchiveTag &tag, void *dataPtr, int size)=0
 Process binary data block.
 

Detailed Description

Represent input/output persistence archive.

Definition at line 33 of file IArchive.h.

Member Enumeration Documentation

◆ MessageId

Enumerator
MI_TAG_ERROR 
MI_TAG_SKIPPED 

Definition at line 36 of file IArchive.h.

Member Function Documentation

◆ GetVersionInfo()

virtual const IVersionInfo & iser::IArchive::GetVersionInfo ( ) const
pure virtual

Get version of archived stream for specific versioning type.

Parameters
versionIdversioning type. It allows you to distinguish different version aspects. For example version number of framework cann differ from application version.
See also
VersionId.

Implemented in iser::CReadArchiveBase, and iser::CWriteArchiveBase.

◆ IsChanging()

◆ IsTagSkippingSupported()

virtual bool iser::IArchive::IsTagSkippingSupported ( ) const
pure virtual

◆ ProcessAnyList()

virtual bool iser::IArchive::ProcessAnyList ( const CArchiveTag & listTag,
const CArchiveTag & subTag,
int count,
std::function< bool(int, IArchive &)> iterArchiveFn,
std::function< bool(int)> resizeFn = nullptr )
pure virtual

Process some list of elements.

Parameters
listTagmain root tag.
subTagsubelement tag. Please note, in oposite to ProcessGroupList, that tag must be used as a root inside of iteration function.
countnumber of subelements. If it is read archive and the number of subelements differs, the resize function will be called. If it storing archive this value determines the number of iterations.
iterArchiveFniteration function called every iteration for processing subelements. This function must use the tag subTag as a root of processing.
resizeFnresize function called by reading, if the number of elements differs from the entered count. This function is optional.
Returns
true if success.

Implemented in ifile::CSettingsReadArchive, ifile::CSettingsWriteArchive, iser::CBinaryReadArchiveBase, and iser::CBinaryWriteArchiveBase.

Referenced by ialgo::TGeneralHoughSpace< Dimensions, Element >::Serialize(), iattr::TMultiAttribute< Value >::Serialize(), icmm::TComposedColor< Size >::Serialize(), imath::TFastVector< MaxSize, Element >::Serialize(), imath::TFulcrumGrid< Position, Fulcrums >::Serialize(), iser::CPrimitiveTypesSerializer::SerializeLeafContainer(), and iser::CPrimitiveTypesSerializer::SerializeRanges().

◆ ProcessBytes()

virtual bool iser::IArchive::ProcessBytes ( const CArchiveTag & tag,
void * dataPtr,
int size )
pure virtual

Process binary data block.

Parameters
dataPtrpointer to memory block.
sizesize of memory block in bytes.

Implemented in iser::CBinaryReadArchiveBase, iser::CBinaryWriteArchiveBase, iser::CTextReadArchiveBase, and iser::CTextWriteArchiveBase.

◆ ProcessGroup()

virtual bool iser::IArchive::ProcessGroup ( const CArchiveTag & tag,
std::function< bool(IArchive &)> groupArchiveFn )
pure virtual

◆ ProcessGroupList()

virtual bool iser::IArchive::ProcessGroupList ( const CArchiveTag & listTag,
const CArchiveTag & groupTag,
int count,
std::function< bool(int, IArchive &)> groupArchiveFn,
std::function< bool(int)> resizeFn = nullptr )
pure virtual

Process list of elements in groups.

Parameters
listTagmain root tag.
groupTagtag of the group enclosing each subelement. Please note, in oposite to ProcessAnyList, this tag should not be used inside of iteration function.
countnumber of subelements. If it is read archive and the number of subelements differs, the resize function will be called. If it storing archive this value determines the number of iterations.
iterArchiveFniteration function called every iteration for processing subelements. This function should not use the tag subTag as a part of processing, except you know what you do.
resizeFnresize function called by reading, if the number of elements differs from the entered count. This function is optional.
Returns
true if success.

Implemented in ifile::CSettingsReadArchive, ifile::CSettingsWriteArchive, iser::CBinaryReadArchiveBase, and iser::CBinaryWriteArchiveBase.

Referenced by ibase::TSerializableContainer< ItemClass, ContainerType >::Serialize(), idoc::TMultiPageDocumentWrap< Base >::Serialize(), and iser::CPrimitiveTypesSerializer::SerializeContainer().

◆ ProcessLeaf() [1/14]

◆ ProcessLeaf() [2/14]

◆ ProcessLeaf() [3/14]

◆ ProcessLeaf() [4/14]

◆ ProcessLeaf() [5/14]

◆ ProcessLeaf() [6/14]

◆ ProcessLeaf() [7/14]

◆ ProcessLeaf() [8/14]

◆ ProcessLeaf() [9/14]

◆ ProcessLeaf() [10/14]

◆ ProcessLeaf() [11/14]

◆ ProcessLeaf() [12/14]

◆ ProcessLeaf() [13/14]

◆ ProcessLeaf() [14/14]

◆ ProcessObject()

virtual bool iser::IArchive::ProcessObject ( const CArchiveTag & tag,
ISerializable & object )
pure virtual

Process object enclosed by some tag.

This function is introduced mostly for convinience and performance.

Parameters
tagtag object.
objectobject to serialize.
Returns
true if success.

Implemented in iser::CBinaryReadArchiveBase, iser::CBinaryWriteArchiveBase, iser::CTextReadArchiveBase, and iser::CTextWriteArchiveBase.

Referenced by idoc::TMultiPageDocumentWrap< Base >::SerializePage().


The documentation for this class was generated from the following file:

© Witold Gantzke and Kirill Lepskiy