#include <iopcPersistentObject.h>
Inheritance diagram for IopcPersistentObject:
Public Member Functions | |
virtual void | iopcInitObject (bool loadingFromDB)=0 |
OidType | getOID () const |
bool | IsDirty () const |
bool | MarkAsDirty () |
bool | IsPersistent () const |
bool | IsTransient () const |
bool | Free () |
RefBase | BePersistent (class Connection *connection) |
bool | Delete () |
bool | Update () |
ProtoBase * | Prototype () const |
RefBase | operator & () |
Protected Member Functions | |
virtual int | iopcImportAttributes (IopcImportExportStruct *data, int dataLen)=0 |
virtual int | iopcExportAttributes (IopcImportExportStruct *data, int dataLen)=0 |
IopcPersistentObject () | |
virtual | ~IopcPersistentObject () |
bool | _MarkAsClean () |
Protected Attributes | |
IopcClassObject * | m_classObject |
bool | m_isPersistent |
bool | m_isDirty |
OidType | m_oid |
This class is parent of all persistent classes except old POLiTe-style persistent classes. (POLiTe-style persistent classes are ancestors of ImmutableObject, DatabaseObject or PersistentObject.)
Ancestors of this class have to implement this class's pure virtual functions and a few static functions. All these functions are generated when processing user source files by IOPC SP.
|
Simple constructor
|
|
Empty destructor.
|
|
Initializes flags that says which attributes of current instance are valid.
If This function is implemented in each ancestor of this class - its code is generated by IOPC SP. The function is called when loading persistent object from DB to memory and when BePersistent() is called on a transient object. |
|
Sets object attributes according to values in array See IopcImportExportStruct and IopcClassObjectImpl::importExportArray for further information. This function is implemented in each ancestor of this class - its code is generated by IOPC SP.
|
|
Fills object attributes into the array See IopcImportExportStruct and IopcClassObjectImpl::importExportArray for further information. This function is implemented in each ancestor of this class - its code is generated by IOPC SP.
|
|
Returns object's OID
|
|
Returns true, if the object is marked as dirty (i.e. the object was changed in the memory).
Reimplemented from Object. |
|
Marks the persistent object as dirty.
Reimplemented from Object. |
|
Returns true if the object is persistent, false otherwise.
Reimplemented from Object. |
|
Returns true if the object is transient, false otherwise.
Reimplemented from Object. |
|
Removes the referenced object from memory only
Reimplemented from Object. |
|
Makes the object persistent (if it was transient). Initializes object's persistence flags (iopcInitObject()), inserts it into the database (IopcClassObject::insertObject()) and registers it in object cache (ObjectBuffer::RegisterObject()).
Reimplemented from Object. |
|
Removes the referenced object both from the memory and from the database.
Reimplemented from Object. |
|
Writes the object from the memory to the database. Does nothing if the object is not persistent or not dirty.
Reimplemented from Object. |
|
Returns IopcProtoBaseAdaptor that corresponds to m_classObject. Used by old POLiTe classes.
Implements ObjRef. |
|
Returns Ref<T> reference to the object.
|
|
Marks the persistent object as clean (not changed).
Reimplemented from Object. |
|
Pointer to IopcClassObjectImpl that represents persistent object's class. Set in IopcPersistentObject::iopcInitObject() or IopcClassObjectImpl::loadObject(). |
|
Is this instance persistent?
|
|
Is the object dirty? (Has it been changed?).
|
|
Object ID - unique identifier of persistent object instance.
|