[Overview][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Hash-list aware object
Source position: contnrs.pp line 268
type TFPHashObject = class |
||
protected |
||
function GetName; virtual; |
||
function GetHash; virtual; |
||
public |
||
constructor CreateNotOwned; |
|
Create an instance not owned by any list. |
constructor Create(); |
|
Create a named instance, and insert in a hash list. |
procedure ChangeOwner(); |
|
Change the list owning the object. |
procedure ChangeOwnerAndName(); |
|
Simultaneously change the list owning the object and the name of the object. |
procedure Rename(); |
|
Rename the object |
property Name: shortstring; [r] |
|
Current name of the object |
property Hash: LongWord; [r] |
|
Hash value |
end; |
|
Hash-list aware object |
|
| | ||
TObject |
TFPHashObject is a TObject descendent which is aware of the TFPHashObjectList class. It has a name property and an owning list: if the name is changed, it will reposition itself in the list which owns it. It offers methods to change the owning list: the object will correctly remove itself from the list which currently owns it, and insert itself in the new list.
|
Current name of the object |
|
|
Change the list owning the object. |
|
|
Simultaneously change the list owning the object and the name of the object. |
lazarus-ccr.sourceforge.net |