Class AMappingEntry
Unit
classwork
Declaration
type AMappingEntry = class(AStringLeaf)
Description
This class represents a mapping entry, which is an item that is indexed by a string key and which maps that key to a value. The base class places no restrictions on the type of value that can be represented by the entry; it stipulates only that descendant classes must provide a way to represent that value as a string.
Hierarchy
Overview
Methods
|
function implode(delimiter: string = ''): AnsiString; virtual; |
|
function toString: AnsiString; override; |
|
function valueAsString: string; virtual; abstract; |
Description
Methods
|
function implode(delimiter: string = ''): AnsiString; virtual; |
Implode the entry into a string that contains a key/value pair, where the key and value are separated by delimiter .
This method calls Self.name to obtain the value of the entry's string key and AMappingEntry.valueAsString to obtain the entry's present value.
If delimiter is not specified by the caller, or if it is an empty string, then the value of mapDefaultDelimiter is used.
|
|
function toString: AnsiString; override; |
Construct and return a string representation of the entry, suitable for printing to a text-based device, such as a console.
In accordance with the criteria described by APrintingObject.toString, the string representation returned by this method will include the name of the entry (returned by a call to ADictionaryEntry.name) and a string representation of its value (returned by a call to Variants.varToStr ), separated by the delimiter specified in mapDefaultDelimiter. This string is obtained by calling AMappingEntry.implode.
|
|
function valueAsString: string; virtual; abstract; |
Return the value of the mapping entry as a string. This method must be implemented by descendant classes.
|
Generated by PasDoc 0.13.0 on 2015-06-23 19:40:11
|