Skip to content

TFPHashObject

Hash-list aware object.

Declaration

Source position: contnrs.pp line 287

type

  TFPHashObject = class
  public
    constructor CreateNotOwned;
    constructor Create;
    procedure ChangeOwner;
    procedure ChangeOwnerAndName;
    procedure Rename;
    property Name: RawByteString; {r}
    property Hash: LongWord; {r}
    property OwnerList: TFPHashObjectList; {r}
  end;

Description

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.

Properties

Member Visibility Description
Hash read only public Hash value.
Name read only public Current name of the object.
OwnerList read only public

Methods

Member Visibility Description
ChangeOwner public Change the list owning the object.
ChangeOwnerAndName public Simultaneously change the list owning the object and the name of the object.
Create public Create a named instance, and insert in a hash list.
CreateNotOwned public Create an instance not owned by any list.
Rename public Rename the object.

See also

Name Description
TFPHashObject.Name Current name of the object.
TFPHashObject.ChangeOwner Change the list owning the object.
TFPHashObject.ChangeOwnerAndName Simultaneously change the list owning the object and the name of the object.