AGXDynamics  2.31.1.0
agxStream::XMLInputArchive Class Reference

XML version of an input archive for restoring data written with the XMLOutputArchive. More...

#include <XMLInputArchive.h>

+ Inheritance diagram for agxStream::XMLInputArchive:

Classes

struct  StackElement
 

Public Types

typedef agx::HashTable< agx::UInt, bool > BuildConfigurationTable
 
typedef agx::Vector< std::string > IdToClassNameVector
 
typedef agx::VectorPOD< Serializable *> IdToObjectVector
 
typedef agx::Vector< StorageAgent *> IdToStorageAgentVector
 
typedef agx::Event3< agx::UInt32, Serializable *, const std::string & > RestoreEvent
 
enum  RestoreMode { TRY_BY_VALUE, TRY_BY_REFERENCE, DEFAULT = TRY_BY_REFERENCE }
 

Public Member Functions

 XMLInputArchive (std::istream &inputStream)
 Constructor creating a XMLInputArchive for reading XML streams. More...
 
 XMLInputArchive (std::istream &inputStream, IdToObjectVector &idCache, IdToClassNameVector &nameCache)
 
bool addRestoreListener (RestoreListener *listener)
 Add a listener that will be called for each restored Serializable object. More...
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
virtual void beginSection (const char *title)
 
virtual void close ()
 
virtual void endSection (const char *title)
 
bool eof () const
 
agx::String getAppName () const
 
agx::String getArchiveDate () const
 
virtual void getAttribute (const char *name, std::string &value)
 
virtual void getAttribute (const char *name, float &value)
 
virtual void getAttribute (const char *name, double &value)
 
virtual void getAttribute (const char *name, bool &value)
 
virtual void getAttribute (const char *name, char &value)
 
virtual void getAttribute (const char *name, agx::Int8 &value)
 
virtual void getAttribute (const char *name, agx::UInt8 &value)
 
virtual void getAttribute (const char *name, agx::UInt16 &value)
 
virtual void getAttribute (const char *name, agx::UInt32 &value)
 
virtual void getAttribute (const char *name, agx::Int32 &value)
 
virtual void getAttribute (const char *name, agx::UInt64 &value)
 
virtual void getAttribute (const char *name, agx::Uuid &value)
 
bool getBinaryMode () const
 
agx::String getBuildDate () const
 
const BuildConfigurationTable & getBuildFlags () const
 
agx::String getBuildTime () const
 
bool getEndianMatch () const
 
agx::String getErrorMessage (const agx::String &message)
 
agx::UInt8 getGenerationVersion () const
 
agx::UInt8 getMajorVersion () const
 
agx::UInt8 getMinorVersion () const
 
virtual size_t getNumBytesRead () const
 
int getNumObjectsRead () const
 
agx::UInt8 getPatchVersion () const
 
int getReferenceCount () const
 
RestoreMode getRestoreMode () const
 
agx::String getRevision () const
 
agx::UInt16 getSerializationVersion () const
 
std::istream & getStream ()
 Return a reference to the inputstream. More...
 
size_t getVersion () const
 
bool hasModification (const char *str) const
 
bool hasModifications (const agx::StringVector &modifications) const
 
template<typename T >
bool is () const
 Subclass test. More...
 
bool isOpen () const
 
virtual void newAttribute ()
 Called whenever a new item is initiated. More...
 
void open ()
 
virtual void read (char &val)
 
virtual void read (bool &val)
 
virtual void read (agx::Int8 &val)
 
virtual void read (agx::UInt8 &val)
 
virtual void read (agx::Int16 &val)
 
virtual void read (agx::UInt16 &val)
 
virtual void read (agx::Vec3d &val)
 
virtual void read (agx::Vec3f &val)
 
virtual void read (agx::Uuid &val)
 
virtual void read (agx::UInt32 &val)
 
virtual void read (agx::Int32 &val)
 
virtual void read (std::string &val)
 
virtual void read (agx::UInt64 &val)
 
virtual void read (agx::Int64 &val)
 
