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

GetPropInfo

Return property type information, by property name.

Declaration

Source position: line 0

function GetPropInfo(

  TypeInfo: PTypeInfo;

  const PropName: String

):PPropInfo;

function GetPropInfo(

  TypeInfo: PTypeInfo;

  const PropName: String;

  AKinds: TTypeKinds

):PPropInfo;

function GetPropInfo(

  Instance: TObject;

  const PropName: String;

  AKinds: TTypeKinds

):PPropInfo;

function GetPropInfo(

  Instance: TObject;

  const PropName: String

):PPropInfo;

function GetPropInfo(

  AClass: TClass;

  const PropName: String;

  AKinds: TTypeKinds

):PPropInfo;

function GetPropInfo(

  AClass: TClass;

  const PropName: String

):PPropInfo;

Description

GetPropInforeturns a pointer to the TPropInforecord for a the PropNameproperty of a class. The class to examine can be specified in one of three ways:

Instance
An instance of the class.
AClass
A class pointer to the class.
TypeInfo
A pointer to the type information of the class.

In each of these three ways, if AKindsis specified, if the property has TypeKindwhich is not included in Akinds, Nilwill be returned.

For an example, see most of the other functions.

Errors

If the property PropNamedoes not exist, Nilis returned.

See also

GetPropInfos

  

Return a list of published properties.

GetPropList

  

Return a list of a certain type of published properties.