|
MeVisLab Toolbox Reference
|
Implementation for AbstractPersistenceInputStream using Xerces DOM Parser. More...
#include <mlXMLPersistenceStream.h>
Public Member Functions | |
| XMLPersistenceInputStream () | |
| this is the default constructor, use readFromFile or readFromString to fill the DOM | |
| XMLPersistenceInputStream (DOMElement *container) | |
| this constructor will read from the given XML element | |
| virtual | ~XMLPersistenceInputStream () |
| the destructor will free the DOM document if readFromFile or readFromString was used | |
| virtual void | readFromFile (const std::string &fileName) |
| Read the complete tree from a file. | |
| virtual void | readFromString (const std::string &str) |
| Read the complete tree from a string. | |
| Public Member Functions inherited from ml::AbstractPersistenceInputStream | |
| virtual | ~AbstractPersistenceInputStream () |
| int | startStructWithVersion (const char *name=nullptr) |
| Starts a struct, returns the version of struct (0 if not given). | |
| template<typename T> | |
| void | read (std::vector< T > &values, const char *name=nullptr) |
| template<typename T, size_t n, class DataContainer> | |
| void | read (FloatingPointVector< T, n, DataContainer > &value, const char *name=nullptr) |
| Reads float vectors like vec3f from the stream. | |
| template<typename T, size_t n> | |
| void | read (TVectorNDBase< T, n > &value, const char *name=nullptr) |
| Reads integer vectors like ImageVector from the stream. | |
| template<typename T, size_t n> | |
| void | read (FloatingPointMatrix< T, n > &value, const char *name=nullptr) |
| Reads float matrices like mat4 from the stream. | |
| template<typename T> | |
| void | readOptional (T &value, const T &defaultValue, const char *name=nullptr) |
| virtual Base * | readObject (const char *name=nullptr) |
| bool | hasNextInStruct (std::string &name) |
| bool | isNextInStruct (const char *name) |
| bool | hasNextListItem () |
| void | versionCheck (const char *className, int objectVersion, int storedVersion) |
| Prints a warning if the storedVersion is greater than the objectVersion. | |
| virtual void | read (bool &value, const char *name=nullptr) |
| void | read (MLint32 &value, const char *name=nullptr) |
| void | read (MLuint32 &value, const char *name=nullptr) |
| void | read (MLint64 &value, const char *name=nullptr) |
| void | read (MLuint64 &value, const char *name=nullptr) |
| void | read (MLfloat &value, const char *name=nullptr) |
| void | read (MLdouble &value, const char *name=nullptr) |
| void | read (std::string &value, const char *name=nullptr) |
| Public Member Functions inherited from ml::AbstractPersistenceStream | |
| void | startList (const char *name=nullptr, const char *xmlItemName="Item", bool xmlSuppressScope=false) |
| void | endList () |
| Ends reading/writing of the list. | |
| void | startStruct (const char *name=nullptr) |
| void | endStruct () |
| Ends reading/writing of struct values. | |
Static Public Member Functions | |
| static void | normalizeWindowsFileName (std::string &str) |
| replace / with \ character | |
| bool | isBinary () const override |
| void | readString (const char *name, std::string &value) override |
| Abstract reading method that needs to be implemented by derived classes. | |
| void | readData (std::string &value, const char *name) override |
| Same as readObject for binary data (std::string misused as binary data container). | |
| void | startListImpl (const char *name, const char *xmlItemName, bool xmlSuppressScope) override |
| void | endListImpl () override |
| void | startStructImpl (const char *name) override |
| void | endStructImpl () override |
| bool | hasNextInStructImpl (std::string &name) override |
| bool | hasNextListItemImpl () override |
| bool | getObjectID (int &id) override |
| bool | getObjectType (std::string &type) override |
| Returns base type. | |
| bool | getObjectVersion (int &version) override |
| Returns persistence version. | |
| void | readValues (const char *name, size_t expected, std::vector< MLint32 > &values) override |
| void | readValues (const char *name, size_t expected, std::vector< MLuint32 > &values) override |
| void | readValues (const char *name, size_t expected, std::vector< MLint64 > &values) override |
| void | readValues (const char *name, size_t expected, std::vector< MLuint64 > &values) override |
| void | readValues (const char *name, size_t expected, std::vector< MLfloat > &values) override |
| void | readValues (const char *name, size_t expected, std::vector< MLdouble > &values) override |
| void | formatError (const std::string &msg) override |
| overload, improves message with current parsing location | |
Additional Inherited Members | |
| Protected Member Functions inherited from ml::AbstractPersistenceInputStream | |
| AbstractPersistenceInputStream () | |
| Protected Member Functions inherited from ml::AbstractPersistenceStream | |
| AbstractPersistenceStream () | |
| virtual | ~AbstractPersistenceStream () |
| virtual void | nameCheck (const char *name) |
| bool | isInList () const |
| Checks whether the stream is currently in 'list' mode. Otherwise, it is in 'struct' mode. | |
| size_t | nestingDepth () const |
| Returns depth of nesting stack (created by startList/startStruct), used to check nesting rules. | |
| virtual void | internalError (const char *msg, const char *arg=nullptr) |
| Logs an internal error. Usually called to indicate wrong usage of interface. | |
Implementation for AbstractPersistenceInputStream using Xerces DOM Parser.
Definition at line 132 of file mlXMLPersistenceStream.h.
| ml::XMLPersistenceInputStream::XMLPersistenceInputStream | ( | ) |
this is the default constructor, use readFromFile or readFromString to fill the DOM
| ml::XMLPersistenceInputStream::XMLPersistenceInputStream | ( | DOMElement * | container | ) |
this constructor will read from the given XML element
|
virtual |
the destructor will free the DOM document if readFromFile or readFromString was used
|
overrideprotectedvirtual |
Implements ml::AbstractPersistenceStream.
|
overrideprotectedvirtual |
Implements ml::AbstractPersistenceStream.
|
overrideprotectedvirtual |
overload, improves message with current parsing location
Reimplemented from ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Implementation of Base object persistence, get attribute of currently open struct. Returns unique ID of object - currently unused.
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Returns base type.
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Returns persistence version.
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Checks whether an item with the given name comes next in the stream. The stream is guaranteed to be in a 'struct' scope.
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Checks whether there is another item in the current list. The stream is guaranteed to be in a 'list' scope.
Implements ml::AbstractPersistenceInputStream.
|
inlineoverridevirtual |
overridden methods
Implements ml::AbstractPersistenceStream.
Definition at line 155 of file mlXMLPersistenceStream.h.
|
static |
replace / with \ character
|
overridevirtual |
Same as readObject for binary data (std::string misused as binary data container).
Implements ml::AbstractPersistenceInputStream.
|
virtual |
Read the complete tree from a file.
|
virtual |
Read the complete tree from a string.
|
overridevirtual |
Abstract reading method that needs to be implemented by derived classes.
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Abstract reading methods that need to be implemented by derived classes. If expected size is 0, the returned list may have any size, otherwise exactly that number of elements are returned (or an exception is thrown).
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Implements ml::AbstractPersistenceInputStream.
|
overrideprotectedvirtual |
Abstract methods called by above methods, needs to be implemented in derived classes. Implementors do not need to perform error checking. xmlItemName and xmlSuppressScope only need to be regarded for XML format.
Implements ml::AbstractPersistenceStream.
|
overrideprotectedvirtual |
Implements ml::AbstractPersistenceStream.