All Classes Functions Variables Typedefs Friends Pages
Public Member Functions | List of all members
Glympse::IPersistable Struct Referenceabstract

The IPersistable interface declares the two methods that a class must implement so that instances of that class can be encoded and decoded. More...

#include <IPersistable.h>

Inheritance diagram for Glympse::IPersistable:
Inheritance graph
[legend]

Public Member Functions

virtual void encode (const GPrimitive &encoder, int32 mode)=0
 Encodes the receiver using a given archiver. More...
 
virtual void decode (const GPrimitive &decoder)=0
 Initializes an object from data in a given unarchiver. More...
 
- Public Member Functions inherited from Glympse::ICommon
virtual int32 retain ()=0
 Add a reference to our object in a COM-like way.
 
virtual int32 release ()=0
 Release a reference to our object in a COM-like way.
 
virtual int32 hold ()=0
 Add a reference to our object in a COM-like way.
 
virtual int32 unhold ()=0
 Release a reference to our object in a COM-like way.
 
virtual int32 hashCode ()=0
 Returns an integer hash code for this object.
 
virtual bool equals (const GCommonObj &o)=0
 Compares this instance with the specified object and indicates if they are equal. More...
 
virtual GString toString ()=0
 Returns a string containing a concise, human-readable description of this object. More...
 
virtual void attachObject (const GCommon &obj)=0
 Asociates arbitrary object with the instance.
 
virtual GCommon extractObject ()=0
 Extracts associated object or NULL if no association is established.
 

Additional Inherited Members

- Protected Member Functions inherited from Glympse::ICommon
virtual ~ICommon ()
 Destructor is protected to deny explicit object deallocation. More...
 

Detailed Description

The IPersistable interface declares the two methods that a class must implement so that instances of that class can be encoded and decoded.

This capability provides the basis for archiving (where objects and other structures are stored on disk) and distribution (where objects are copied to different address spaces).

Member Function Documentation

virtual void Glympse::IPersistable::decode ( const GPrimitive decoder)
pure virtual

Initializes an object from data in a given unarchiver.

Decoding mode is not propagated. The method should pick up everything it finds.

virtual void Glympse::IPersistable::encode ( const GPrimitive encoder,
int32  mode 
)
pure virtual

Encodes the receiver using a given archiver.

Parameters
encoderAn archiver object.
modeEncoding mode is propagated through the entire hierarchy of objects providing caller with a chance to control the process.

The documentation for this struct was generated from the following file: