GObject Class Reference

[libgfc Index] [libgfc Hierarchy] [Headers]


Abstract base class for all the GFC serializable classes More...

#include <src/gobject.h>

Public Members


Detailed Description

Abstract base class for all the GFC serializable classes.


Result init(void) [public virtual]

initialize the object.

uint32 getPSize() const [public virtual]

returns the persistent data size. Persistent size of an object means the sum of all data members that need to be stored to disk in order to restore the current object state at a later time.

Result input(const char* ) [public virtual]

inputs member data from an ascii stream

Result output(char*& ) [public virtual]

output interesting member data to an ASCII stream. the returning string "out" is GFC's property and should not be freed; copy this string if necessary.

Result pack(DataPipe& ) [public virtual]

pack data into a binary data pipe; this is the serializing function that makes the data member of interest persistent.

Result unpack(DataPipe& ) [public virtual]

unpack data from a binary data pipe; the pipe may contain data of a record just returned from underlying DBMS. this will gurantee lossless restore of the data members previoulsy {\bf pack}'ed.

void setOid(const char* o) [public]

set the object Identifier; the oid is an 8-byte array. caller should have taken care of the byte-order; this method merely memcpys parameter array byte-wise.

const char* getOid(void) const [public]

return the object identifier as an 8-byte array.

friend DataPipe& operator<<(DataPipe& p, GObject& a) [public]

serializes object 'a' into the pipe. Starts at pipe's current position and advance the cursor accordingly. This function will call the correct version of {\bf pack()} method based on the dynamic type of the object being passed in. The user of the data pipe doesn't have to concern the exact type of the ADT object being stored into the pipe

friend DataPipe& operator>>(DataPipe& p, GObject& a) [public]

fetchs serialized memeber data from the pipe's current cursor; and advance the cursor accordingly. This function calls the correct version of unpack() method based on the dynamci type of the object being passed in. Note this and store() are global functions.


Documentation generated by lqian@lqian-sun on Wed Jul 14 09:36:10 EDT 1999
Kdoc