-4

I'm looking for Delphi resources related to any effort to emulate hopefully a substantive subset of the new Rtti.pas unit like ThorRtti.

Edit:

I edited the initial post (header,body and tag) because using backport is misleading and not appropriate for the post.

ThorRtti tried to mimick the Rtti.pas in Delphi 2010.

I just need a direction to go (URLs).

menjaraz
  • 7,551
  • 4
  • 41
  • 81
  • What's lacking in Thor? What functionality do you need? – David Heffernan Jan 29 '12 at 08:56
  • To me ThorRtti is merely a wrapper of `TypInfo.pas` exposing type information as in the new Rtti way (ThorRtti.TRTTIContext). All type information contentions remain: I cannot for example enumerate all public classes of an apllication. – menjaraz Jan 29 '12 at 09:28
  • 1
    All "old" RTTI is accessible using the unit TypInfo; as functions not as classes. Other RTTI is not present in the older Delphi versions. You can het information on all published properties, enumerated types, interfaces derived from IInvokable etc. Newer RTTI concepts like properties on fields / properties are not supported. – Ritsaert Hornstra Jan 29 '12 at 10:10
  • @Ritsaert Hornstra: Thank you for your clear and bright explanation. Maybe I have to restate my expectation: I am looking for a `ThorRtti package` with a little `reflection` capabilities apart from what is available out of the box. The authors of the [INFRA](http://code.google.com/p/infra/) framework have devised an interesting solution providing reflection with old delphi but not in my prefered way (Rtti.pas like I mean). – menjaraz Jan 29 '12 at 10:25

1 Answers1

2

I don't believe what you are hoping to do is viable. The modern RTTI in Delphi is supported by the compiler. As I understand it the compiler writes a lot of extra information into the executable that the RTTI unit relies upon. Older compilers don't do that.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Is there a way like the compiler allow in map files to extract valuable type informations and embed them in the application afterward? – menjaraz Jan 29 '12 at 09:54
  • According this [post](http://stackoverflow.com/a/3799461/744588) it is possible to extract some class type informations in runtime. Is that a viable way to go or too dirty? – menjaraz Jan 29 '12 at 10:05
  • Well, you can reverse engineer practically anything if you try hard enough. I don't think that sort of approach is really terribly viable. – David Heffernan Jan 29 '12 at 10:12
  • You know for sure David that's beyond my capacity, my best bet was that the Delphi community has already done something valuable I can use as a good starting point. My definite adored version is Delphi XE and it can do but alas there is a requirement compelling the use Delphi 2007. – menjaraz Jan 29 '12 at 10:39