[Overview][Constants][Types][Classes][Procedures and functions] | Reference for unit 'typinfo' (#rtl) |
Return a list of published properties.
Source position: typinfo.pp line 198
procedure GetPropInfos( |
TypeInfo: PTypeInfo; |
PropList: PPropList |
); |
GetPropInfos stores pointers to the property information of all published properties of a class with class info TypeInfo in the list pointed to by Proplist. The PropList pointer must point to a memory location that contains enough space to hold all properties of the class and its parent classes.
No checks are done to see whether PropList points to a memory area that is big enough to hold all pointers.
|
Return property type information, by property name. |
|
|
Return a list of a certain type of published properties. |
Program example12; { This program demonstrates the GetPropInfos function } uses rttiobj,typinfo; Var O : TMyTestObject; PT : PTypeData; PI : PTypeInfo; I,J : Longint; PP : PPropList; prI : PPropInfo; begin O:=TMyTestObject.Create; PI:=O.ClassInfo; PT:=GetTypeData(PI); Writeln('Property Count : ',PT^.PropCount); GetMem (PP,PT^.PropCount*SizeOf(Pointer)); GetPropInfos(PI,PP); For I:=0 to PT^.PropCount-1 do begin With PP^[i]^ do begin Write('Property ',i+1:3,': ',name:30); writeln(' Type: ',TypeNames[typinfo.PropType(O,Name)]); end; end; FreeMem(PP); O.Free; end.
No notes exist for this page yet.