getOidString(): String;
The getOidString method of the Object class returns the object identifier (oid) of the receiver in a string format.
The formats of the object id for shared and exclusive references are listed in the following table.
Type of Reference | Format | Example |
---|---|---|
Shared | class-id.instance-id | "305.1208" |
Exclusive | class-id.instance-id.parent-class-id.sublevel.sub-id | "66.101.305.2.1" |
The following example shows the use of the getOidString method.
getInstanceId(): String; vars oid : String; instId : String; pos : Integer; begin oid := self.getOidString; pos := oid.pos(".",1) + 1; instId := oid.scanUntil(".", pos); return instId; end;
When you already have the object, calling self.getOidStringForObject(self) is significantly faster than calling the getOidString method.