[fpc-pascal] Does RTTI offer any method parameter information?

Sven Barth pascaldragon at googlemail.com
Sat Feb 1 22:48:48 CET 2014


On 01.02.2014 21:44, Howard Page-Clark wrote:
> On 01/02/2014 18:54, Sven Barth wrote:
>> On 01.02.2014 19:10, Howard Page-Clark wrote:
>>> In a situation where
>>>
>>>    PPropInfo^.PropType^.Kind=tkMethod
>>>
>>> does RTTI enable you to determine the number and/or types of the
>>> parameters that method uses (if any)?
>>
>> Yes, please take a look at the tkMethod part of the case inside
>> TTypeData in $fpcdir/rtl/objpas/typinfo.pp
>> There are AFAIK no functions yet that simplify the access though. Maybe
>> someone else has already written a wrapper for it.
>
> I should have known to look at the source. Thanks Sven for pointing me
> to the correct place.

You're welcome. For RTTI the two most reliable sources are the 
typinfo.pp unit and the compiler's ncgrtti.pas. ;)

Regards,
Sven




More information about the fpc-pascal mailing list