[fpc-pascal] Printing object

Michael Van Canneyt michael at freepascal.org
Sat Jun 7 18:36:35 CEST 2014



On Sat, 7 Jun 2014, Howard Page-Clark wrote:

> On 07/06/2014 15:49, Michael Van Canneyt wrote:
>> 
>> 
>> On Sat, 7 Jun 2014, Krzysztof wrote:
>> 
>>> Hi,
>>> 
>>> I need to analyze a lot of big objects (a lot of properties, global
>>> vars etc). Looking for easy way to print object info in
>>> format:
>>> 
>>> TObject
>>>   Property/VarName = value
>>> end;
>>> 
>>> It should also step into subobjects. Looking at typeinfo but can't
>>> find method for this.
>> 
>> This is done in classes unit. It requires a tcomponent, though.
>> the jsonrtti and rttiutils also can do this.
>
> As the unit names indicate these utilities cover published properties.
> I think to get equivalent information for public and protected properties you 
> have to roll your own routines (if that's what Krzysztof needs).

That info isn't published in RTTI.

Michael.



More information about the fpc-pascal mailing list