Download Now

    Reference TNamedValues<T>

    Declared in Codebot.System.pas on line 814

    TNamedValues<T> is a simple case insensitive string based dictionary
      TNamedValues<T> = record
      public
        { Get the enumerator for the dictionary names }
        function GetEnumerator: IEnumerator<string>;
        { Adds or replace a named value in the dictionary }
        procedure Add(const Name: string; const Value: T);
        { Remove a named value from the dictionary }
        procedure Remove(const Name: string);
        { Removes an item by index from the dictionary and decreases the count by
          one }
        procedure Delete(Index: Integer);
        { Removes all named values setting the count of the dictionary to 0 }
        procedure Clear;
        { Returns true if a named key is in the dictionary }
        function HasName(const Name: string): Boolean;
        { The number of key value pairs in the dictionary }
        property Count: Integer read GetCount;
        { Returns true if there are no named values in the dictionary }
        property Empty: Boolean read GetEmpty;
        { Names indexed by an integer }
        property Names[Index: Integer]: string read GetName;
        { Values indexed by a named key }
        property Values[Name: string]: T read GetValue; default;
        { Values indexed by an integer }
        property ValueByIndex[Index: Integer]: T read GetValueByIndex;
      end;