Serialize Class Reference

[Kpvm Index] [Kpvm Hierarchy] [Headers]


Serialize is the superclass of all serializable objects. More...

#include <serialize.h>

Inherits: QObject

Public Members

Protected Members


Detailed Description

It gives the possibility to dump/load its actual State to/from a specially formatted string. So all pvm-sendable objects _must_ inherit from Serialize .


friend class KPvm[public]

allows the KPvm class to dump/restore the objectState to the actual Serialize object

QList<VarTuple> objState() const [protected virtual]

dumps the actual object state into a QList of VarTuples

It has to be implemented by all subclasses!

Returns:
the state-representing QStringList.
See Also:
setObjState, setFixedOrderObjState

void setFixedOrderObjState(QList<VarTuple> fixedOrderedState) [protected virtual]

sets the actual object state according to the given QList of VarTuples

Here it may be, that the VarTags may _not_ be valid, so we have to assume the same fixed order as we used when dumping in setObjState

It has to be implemented by all subclasses!

Parameters:
fixedOrderedState the state-representing QList of VarTuples in a fixed order
See Also:
setObjState, objState

void setObjState(QList<VarTuple> state) [protected virtual]

sets the actual object state according to the given QList of VarTuples

All VarTags have to be valid, but the order may be different not even complete from when we've dumped in setObjState

So we have to implement a search for finding the correct [VarTag:VarType:Value]-Tuple for our variables to fill with. I would suggest to use QDict for quick access.

It has to be implemented by all subclasses!

Parameters:
state the state-representing QList of VarTuples in any (incomplete) order
See Also:
objState, setFixedOrderObjState

  • Author: Michael Kropfberger <michael.kropfberger@gmx.net>
  • Documentation generated by mike@kermit on Mon Jun 29 21:55:33 MEST 1998
Kdoc