virtual void read (float &val)
 
virtual void read (double &val)
 
virtual void read (void *buf, size_t size)
 This method will read raw data from the archive. More...
 
virtual void read (agx::RangeReal &val)
 
virtual void read (agx::Vec2f &val)
 
virtual void read (agx::Vec2d &val)
 
virtual void read (agx::Vec2i32 &val)
 
virtual void read (agx::Vec2i64 &val)
 
virtual void read (agx::Vec3i32 &val)
 
virtual void read (agx::Vec3i64 &val)
 
virtual void read (agx::Vec4f &val)
 
virtual void read (agx::Vec4d &val)
 
virtual void read (agx::Quat &val)
 
virtual void read (agx::SPDMatrix3x3 &val)
 
virtual void read (agx::Matrix3x3d &val)
 
virtual void read (agx::Matrix3x3f &val)
 
virtual void read (agx::AffineMatrix4x4f &val)
 
virtual void read (agx::AffineMatrix4x4d &val)
 
virtual void read (agx::String &val)
 
virtual void read (agx::Name &val)
 
template<typename VECTOR_TYPE >
AGXCORE_EXPORT void read_vector (const agx::String &name, VECTOR_TYPE &val)
 Read an array of data. More...
 
Serializable * readObjectByRef ()
 
bool readObjectByVal (Serializable &obj)
 
template<typename T >
void readRef (T **obj, StorageMode mode)
 
void readVal (Serializable &obj, StorageMode mode)
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
bool removeRestoreListener (RestoreListener *listener)
 Remove a RestoreListener. More...
 
void setBinaryMode (bool m)
 
void setFinished ()
 Must be called when archive is de-serialized successfully. More...
 
void setRestoreMode (RestoreMode mode)
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 

Static Public Member Functions

template<typename T >
static bool ValidateCast (const Referenced *object)
 

Public Attributes

RestoreEvent restoreEvent
 

Protected Types

typedef agx::HashTable< RestoreListener *, RestoreListenerRef > RestoreListenerHash
 

Protected Member Functions

virtual ~XMLInputArchive ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
void eof (bool flag)
 
agx::TiXmlElement * getElement (const char *variable)
 
agx::String getSerializationVersionStringMessage () const
 
agx::String getVersionStringMessage () const
 
void init ()
 
virtual void readArchiveHeader ()
 
void readCompareBitSize ()
 
void readHeaderData ()
 
virtual void readObjectHeader (StorageMode &storageMode, StorageAgent *&agent)
 
virtual void readTypeHeader (StorageAgent *&agent)
 
bool removeObject (Serializable *object)
 Remove the serialized object from list. More...
 

Static Protected Member Functions

static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Protected Attributes

agx::TiXmlElement * m_currentElement
 
std::string m_currTitle
 
IdToClassNameVector m_defaultNameCache
 
IdToObjectVector m_defaultObjectCache
 
agx::TiXmlDocument * m_document
 
IdToClassNameVector & m_idToClassNameVector
 
IdToObjectVector & m_IdToObjectVector
 
IdToStorageAgentVector m_IdToStorageAgentVector
 
std::istream & m_inputStream
 
bool m_isOpen
 
agx::TiXmlNode * m_lastNode
 
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 
RestoreListenerHash m_restoreListeners
 
agx::Vector< StackElement > m_sectionStack
 
std::stringstream m_stringBuf
 

Detailed Description

XML version of an input archive for restoring data written with the XMLOutputArchive.

Definition at line 43 of file XMLInputArchive.h.

Member Typedef Documentation

◆ BuildConfigurationTable

Definition at line 114 of file InputArchive.h.

◆ IdToClassNameVector

Definition at line 60 of file InputArchive.h.

◆ IdToObjectVector

Definition at line 59 of file InputArchive.h.

◆ IdToStorageAgentVector

◆ RestoreEvent

Definition at line 55 of file InputArchive.h.

◆ RestoreListenerHash

Member Enumeration Documentation

◆ RestoreMode

