Class TStringStringMap

Unit

Declaration

type TStringStringMap = class(specialize TDictionary<string,string>)

Description

String-to-string map. Note that in simple cases you can also use standard TStringList functionality (see it's properties Names, Values), but this is better if your key/values may be multiline.

Hierarchy

  • TObject
  • TDictionary
  • TStringStringMap

Overview

Methods

Public procedure PutPreserve(const Name, Content: string);
Public function CreateCopy: TStringStringMap;
Public procedure Assign(const Source: TStringStringMap);

Properties

Public property Items [constAKey:string]: string read GetItems write SetItems;

Description

Methods

Public procedure PutPreserve(const Name, Content: string);

Set given key value, trying to preserve previous key value too. This is useful for safely setting X3D META values.

Compared to normal PutKeyData, this behaves smarter if given Name is already set. If it's set with the same Content, we do nothing. If the Content is different, we move previous content to a Name + '-previous' key. This way previous content value is preserved once (but not more, to not grow the X3D file indefinitely).

Public function CreateCopy: TStringStringMap;

Create another TStringStringMap with exactly the same contents at the beginning.

Public procedure Assign(const Source: TStringStringMap);

Assign contents (all keys, values) of another TStringStringMap instance.

Properties

Public property Items [constAKey:string]: string read GetItems write SetItems;

Access dictionary items. Setting this is allowed regardless if the key previously existed or not, in other words: setting this does AddOrSetValue, contrary to the ancestor TDictionary that only allows setting when the key already exists.


Generated by PasDoc 0.15.0.