#include <adskDataStructureSerializer.h>
Class handling the definition of the format for serialization of data structures.
The adsk::Data::Structure class manages structure definitions. They are persisted using a serialization format implemented through the adsk::Data::StructureSerializer hierarchy. The base class defines the interface and manages the list of available structure serialization formats.
Public Member Functions | |
StructureSerializer () | |
Default constructor, does nothing. | |
virtual | ~StructureSerializer () |
Default destructor, does nothing. | |
virtual Structure * | read (std::istream &cSrc, std::string &errors) const =0 |
Implement this to parse the serialized form of an adsk::Data::Structure object. More... | |
virtual int | write (const Structure &dataToWrite, std::ostream &cDst) const =0 |
Implement this to output the adsk::Data::Structure definition in your serialization format. More... | |
virtual void | getFormatDescription (std::ostream &info) const =0 |
Implement this to provide a description of your adsk::Data::Structure serialization format. More... | |
|
pure virtual |
Implement this to parse the serialized form of an adsk::Data::Structure object.
Given an input stream containing your serialization of an adsk::Data::Structure parse the data and create the adsk::Data::Structure it describes.
If there are any problems the detailed error information should be returned in the errors string.
[in] | cSrc | Stream containing the serialization of the structure |
[out] | errors | String containing description of parse errors |
Implemented in StructureSerializerDebug.
|
pure virtual |
Implement this to output the adsk::Data::Structure definition in your serialization format.
Given an adsk::Data::Structure object and an output stream as destination write out enough information so that you can recreate the adsk::Data::Structure from data in the output stream using your adsk::Data::StructureSerializer::read() method.
[in] | dataToWrite | adsk::Data::Structure to be serialized |
[out] | cDst | stream to which the object is to be serialized |
Implemented in StructureSerializerDebug.
|
pure virtual |
Implement this to provide a description of your adsk::Data::Structure serialization format.
Output a textual description of your serialization format into the given stream.
[out] | info | stream in which to output your serialization format description |
Implemented in StructureSerializerDebug.