#include <cObjectIdentification.h>
Collaboration diagram for ObjectIdentification:
Public Member Functions | |
ObjectIdentification () | |
ObjectIdentification (class ProtoBase *aPrototype, char *const aSelectKeyValues) | |
ObjectIdentification (const class Object *anObject) | |
ObjectIdentification (const long anOid, class ProtoBase *aPrototype) | |
ObjectIdentification (const ObjectIdentification &X) | |
virtual | ~ObjectIdentification () |
virtual class ProtoBase * | Prototype () const |
virtual bool | operator== (const ObjectIdentification &X) const |
virtual bool | operator!= (const ObjectIdentification &X) const |
virtual ObjectIdentification & | operator= (const ObjectIdentification &X) |
Protected Member Functions | |
virtual bool | _Init (class ProtoBase *aPrototype, char *const aSelectKeyValues) |
virtual bool | _Init (const class Object *anObject) |
Protected Attributes | |
char * | _SelectKeyValues |
OidType | oid |
POLiTe supported composite keys and string-type keys. That's why it used this class. Composite / simple keys in POLiTe were encoded into one string (_SelectKeyValues) and that string was used as OID.
IOPC uses simple integer type OID, so encoding and decoding of OID values is not a good idea. That's why I (Josef Troch) have added attribute oid that is used in IopcPersistentObject descendants. So in every object that comes from database _SelectKeyValues or oid is valid.
If oid is valid, _prototype may point to appropriate IopcProtoBaseAdaptor. If it is NULL, prototype isn't currently known and if accessing object, prototype will be distingushed according to data in project's main table.
ObjectIdentification
object directly from IopcProtoBaseAdaptor.
|
Construct empty identification (IDNULL).
|
|
Construct non-empty identification that identifies POLiTe-style persistent object stored in the database.
|
|
Construct non-empty identification that identifies object in the memory only.
|
|
Construct non-empty identification that identifies PersistentObject descendant in database.
|
|
Copy constructor.
|
|
Destructor - frees _SelectKeyValues.
|
|
Reinitializes already existing identification to point to POLiTe-style persistent object stored in the database.
|
|
Reinitializes already existing identification to point to in memory object only.
|
|
Returns object's prototype if known, NULL otherwise.
|
|
Compares two ObjectIdentification objects, returns true if they identify the same object.
|
|
Compares two ObjectIdentification objects, returns true if they don't identify the same object.
|
|
Classic operator =. Copies _SelectKeyValues if necessary.
|
|
Pointer to appropriate class prototype.
|
|
Pointer to the persistent object if it is in memory.
|
|
Encoded list of key values - used in old POLiTe-style persistent classes.
|
|
OID - used by new persistent classes - IopcPersistentObject descendants.
|