|
AGX Dynamics 2.42.3.1
|
XML version of an OutputArchive (for storing serialized objects). More...
#include <XMLOutputArchive.h>
Inheritance diagram for agxStream::XMLOutputArchive:Public Member Functions | |
| XMLOutputArchive (std::ostream &outputStream) | |
| Constructor that creates a XML based output archive. | |
| XMLOutputArchive (std::ostream &outputStream, ObjectToIdMapContext &mapCache) | |
| virtual void | addAttribute (const char *name, agx::Int32 value) |
| virtual void | addAttribute (const char *name, agx::Int8 value) |
| virtual void | addAttribute (const char *name, agx::UInt16 value) |
| virtual void | addAttribute (const char *name, agx::UInt32 value) |
| virtual void | addAttribute (const char *name, agx::UInt64 value) |
| virtual void | addAttribute (const char *name, agx::UInt8 value) |
| virtual void | addAttribute (const char *name, bool value) |
| virtual void | addAttribute (const char *name, char value) |
| virtual void | addAttribute (const char *name, const agx::Uuid &value) |
| virtual void | addAttribute (const char *name, const char *value) |
| virtual void | addAttribute (const char *name, double value) |
| virtual void | addAttribute (const char *name, float value) |
| virtual void | beginSection (const char *title) |
| void | close () |
| Method for closing the archive, important to call this as it will flush the data to the outputstream. | |
| virtual void | endSection (const char *title) |
| virtual void | write (agx::Int16 val) |
| virtual void | write (agx::Int16 val) |
| virtual void | write (agx::Int32 val) |
| virtual void | write (agx::Int32 val) |
| virtual void | write (agx::Int64 val) |
| virtual void | write (agx::Int64 val) |
| virtual void | write (agx::Int8 val) |
| virtual void | write (agx::Int8 val) |
| virtual void | write (agx::UInt16 val) |
| virtual void | write (agx::UInt16 val) |
| virtual void | write (agx::UInt32 val) |
| virtual void | write (agx::UInt32 val) |
| virtual void | write (agx::UInt64 val) |
| virtual void | write (agx::UInt64 val) |
| virtual void | write (agx::UInt8 val) |
| virtual void | write (agx::UInt8 val) |
| virtual void | write (bool val) |
| virtual void | write (bool val) |
| virtual void | write (char val) |
| virtual void | write (char val) |
| void | write (const agx::AffineMatrix4x4d &val) |
| void | write (const agx::AffineMatrix4x4f &val) |
| void | write (const agx::Matrix3x3d &val) |
| void | write (const agx::Matrix3x3f &val) |
| void | write (const agx::Matrix4x4d &val) |
| void | write (const agx::Matrix4x4f &val) |
| virtual void | write (const agx::Name &val) |
| void | write (const agx::Quat &val) |
| void | write (const agx::RangeReal &val) |
| void | write (const agx::SPDMatrix3x3 &val) |
| virtual void | write (const agx::String &val) |
| virtual void | write (const agx::Uuid &val) |
| virtual void | write (const agx::Uuid &val) |
| void | write (const agx::Vec2d &val) |
| void | write (const agx::Vec2f &val) |
| void | write (const agx::Vec2i32 &val) |
| void | write (const agx::Vec2i64 &val) |
| virtual void | write (const agx::Vec3d &val) |
| void | write (const agx::Vec3d &val) |
| virtual void | write (const agx::Vec3f &val) |
| void | write (const agx::Vec3f &val) |
| void | write (const agx::Vec3i32 &val) |
| void | write (const agx::Vec3i64 &val) |
| void | write (const agx::Vec4d &val) |
| void | write (const agx::Vec4f &val) |
| virtual void | write (const char *val) |
| void | write (const Serializable &serializable, StorageMode mode) |
| void | write (const Serializable *serializable, StorageMode mode) |
| virtual void | write (const std::string &val) |
| virtual void | write (const std::string &val) |
| virtual void | write (const void *buf, size_t len) |
| This method will write raw data into the archive. | |
| virtual void | write (const void *buf, size_t len) |
| This method will write raw data into the archive. | |
| virtual void | write (double val) |
| virtual void | write (double val) |
| virtual void | write (float val) |
| virtual void | write (float val) |
Public Member Functions inherited from agxStream::OutputArchive | |
| OutputArchive (std::ostream &outputStream) | |
| Create and associate an OutputArchive for writing to an open stream. | |
| OutputArchive (std::ostream &outputStream, ObjectToIdMapContext &cache) | |
| virtual void | addAttribute (const char *name, agx::Int32 value) |
| virtual void | addAttribute (const char *name, agx::Int8 value) |
| virtual void | addAttribute (const char *name, agx::UInt16 value) |
| virtual void | addAttribute (const char *name, agx::UInt32 value) |
| virtual void | addAttribute (const char *name, agx::UInt64 value) |
| virtual void | addAttribute (const char *name, agx::UInt8 value) |
| virtual void | addAttribute (const char *name, bool value) |
| virtual void | addAttribute (const char *name, char value) |
| virtual void | addAttribute (const char *name, const agx::Uuid &value) |
| virtual void | addAttribute (const char *name, const char *value) |
| virtual void | addAttribute (const char *name, double value) |
| virtual void | addAttribute (const char *name, float value) |
| bool | addModification (const char *str) |
| Add a modification string that will be stored in the archive. | |
| virtual void | beginSection (const char *) override |
| void | close () override |
| Call flush. | |
| virtual void | endSection (const char *) override |
| void | flush () |
| Make sure all data in buffer is written to associated stream. | |
| bool | getEndianMatch () const |
| int | getNumObjectsSkipped () const |
| int | getNumObjectsWritten () const |
| std::ostream & | getStream () |
| Return a reference to the output stream. | |
| bool | getUseCurrentDate () |
| Return if the current date (and time) at execution time should be used when creating archive, or if the build date should be used. | |
| agx::UInt32 | getWriteBufferSize () const |
| bool | hasModification (const agx::String &modification) const |
| void | open (const std::string &appName) |
| Open a new stream and write an archive header with some version information. | |
| void | setWriteBufferSize (agx::UInt32 bufferSize) |
| Specify a new buffer size for the write buffer. | |
| virtual void | write (agx::Int16 val) |
| virtual void | write (agx::Int32 val) |
| virtual void | write (agx::Int64 val) |
| virtual void | write (agx::Int8 val) |
| virtual void | write (agx::UInt16 val) |
| virtual void | write (agx::UInt32 val) |
| virtual void | write (agx::UInt64 val) |
| virtual void | write (agx::UInt8 val) |
| virtual void | write (bool val) |
| virtual void | write (char val) |
| void | write (const agx::AffineMatrix4x4d &val) |
| void | write (const agx::AffineMatrix4x4f &val) |
| void | write (const agx::Matrix3x3d &val) |
| void | write (const agx::Matrix3x3f &val) |
| void | write (const agx::Matrix4x4d &val) |
| void | write (const agx::Matrix4x4f &val) |
| virtual void | write (const agx::Name &val) |
| void | write (const agx::Quat &val) |
| void | write (const agx::RangeReal &val) |
| void | write (const agx::SPDMatrix3x3 &val) |
| virtual void | write (const agx::String &val) |
| virtual void | write (const agx::Uuid &val) |
| void | write (const agx::Vec2d &val) |
| void | write (const agx::Vec2f &val) |
| void | write (const agx::Vec2i32 &val) |
| void | write (const agx::Vec2i64 &val) |
| void | write (const agx::Vec3d &val) |
| void | write (const agx::Vec3f &val) |
| void | write (const agx::Vec3i32 &val) |
| void | write (const agx::Vec3i64 &val) |
| void | write (const agx::Vec4d &val) |
| void | write (const agx::Vec4f &val) |
| void | write (const Serializable &serializable, StorageMode mode) |
| void | write (const Serializable *serializable, StorageMode mode) |
| virtual void | write (const std::string &val) |
| virtual void | write (const void *buf, size_t len) |
| This method will write raw data into the archive. | |
| virtual void | write (double val) |
| virtual void | write (float val) |
| template<typename VECTOR_TYPE > | |
| AGXCORE_EXPORT void | write_vector (const agx::String &name, const VECTOR_TYPE &val) |
| Write an array of data. | |
| virtual void | writeObjectByRef (const Serializable *obj) |
| virtual void | writeObjectByVal (const Serializable &obj) |
Public Member Functions inherited from agxStream::Archive | |
| Archive () | |
| virtual void | beginSection (const char *)=0 |
| virtual void | close () |
| virtual void | endSection (const char *)=0 |
| bool | getBinaryMode () const |
| bool | isOpen () const |
| virtual void | newAttribute () |
| Called whenever a new item is initiated. | |
| void | setBinaryMode (bool m) |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Protected Member Functions | |
| XMLOutputArchive (const XMLOutputArchive &) | |
| virtual | ~XMLOutputArchive () |
| Destructor. | |
| void | addString (const char *str) |
| bool | flush () |
| XMLOutputArchive & | operator= (const XMLOutputArchive &) |
Protected Member Functions inherited from agxStream::OutputArchive | |
| OutputArchive () | |
| OutputArchive (const OutputArchive &) | |
| virtual | ~OutputArchive () |
| Destructor. | |
| OutputArchive & | operator= (const OutputArchive &) |
| virtual void | writeArchiveHeader (const std::string &appName, agx::UInt8 generationVersion, agx::UInt8 majorVersion, agx::UInt8 minorVersion, agx::UInt8 patchVersion, const std::string &revision, agx::UInt16 serializationVersion) |
| void | writeBitSize () |
| virtual void | writeHeaderData (agx::UInt32 magic, const std::string &appName, agx::UInt8 generationVersion, agx::UInt8 majorVersion, agx::UInt8 minorVersion, agx::UInt8 patchVersion, const std::string &revision, agx::UInt16 serializationVersion) |
| virtual void | writeObjectHeader (StorageMode mode, StorageAgent *agent) |
| virtual void | writeTypeHeader (StorageAgent *agent) |
Protected Member Functions inherited from agxStream::Archive | |
| virtual | ~Archive () |
| Destructor. | |
| void | open () |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Additional Inherited Members | |
Public Types inherited from agxStream::OutputArchive | |
| typedef agx::HashTable< const Serializable *, IdEntry > | ObjectToIdMap |
| typedef agx::HashTable< StorageAgent *, agx::UInt32 > | StorageAgentToIdMap |
| typedef agx::Event2< const Serializable *, agx::UInt32 > | StoreEvent |
Static Public Member Functions inherited from agxStream::OutputArchive | |
| static void | setUseCurrentDate (bool flag) |
| Specify if the current date (and time) at execution time should be used when creating archive, or if the build date should be used. | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Public Attributes inherited from agxStream::OutputArchive | |
| StoreEvent | storeEvent |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
Protected Attributes inherited from agxStream::OutputArchive | |
| ObjectToIdMapContext | m_defaultCache |
| int | m_numObjectsSkipped |
| int | m_numObjectsWritten |
| ObjectToIdMapContext & | m_objectToIdMap |
| std::ostream & | m_outputStream |
| StorageAgentToIdMap | m_storageAgentToIdMap |
Protected Attributes inherited from agxStream::Archive | |
| bool | m_isOpen |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
XML version of an OutputArchive (for storing serialized objects).
The data sent to the outputStream will be human readable. Take more storage and is slower than binary archive, but handy for debugging purposes.
Definition at line 51 of file XMLOutputArchive.h.
| agxStream::XMLOutputArchive::XMLOutputArchive | ( | std::ostream & | outputStream | ) |
Constructor that creates a XML based output archive.
The precision used for writing real values will be acquired from the stream (stream.precision()). However the minimum precision is 8 significant numbers. Data will only be written to the stream when the archive is either flushed or closed. (or at the destructor of the Archive).
| agxStream::XMLOutputArchive::XMLOutputArchive | ( | std::ostream & | outputStream, |
| ObjectToIdMapContext & | mapCache | ||
| ) |
|
protectedvirtual |
Destructor.
|
protected |
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
protected |
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
inlinevirtual |
Method for closing the archive, important to call this as it will flush the data to the outputstream.
Reimplemented from agxStream::OutputArchive.
Definition at line 119 of file XMLOutputArchive.h.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
protected |
|
protected |
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
| void agxStream::OutputArchive::write | ( | const agx::AffineMatrix4x4d & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::AffineMatrix4x4f & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Matrix3x3d & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Matrix3x3f & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Matrix4x4d & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Matrix4x4f & | val | ) |
|
inlinevirtual |
Reimplemented from agxStream::OutputArchive.
Definition at line 148 of file OutputArchive.h.
| void agxStream::OutputArchive::write | ( | const agx::Quat & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::RangeReal & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::SPDMatrix3x3 & | val | ) |
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
| void agxStream::OutputArchive::write | ( | const agx::Vec2d & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Vec2f & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Vec2i32 & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Vec2i64 & | val | ) |
|
virtual |
| void agxStream::OutputArchive::write | ( | const agx::Vec3d & | val | ) |
|
virtual |
| void agxStream::OutputArchive::write | ( | const agx::Vec3f & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Vec3i32 & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Vec3i64 & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Vec4d & | val | ) |
| void agxStream::OutputArchive::write | ( | const agx::Vec4f & | val | ) |
|
virtual |
| void agxStream::OutputArchive::write | ( | const Serializable & | serializable, |
| StorageMode | mode | ||
| ) |
| void agxStream::OutputArchive::write | ( | const Serializable * | serializable, |
| StorageMode | mode | ||
| ) |
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
This method will write raw data into the archive.
Notice that you should always have called beginSection() prior to calling this method. Otherwise it is not compatible with XML output.
The raw data will be encoded before written as string into the XML tree
| buf | - Pointer to the data to be written |
| len | - Number of bytes to write |
Reimplemented from agxStream::OutputArchive.
|
virtual |
This method will write raw data into the archive.
Notice that you should always have called beginSection() prior to calling this method. Otherwise it is not compatible with XML output.
| buf | - Pointer to the data to be written |
| len | - Number of bytes to write |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.
|
virtual |
Reimplemented from agxStream::OutputArchive.