Enumerator
TRY_BY_VALUE 

! Restore by value, even if its a pointer that is given to the serialization. If pointer==nullptr, restore by reference.

TRY_BY_REFERENCE 

! Restore by reference when possible. Even if pointer given is != nullptr, use BY_REFERENCE

DEFAULT 

Definition at line 218 of file InputArchive.h.

Constructor & Destructor Documentation

◆ XMLInputArchive() [1/2]

agxStream::XMLInputArchive::XMLInputArchive ( std::istream &  inputStream)

Constructor creating a XMLInputArchive for reading XML streams.

Data will be read from the inputStream during the constructor.

◆ XMLInputArchive() [2/2]

agxStream::XMLInputArchive::XMLInputArchive ( std::istream &  inputStream,
IdToObjectVector &  idCache,
IdToClassNameVector &  nameCache 
)

◆ ~XMLInputArchive()

virtual agxStream::XMLInputArchive::~XMLInputArchive ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ addRestoreListener()

bool agxStream::InputArchive::addRestoreListener ( RestoreListener *  listener)
inherited

Add a listener that will be called for each restored Serializable object.

Returns
true if successfully added. False if listener already is added.

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ beginSection()

virtual void agxStream::XMLInputArchive::beginSection ( const char *  title)
virtual

Reimplemented from agxStream::InputArchive.

◆ close()

virtual void agxStream::Archive::close ( )
inlinevirtualinherited

Reimplemented in agxStream::OutputArchive, and agxStream::XMLOutputArchive.

Definition at line 78 of file Archive.h.

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ endSection()

virtual void agxStream::XMLInputArchive::endSection ( const char *  title)
virtual

Reimplemented from agxStream::InputArchive.

◆ eof() [1/2]

bool agxStream::InputArchive::eof ( ) const
inlineinherited
Returns
true if eof is reached during reading

Definition at line 357 of file InputArchive.h.

Referenced by agxStream::RestoreObjects< T >::RestoreObjects().

◆ eof() [2/2]

void agxStream::InputArchive::eof ( bool  flag)
inlineprotectedinherited

Definition at line 361 of file InputArchive.h.

◆ getAppName()

agx::String agxStream::InputArchive::getAppName ( ) const
inherited
Returns
the string written for application

◆ getArchiveDate()

agx::String agxStream::InputArchive::getArchiveDate ( ) const
inherited
Returns
the date/time in ISO format YYYY-MM-DDTHH:MM:SS when the archive was written

