Skip to content

TDictionary

String substitution dictionary for variables and functions

Declaration

Source position: fpmkunit.pp line 577

type

  TDictionary = class(TComponent)
  public
    constructor Create;
    destructor Destroy;
    procedure AddVariable;
    procedure AddFunction;
    procedure RemoveItem;
    function GetValue(AName: string) : string;
    function GetValue(const AName: string; const Args: string) : string;
    function ReplaceStrings : string;
    function Substitute : string;
  end;

Description

TDictionary provides a string substitution system for variable and function expansion.

This class manages both static variable assignments and dynamic function callbacks for resolving configuration values.

The dictionary is used extensively throughout the build system to resolve paths, variables, and configuration parameters.

Methods

Member Visibility Description
AddFunction public Adds a function replacement callback to the dictionary
AddVariable public Adds a variable name-value pair to the dictionary
Create public Creates a new string substitution dictionary
Destroy public Destroys the dictionary and releases resources
GetValue public Retrieves substituted value for dictionary entry
RemoveItem public Removes a variable or function from the dictionary
ReplaceStrings public Performs string substitution using dictionary variables
Substitute public Substitutes macros in a string using the dictionary
See all Methods