VCF::Persistable Class Reference
Persistable is a simple interface used to indicate that an object can read or write itself to an input or output stream. More...
#include <vcf/FoundationKit/Persistable.h>
Inheritance diagram for VCF::Persistable:

Public Member Functions | |
| virtual | ~Persistable () |
| virtual void | saveToStream (OutputStream *stream, const MIMEType &type=MIMEType())=0 |
| Write the object to the specified output stream. | |
| virtual void | loadFromStream (InputStream *stream, const MIMEType &type=MIMEType())=0 |
| Read the object from the specified input stream. | |
Detailed Description
Persistable is a simple interface used to indicate that an object can read or write itself to an input or output stream.This assumes that the object has been instantiated already.
Reading the object from a stream is done by implementing the loadFromStream method, and writing the object is accomplished by implementing the saveToStream method.
In both cases (loadFromStream() or saveToStream()) an optional type may be passed which indicates to the object what kind of data may be present in the stream or what kind of preferred data should be written to the stream. The default value for this parameter is empty (see MIMEType::isEmpty() ) and can be ignored if you don't require it.
- See also:
- MIMEType
Constructor & Destructor Documentation
|
|
|
Member Function Documentation
|
||||||||||||
|
Read the object from the specified input stream.
Implemented in VCF::DateTime, VCF::Dictionary, VCF::PropertyListing, VCF::AbstractImage, VCF::Rect, VCF::BinaryPersistable, VCF::DefaultListModel, and VCF::Frame::State. |
|
||||||||||||
|
Write the object to the specified output stream.
Implemented in VCF::DateTime, VCF::Dictionary, VCF::PropertyListing, VCF::AbstractImage, VCF::Rect, VCF::BinaryPersistable, VCF::DefaultListModel, and VCF::Frame::State. |
The documentation for this class was generated from the following file:
- vcf/FoundationKit/Persistable.h
