Contains types and classes used to implement a list of file references.

Implements the TFileReference and TFileReferenceList classes. Provides a list of file references with reference counters and a search path for files in the list.

Author: Mattias Gaertner

This file is part of the lazutils package.

Represents a reference-counted file stored in TFileReferenceList.

TFileReference is a class used to represent a reference-counted file stored in the TFileReferenceList class. It provides FileName and ReferenceCount properties which are maintained by methods in TFileReferenceList.

Contains the name for the reference-counted file in the class instance.

FileName is a read-only String property with the name for the reference-counted file. The value in FileName is assigned in the TFileReferenceList.AddFilename method when the class instance is created.

Use ReferenceCount to determine the number of times the file is referenced in the AVL Tree for the TFileReferenceList class where the item is stored.

Contains the number of references for the file. Represents flag values used for file references in TFileReferenceList. Included when the search path for a file reference list is valid. Included when the Timestamp or UpdateLock is changed for a file reference list. Set type used to store flag values for TFileReferenceList. Implements a list used to maintain TFileReference instances. Tree of TFileReference instances sorted by file name. Reconstructs the delimited list of search path(s) for the files in the list. Increments the value in the TimeStamp property. Updates the TimeStamp and internal flags for the list, and signal OnChange when needed. Constructor for the class instance.

Sets the default value for the Timestamp property (LUInvalidChangeStamp64).

LUInvalidChangeStamp64
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. It calls Clear to remove nodes in the internal AVL Tree for the class instance. Calls the inherited destructor prior to exiting from the method.

Removes any tree nodes in the internal AVL tree. Also frees the TFileReference instance for the AVL tree nodes. Increments the UpdateLock for the class instance. Decrements the UpdateLock and signals OnChange when needed. Adds a reference-counted file name to the list. File name added to the list and the internal AVL tree. Remove a reference for the specified file name. File name de-referenced in the list and optionally removed from the internal AVL tree. Gets an existing TFileReference instance for the specified file name. TFileReference instance for the specified file name, or Nil when not found. File name to locate in the list. Gets a delimited list of search paths for the reference-counted files in the list. Delimited list of search paths for the reference-counted files. Creates and returns a TStringList instance with the file names in the list. TStringList instance allocated in the method for the list of file names. Contains the timestamp value for the last change to the list. Event handler signalled when items in the list have been changed. Contains the active update counter for the list.