Index

dkDataObject

Purpose:

dkDataObject is an abstract class, a subclass of dkDataObjectBase, representing objects that can have persistent data. It needs to become a subclass so that a real object can be implemented. An example subclass of dkDataObject is DDO - Dynamic Data Object.

Heirarchy:

  dkDataObjectBase
 dkDataObject
 

Class summary:

class DKEXPORT dkDataObject : public dkDataObjectBase
{
  public:
    dkDataObject(); 
    dkDataObject(const 
& aPid); 
    virtual ~dkDataObject();
 
    virtual const DKPid& getPidObject() const;
    virtual void setPidObject(const DKPid& aPid);
 
    virtual const DKPid* getPidObject();
    virtual void setPidObject(const DKPid* pid);
};

dkDataObject has a PID (persistent identifier). PID identifies the location of the persistent data of this data object in the datastore. If the PID is not set, it will be created automatically after the first data manipulation operation. dkDataObject inherits protocol from its parent dkDataObjectBase. It supports the following protocols:

Members:

Constructors and destructor
    dkDataObject(); 
    dkDataObject(const DKPid& aPid); 
 
    virtual ~dkDataObject();

Member functions

getPid
getPid has been deprecated and replaced by getPidObject.
virtual const DKPid& getPid() const;

setPid
setPid has been deprecated and replaced by setPidObject.
virtual void setPid(const DKPid& aPid);

getPidObject
Gets the PID of this dkDataObject. To get the pid out of the DKDDO, and then get the pidString out of the pid, you will need to do casting like the following example to avoid getting compiler errors. The pDDO in the example is a pointer to a DKDDO instance:
DKString Tmp = ((DKPid*)(pDDO->getPidObject()))->pidString();

virtual const DKPid* getPidObject();

setPidObject
Sets the PID of this dkDataObject by copying data from source PID to this data-object's PID.
virtual void setPidObject(const DKPid* pid);

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.