[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Classes' (#rtl)


Registers some integer-to-identifier mappings.


Source position: classesh.inc line 2265

procedure RegisterIntegerConsts(

  IntegerType: Pointer;

  IdentToIntFn: TIdentToInt;

  IntToIdentFn: TIntToIdent



RegisterIntegerConsts registers a pair of callbacks to be used when an integer of type IntegerType must be mapped to an identifier (using IntToIdentFn) or when an identifier must be mapper to an integer (using IdentToIntFn).

Component programmers can use RegisterIntegerConsts to associate a series of identifier strings with integer values for a property. A necessary condition is that the property should have a separate type declared using the type integer syntax. If a type of integer is defined in this way, an IDE can show symbolic names for the values of these properties.

The IntegerType should be a pointer to the type information of the integer type. The IntToIdentFn and IdentToIntFn are two callbacks that will be used when converting between the identifier and integer value and vice versa. The functions IdentToInt and IntToIdent can be used to implement these callback functions.

See also



Callback for converting identifiers to integers.



Callback for converting integers to identifiers.



Looks up an integer value in a integer-to-identifier map list.



Looks up an identifier for an integer value in a identifier-to-integer map list.

Documentation generated on: Jun 22 2020