The Qgar library provides means to serialize (i.e. write on an output stream) and deserialize (i.e. read from an input file) an object, instance of a class.
The class of such an object must derive from class qgar::ISerializable and implement the two pure virtual functions qgar::ISerializable::read and qgar::ISerializable::write, using global functions qgar::qgReadObjName and qgar::qgReadObjData. See class qgar::GenSegment for an example.
An object of the class may then be write on an output stream and read from an output stream using stream operators qgar::operator<<() and qgar::operator>>(), respectively.
The following objects may be serialized/deserialized:
Classes | |
| class | qgar::ISerializable |
| Base interface of all serializable objects. More... | |
Point serialization/deserialization operators | |
| |
| template<class T> | |
| std::istream & | qgar::operator>> (std::istream &anInStream, GenPoint< T > &aPt) |
| Deserialize a point (read it from an input stream). | |
| template<class T> | |
| std::ostream & | qgar::operator<< (std::ostream &anOutStream, const GenPoint< T > &aPt) |
| Serialize a point (write it into an output stream). | |
Stream operators for object serialization/deserialization | |
| std::istream & | qgar::operator>> (std::istream &anInStream, ISerializable &aSerial) |
| Reads a serializable object from and input stream. | |
| std::ostream & | qgar::operator<< (std::ostream &anOutStream, const ISerializable &aSerial) |
| Writes a serializable object to an output stream. | |
|
||||||||||||
|
Writes a serializable object to an output stream.
Definition at line 284 of file ISerializable.H. |
|
||||||||||||||||
|
Serialize a point (write it into an output stream). A serialized point is represented as: Point ( <X> ) ( <Y> )
Definition at line 796 of file _QGAR_GenPoint.TCC. |
|
||||||||||||
|
Reads a serializable object from and input stream.
Definition at line 268 of file ISerializable.H. |
|
||||||||||||||||
|
Deserialize a point (read it from an input stream). A serialized point is represented as: Point ( <X> ) ( <Y> )
Definition at line 776 of file _QGAR_GenPoint.TCC. References qgar::qgReadObjData(), and qgar::qgReadObjName(). |