Rebel Fork Framework
Urho3D::XMLInputArchive Class Reference

XML input archive. More...

#include <Urho3D/Resource/XMLArchive.h>

Inheritance diagram for Urho3D::XMLInputArchive:
Urho3D::XMLArchiveBase< XMLInputArchiveBlock, true > Urho3D::ArchiveBaseT< XMLInputArchiveBlock, IsInputBool, true > Urho3D::ArchiveBase Urho3D::Archive Urho3D::MovableNonCopyable

Public Member Functions

 XMLInputArchive (Context *context, XMLElement element, const XMLFile *xmlFile=nullptr, bool serializeRootName=false)
 Construct from element.
 
 XMLInputArchive (const XMLFile *xmlFile)
 Construct from file.
 
Archive implementation
void BeginBlock (const char *name, unsigned &sizeHint, bool safe, ArchiveBlockType type) final
 
void Serialize (const char *name, bool &value) final
 
void Serialize (const char *name, signed char &value) final
 
void Serialize (const char *name, unsigned char &value) final
 
void Serialize (const char *name, short &value) final
 
void Serialize (const char *name, unsigned short &value) final
 
void Serialize (const char *name, int &value) final
 
void Serialize (const char *name, unsigned int &value) final
 
void Serialize (const char *name, long long &value) final
 
void Serialize (const char *name, unsigned long long &value) final
 
void Serialize (const char *name, float &value) final
 
void Serialize (const char *name, double &value) final
 
void Serialize (const char *name, ea::string &value) final
 
void SerializeBytes (const char *name, void *bytes, unsigned size) final
 Serialize bytes. Size is not encoded and should be provided externally!
 
void SerializeVLE (const char *name, unsigned &value) final
 Serialize Variable Length Encoded unsigned integer, up to 29 significant bits.
 
- Public Member Functions inherited from Urho3D::XMLArchiveBase< XMLInputArchiveBlock, true >
ea::string_view GetName () const
 Return name of the archive if applicable.
 
- Public Member Functions inherited from Urho3D::ArchiveBaseT< XMLInputArchiveBlock, IsInputBool, true >
bool IsInput () const final
 
bool IsHumanReadable () const final
 
bool IsUnorderedAccessSupportedInCurrentBlock () const final
 
bool HasElementOrBlock (const char *name) const final
 
ea::string GetCurrentBlockPath () const final
 Return current string stack.
 
void EndBlock () noexcept override
 End archive block. May postpone ArchiveException until later.
 
- Public Member Functions inherited from Urho3D::ArchiveBase
ContextGetContext () final
 Get context.
 
ea::string_view GetName () const override
 Return name of the archive if applicable.
 
unsigned GetChecksum () override
 Return a checksum if applicable.
 
bool IsEOF () const final
 Whether the archive can no longer be serialized.
 
void Flush () final
 Flush all pending events. Should be called at least once before destructor.
 
unsigned SerializeVersion (unsigned version) final
 Serialize version number. 0 is invalid version.
 
ArchiveException IOFailureException (ea::string_view elementName) const
 
ArchiveException DuplicateElementException (ea::string_view elementName) const
 
ArchiveException ElementNotFoundException (ea::string_view elementName) const
 
ArchiveException ElementNotFoundException (ea::string_view elementName, unsigned elementIndex) const
 
ArchiveException UnexpectedElementValueException (ea::string_view elementName) const
 
ArchiveException UnexpectedEOFException (ea::string_view elementName) const
 
- Public Member Functions inherited from Urho3D::Archive
virtual bool IsInput () const =0
 
virtual bool IsHumanReadable () const =0
 
virtual bool IsUnorderedAccessSupportedInCurrentBlock () const =0
 
virtual ea::string GetCurrentBlockPath () const =0
 Return current string stack.
 
ArchiveBlock OpenBlock (const char *name, unsigned sizeHint, bool safe, ArchiveBlockType type)
 
ArchiveBlock OpenSequentialBlock (const char *name)
 Open Sequential block. Will be automatically closed when returned object is destroyed. More...
 
ArchiveBlock OpenUnorderedBlock (const char *name)
 Open Unordered block. Will be automatically closed when returned object is destroyed.
 
ArchiveBlock OpenArrayBlock (const char *name, unsigned sizeHint=0)
 Open Array block. Will be automatically closed when returned object is destroyed.
 
ArchiveBlock OpenSafeSequentialBlock (const char *name)
 Open safe Sequential block. Will be automatically closed when returned object is destroyed.
 
ArchiveBlock OpenSafeUnorderedBlock (const char *name)
 Open safe Unordered block. Will be automatically closed when returned object is destroyed.
 

Private Member Functions

XMLAttributeReference ReadElementOrAttribute (const char *name)
 

Additional Inherited Members

- Static Public Member Functions inherited from Urho3D::Archive
static bool ValidateName (ea::string_view name)
 Validate element or block name.
 
- Protected Types inherited from Urho3D::ArchiveBaseT< XMLInputArchiveBlock, IsInputBool, true >
using Block = XMLInputArchiveBlock
 
- Protected Member Functions inherited from Urho3D::XMLArchiveBase< XMLInputArchiveBlock, true >
 XMLArchiveBase (Context *context, XMLElement element, const XMLFile *xmlFile, bool serializeRootName)
 
- Protected Member Functions inherited from Urho3D::ArchiveBaseT< XMLInputArchiveBlock, IsInputBool, true >
BlockGetCurrentBlock ()
 
const BlockGetCurrentBlock () const
 
void CheckIfRootBlockOpen () const
 
void CheckBeforeBlock (const char *elementName)
 
void CheckBeforeElement (const char *elementName)
 
 ArchiveBase (Context *context)
 
- Protected Member Functions inherited from Urho3D::ArchiveBase
 ArchiveBase (Context *context)
 
void SetDelayedException (std::exception_ptr ptr)
 
void FlushDelayedException ()
 
void CheckIfNotEOF (ea::string_view elementName) const
 
void CheckBlockOrElementName (ea::string_view elementName) const
 
void CloseArchive ()
 
void ReadBytesFromHexString (ea::string_view elementName, const ea::string &string, void *bytes, unsigned size)
 
- Protected Member Functions inherited from Urho3D::MovableNonCopyable
 MovableNonCopyable (MovableNonCopyable &&other)=default
 
MovableNonCopyableoperator= (MovableNonCopyable &&other)=default
 
 MovableNonCopyable (const MovableNonCopyable &other)=delete
 
MovableNonCopyableoperator= (const MovableNonCopyable &other)=delete
 
- Protected Attributes inherited from Urho3D::XMLArchiveBase< XMLInputArchiveBlock, true >
XMLElement rootElement_
 
const bool serializeRootName_
 
- Protected Attributes inherited from Urho3D::ArchiveBaseT< XMLInputArchiveBlock, IsInputBool, true >
ea::vector< Blockstack_
 
- Static Protected Attributes inherited from Urho3D::ArchiveBase
static constexpr const char * rootBlockName = "Root"
 
static constexpr const char * versionElementName = "Version"
 

Detailed Description

XML input archive.

Member Function Documentation

◆ BeginBlock()

void Urho3D::XMLInputArchive::BeginBlock ( const char *  name,
unsigned &  sizeHint,
bool  safe,
ArchiveBlockType  type 
)
finalvirtual

Begin archive block. Size is required for Array blocks. It is guaranteed that errors occurred during serialization of the safe block don't affect data outside of the block.

Implements Urho3D::Archive.


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