|
| | ~AbstractPersistenceOutputStream () override=default |
| void | startStructWithVersion (int version, const char *name=nullptr) |
| | Starts a versioned struct.
|
| template<typename T> |
| void | write (const std::vector< T > &values, const char *name=nullptr) |
| template<typename T, size_t n, class DataContainer> |
| void | write (const FloatingPointVector< T, n, DataContainer > &value, const char *name=nullptr) |
| | Writes float vectors like vec3f to the stream.
|
| template<typename T, size_t n> |
| void | write (const TVectorNDBase< T, n > &value, const char *name=nullptr) |
| | Writes integer vectors like ImageVector to the stream.
|
| template<typename T, size_t n> |
| void | write (const FloatingPointMatrix< T, n > &value, const char *name=nullptr) |
| | Writes float matrices like mat4 to the stream.
|
| virtual void | writeObject (const Base *const obj, const char *name=nullptr) |
| virtual void | writeData (const void *data, size_t len, const char *name=nullptr)=0 |
| | Writes binary data to stream.
|
| virtual bool | isValidElementName (const char *name) |
| virtual void | write (bool value, const char *name=nullptr) |
| void | write (MLint32 value, const char *name=nullptr) |
| void | write (MLuint32 value, const char *name=nullptr) |
| void | write (MLint64 value, const char *name=nullptr) |
| void | write (MLuint64 value, const char *name=nullptr) |
| void | write (MLfloat value, const char *name=nullptr) |
| void | write (MLdouble value, const char *name=nullptr) |
| void | write (const std::string &value, const char *name=nullptr) |
| void | write (const char *value, const char *name=nullptr) |
| 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.
|
| virtual bool | isBinary () const =0 |
|
| | AbstractPersistenceOutputStream () |
| virtual void | writeString (const char *name, const std::string &value)=0 |
| | Abstract writing method that needs to be implemented by derived classes.
|
| void | nameCheck (const char *name) override |
| virtual void | setObjectID (int id)=0 |
| virtual void | setObjectType (const char *type)=0 |
| | Sets base type.
|
| virtual void | setObjectVersion (int version)=0 |
| | Sets persistence version.
|
| virtual void | writeValues (const char *name, const MLint32 *values, size_t n, bool fixedList)=0 |
| virtual void | writeValues (const char *name, const MLuint32 *values, size_t n, bool fixedList)=0 |
| virtual void | writeValues (const char *name, const MLint64 *values, size_t n, bool fixedList)=0 |
| virtual void | writeValues (const char *name, const MLuint64 *values, size_t n, bool fixedList)=0 |
| virtual void | writeValues (const char *name, const MLfloat *values, size_t n, bool fixedList)=0 |
| virtual void | writeValues (const char *name, const MLdouble *values, size_t n, bool fixedList)=0 |
| | AbstractPersistenceStream () |
| virtual | ~AbstractPersistenceStream () |
| 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.
|
| virtual void | startListImpl (const char *name, const char *xmlItemName, bool xmlSuppressScope)=0 |
| virtual void | endListImpl ()=0 |
| virtual void | startStructImpl (const char *name)=0 |
| virtual void | endStructImpl ()=0 |
Class for writing object data to a stream.
This class has write methods for the types bool, MLint32, MLuint32, MLint64, MLuint64, float, double, std::string, and all vector and matrix types from MLLinearAlgebra. You can also write binary data (with writeData()) and Base objects (with writeObject()) to the stream.
Data can be organized in substructures or in lists. Data items usually have to be given a name, unless they are list items, in which case it is forbidden to give a name. Have a look at the startStruct()/endStruct() startList()/endList() methods of AbstractPersistenceStream on how to start/end new scopes.
Definition at line 120 of file mlAbstractPersistenceStream.h.