System.Classes.RegisterIntegerConsts

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

procedure RegisterIntegerConsts(AIntegerType: Pointer; AIdentToInt: TIdentToInt; AIntToIdent: TIntToIdent);

C++

extern DELPHI_PACKAGE void __fastcall RegisterIntegerConsts(void * AIntegerType, TIdentToInt AIdentToInt, TIntToIdent AIntToIdent);

プロパティ

種類 可視性 ソース ユニット
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

説明

文字列識別子用の変換関数を登録します。

RegisterIntegerConsts 手続き(Delphi でのみ呼び出し可能)は,型識別子用の変換関数を登録します。RegisterIntegerConsts は,整数ベースの型とその型の値を表す文字列のセットを定義するユニットの initialization 部から呼び出します。

AIntegerType は,値が文字列として表される整数ベースの型の型情報へのポインタです。その値は,TypeInfo 関数を使って基本型から取得できます。

AIdentToInt は,値のシンボル表現である文字列を対応する整数に変換する変換関数です。

AIntToIdent は,基本型のインスタンスである値を対応する文字列表現に変換する変換関数です。

変換関数を登録すると,型の値は文字列識別子によって示され,変換関数はその文字列識別子を整数値に変換するために使用されます。たとえば,TColor 型は上記の機能を利用して,Graphics ユニット内の型定数と TColor 値の間の変換を行います。

関連項目