◆ getAttribute() [1/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
std::string &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [2/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
float &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [3/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
double &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [4/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
bool &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [5/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
char &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [6/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
agx::Int8 &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [7/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
agx::UInt8 &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [8/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
agx::UInt16 &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [9/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
agx::UInt32 &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [10/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
agx::Int32 &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [11/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
agx::UInt64 &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getAttribute() [12/12]

virtual void agxStream::XMLInputArchive::getAttribute ( const char *  name,
agx::Uuid &  value 
)
virtual

Reimplemented from agxStream::InputArchive.

◆ getBinaryMode()

bool agxStream::Archive::getBinaryMode ( ) const
inlineinherited
Returns
true if archive is used in binary mode

Definition at line 61 of file Archive.h.

◆ getBuildDate()

agx::String agxStream::InputArchive::getBuildDate ( ) const
inherited
Returns
the build date of agx which wrote the archive

◆ getBuildFlags()

const BuildConfigurationTable& agxStream::InputArchive::getBuildFlags ( ) const
inherited
Returns
a table with various flags which was used to build the agx version used at writing this archive.

◆ getBuildTime()

agx::String agxStream::InputArchive::getBuildTime ( ) const
inherited
Returns
the build time of agx which wrote the archive

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getElement()

agx::TiXmlElement* agxStream::XMLInputArchive::getElement ( const char *  variable)
protected

◆ getEndianMatch()

bool agxStream::InputArchive::getEndianMatch ( ) const
inherited
Returns
true if the input archive matches the current platforms endian

◆ getErrorMessage()

agx::String agxStream::XMLInputArchive::getErrorMessage ( const agx::String &  message)
virtual

Reimplemented from agxStream::InputArchive.

◆ getGenerationVersion()

agx::UInt8 agxStream::InputArchive::getGenerationVersion ( ) const
inherited
Returns
the generation version specified during writing

◆ getMajorVersion()

agx::UInt8 agxStream::InputArchive::getMajorVersion ( ) const
inherited
Returns
the major version specified during writing

◆ getMinorVersion()

agx::UInt8 agxStream::InputArchive::getMinorVersion ( ) const
inherited
Returns
the minor version specified during writing

◆ getNumBytesRead()

virtual size_t agxStream::XMLInputArchive::getNumBytesRead ( ) const
virtual

Reimplemented from agxStream::InputArchive.

◆ getNumObjectsRead()

int agxStream::InputArchive::getNumObjectsRead ( ) const
inherited
Returns
the number of objects read so far

◆ getPatchVersion()

agx::UInt8 agxStream::InputArchive::getPatchVersion ( ) const
inherited
Returns
the patch version specified during writing

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ getRestoreMode()

RestoreMode agxStream::InputArchive::getRestoreMode ( ) const
inherited

◆ getRevision()

agx::String agxStream::InputArchive::getRevision ( ) const
inherited
Returns
the revision specified during writing, "" if no revision was written/available

◆ getSerializationVersion()

agx::UInt16 agxStream::InputArchive::getSerializationVersion ( ) const
inherited

◆ getSerializationVersionStringMessage()

agx::String agxStream::InputArchive::getSerializationVersionStringMessage ( ) const
protectedinherited
Returns
a string with AGX serialization version and Archive serialization version used for error message reporting.

◆ getStream()

std::istream& agxStream::InputArchive::getStream ( )
inherited

Return a reference to the inputstream.

◆ getVersion()

size_t agxStream::InputArchive::getVersion ( ) const
inherited
Returns
the version of the restored data as a size_t for version comparison using AGX_CALC_VERSION

◆ getVersionStringMessage()

agx::String agxStream::InputArchive::getVersionStringMessage ( ) const
protectedinherited
Returns
a string with AGX version and Archive version used for error message reporting.

◆ hasModification()

bool agxStream::InputArchive::hasModification ( const char *  str) const
inherited
Returns
true if archive contains a specified modification

◆ hasModifications()

bool agxStream::InputArchive::hasModifications ( const agx::StringVector &  modifications) const
inherited
Returns
true if all modifications is represented in the current archive

◆ init()

void agxStream::XMLInputArchive::init ( )
protected

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ isOpen()

bool agxStream::Archive::isOpen ( ) const
inlineinherited
Returns
true if archive is open for reading/writing

Definition at line 74 of file Archive.h.

◆ newAttribute()

virtual void agxStream::Archive::newAttribute ( )
inlinevirtualinherited

Called whenever a new item is initiated.

Definition at line 71 of file Archive.h.

◆ open()

void agxStream::InputArchive::open ( )
inherited

◆ read() [1/34]

virtual void agxStream::XMLInputArchive::read ( char &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [2/34]

virtual void agxStream::XMLInputArchive::read ( bool &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [3/34]

virtual void agxStream::XMLInputArchive::read ( agx::Int8 &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [4/34]

virtual void agxStream::XMLInputArchive::read ( agx::UInt8 &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [5/34]

virtual void agxStream::XMLInputArchive::read ( agx::Int16 &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [6/34]

virtual void agxStream::XMLInputArchive::read ( agx::UInt16 &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [7/34]

virtual void agxStream::XMLInputArchive::read ( agx::Vec3d &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [8/34]

virtual void agxStream::XMLInputArchive::read ( agx::Vec3f &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [9/34]

virtual void agxStream::XMLInputArchive::read ( agx::Uuid &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [10/34]

virtual void agxStream::XMLInputArchive::read ( agx::UInt32 &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [11/34]

virtual void agxStream::XMLInputArchive::read ( agx::Int32 &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [12/34]

virtual void agxStream::XMLInputArchive::read ( std::string &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [13/34]

virtual void agxStream::XMLInputArchive::read ( agx::UInt64 &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [14/34]

virtual void agxStream::XMLInputArchive::read ( agx::Int64 &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [15/34]

virtual void agxStream::XMLInputArchive::read ( float &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [16/34]

virtual void agxStream::XMLInputArchive::read ( double &  val)
virtual

Reimplemented from agxStream::InputArchive.

◆ read() [17/34]

virtual void agxStream::XMLInputArchive::read ( void *  buf,
size_t  size 
)
virtual

This method will read raw data from the archive.

Notice that you should always have called beginSection() prior to calling this method. Otherwise it is not compatible with XML input

Parameters
buf- Pointer to the buffer where data will be read
size- Number of bytes to read

Reimplemented from agxStream::InputArchive.

◆ read() [18/34]

virtual void agxStream::InputArchive::read ( agx::RangeReal &  val)
virtualinherited

◆ read() [19/34]

virtual void agxStream::InputArchive::read ( agx::Vec2f &  val)
virtualinherited

◆ read() [20/34]

virtual void agxStream::InputArchive::read ( agx::Vec2d &  val)
virtualinherited

◆ read() [21/34]

virtual void agxStream::InputArchive::read ( agx::Vec2i32 &  val)
virtualinherited

◆ read() [22/34]

virtual void agxStream::InputArchive::read ( agx::Vec2i64 &  val)
virtualinherited

◆ read() [23/34]

virtual void agxStream::InputArchive::read ( agx::Vec3i32 &  val)
virtualinherited

◆ read() [24/34]

virtual void agxStream::InputArchive::read ( agx::Vec3i64 &  val)
virtualinherited

◆ read() [25/34]

virtual void agxStream::InputArchive::read ( agx::Vec4f &  val)
virtualinherited

◆ read() [26/34]

virtual void agxStream::InputArchive::read ( agx::Vec4d &  val)
virtualinherited

◆ read() [27/34]

virtual void agxStream::InputArchive::read ( agx::Quat &  val)
virtualinherited

◆ read() [28/34]

virtual void agxStream::InputArchive::read ( agx::SPDMatrix3x3 &  val)
virtualinherited

◆ read() [29/34]

virtual void agxStream::InputArchive::read ( agx::Matrix3x3d &  val)
virtualinherited

◆ read() [30/34]

virtual void agxStream::InputArchive::read ( agx::Matrix3x3f &  val)
virtualinherited

◆ read() [31/34]

virtual void agxStream::InputArchive::read ( agx::AffineMatrix4x4f &  val)
virtualinherited

◆ read() [32/34]

virtual void agxStream::InputArchive::read ( agx::AffineMatrix4x4d &  val)
virtualinherited

◆ read() [33/34]

virtual void agxStream::InputArchive::read ( agx::String &  val)
virtualinherited

◆ read() [34/34]

virtual void agxStream::InputArchive::read ( agx::Name &  val)
virtualinherited

◆ read_vector()

template<typename VECTOR_TYPE >
AGXCORE_EXPORT void agxStream::InputArchive::read_vector ( const agx::String &  name,
VECTOR_TYPE &  val 
)
inherited

Read an array of data.

Only works for agx::VectorPOD<> types.

Parameters
name- name of the vector data
val- Target of the read vector data.

◆ readArchiveHeader()

virtual void agxStream::InputArchive::readArchiveHeader ( )
protectedvirtualinherited

◆ readCompareBitSize()

void agxStream::InputArchive::readCompareBitSize ( )
protectedinherited

◆ readHeaderData()

void agxStream::InputArchive::readHeaderData ( )
protectedinherited

◆ readObjectByRef()

Serializable* agxStream::InputArchive::readObjectByRef ( )
inherited

◆ readObjectByVal()

bool agxStream::InputArchive::readObjectByVal ( Serializable &  obj)
inherited

◆ readObjectHeader()

virtual void agxStream::InputArchive::readObjectHeader ( StorageMode &  storageMode,
StorageAgent *&  agent 
)
protectedvirtualinherited

◆ readRef()

template<typename T >
void agxStream::InputArchive::readRef ( T **  obj,
StorageMode  mode 
)
inlineinherited

◆ readTypeHeader()

virtual void agxStream::InputArchive::readTypeHeader ( StorageAgent *&  agent)
protectedvirtualinherited

◆ readVal()

void agxStream::InputArchive::readVal ( Serializable &  obj,
StorageMode  mode 
)
inherited

Referenced by agxStream::operator>>().

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

◆ removeObject()

bool agxStream::InputArchive::removeObject ( Serializable *  object)
protectedinherited

Remove the serialized object from list.

◆ removeRestoreListener()

bool agxStream::InputArchive::removeRestoreListener ( RestoreListener *  listener)
inherited

Remove a RestoreListener.

Returns
true if listener was located and removed

◆ setBinaryMode()

void agxStream::Archive::setBinaryMode ( bool  m)
inlineinherited
Parameters
m- If true this archive is used in binary mode

Definition at line 66 of file Archive.h.

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ setFinished()

void agxStream::InputArchive::setFinished ( )
inherited

Must be called when archive is de-serialized successfully.

If not, all dynamically allocated objects will be deleted.

◆ setRestoreMode()

void agxStream::InputArchive::setRestoreMode ( RestoreMode  mode)
inherited

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

◆ m_currentElement

agx::TiXmlElement* agxStream::XMLInputArchive::m_currentElement
protected

Definition at line 139 of file XMLInputArchive.h.

◆ m_currTitle

std::string agxStream::XMLInputArchive::m_currTitle
protected

Definition at line 138 of file XMLInputArchive.h.

◆ m_defaultNameCache

IdToClassNameVector agxStream::InputArchive::m_defaultNameCache
protectedinherited

Definition at line 295 of file InputArchive.h.

◆ m_defaultObjectCache

IdToObjectVector agxStream::InputArchive::m_defaultObjectCache
protectedinherited

Definition at line 293 of file InputArchive.h.

◆ m_document

agx::TiXmlDocument* agxStream::XMLInputArchive::m_document
protected

Definition at line 121 of file XMLInputArchive.h.

◆ m_idToClassNameVector

IdToClassNameVector& agxStream::InputArchive::m_idToClassNameVector
protectedinherited

Definition at line 296 of file InputArchive.h.

◆ m_IdToObjectVector

IdToObjectVector& agxStream::InputArchive::m_IdToObjectVector
protectedinherited

Definition at line 294 of file InputArchive.h.

◆ m_IdToStorageAgentVector

IdToStorageAgentVector agxStream::InputArchive::m_IdToStorageAgentVector
protectedinherited

Definition at line 297 of file InputArchive.h.

◆ m_inputStream

std::istream& agxStream::InputArchive::m_inputStream
protectedinherited

Definition at line 292 of file InputArchive.h.

◆ m_isOpen

bool agxStream::Archive::m_isOpen
protectedinherited

Definition at line 120 of file Archive.h.

◆ m_lastNode

agx::TiXmlNode* agxStream::XMLInputArchive::m_lastNode
protected

Definition at line 140 of file XMLInputArchive.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

◆ m_restoreListeners

RestoreListenerHash agxStream::InputArchive::m_restoreListeners
protectedinherited

Definition at line 304 of file InputArchive.h.

◆ m_sectionStack

agx::Vector<StackElement> agxStream::XMLInputArchive::m_sectionStack
protected

Definition at line 136 of file XMLInputArchive.h.

◆ m_stringBuf

std::stringstream agxStream::XMLInputArchive::m_stringBuf
protected

Definition at line 137 of file XMLInputArchive.h.

◆ restoreEvent

RestoreEvent agxStream::InputArchive::restoreEvent
inherited

Definition at line 56 of file InputArchive.h.


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