[fpc-devel] .NET Reflection vs RTTI
Michael Van Canneyt
michael at freepascal.org
Tue Nov 20 09:41:41 CET 2007
On Tue, 20 Nov 2007, Graeme Geldenhuys wrote:
> On 20/11/2007, Michael Van Canneyt <michael at freepascal.org> wrote:
> > to write code anyway, so it's no different from custom written code.
> > The only use for this is maybe storing DB persistence information.
> >
>
>
> Ok, maybe I should have made the context more clear as well. My
> primary use for RTTI is in a Object Persistence Framework and a
> Presentation Framework for my business objects.
Somehow I guessed :-)
Why do you think I mentioned it in 1 mail together with a task for you ? :-)
>
>
> > So if Graeme writes the 'Invoke' then we're all set.
>
> If only I knew how and where to begin. :)
Easy: look up the method in RTTI - you'll get the address.
Push all arguments on the stack (see Remobjects/Innerfuse PascalScript on
how to do this, you need some assembler for it), and return result value.
2 days, tops.
Lots easier than writing a MGM or MVM (heck, don't remember all these acronyms ;))
for tiOPF :-)
Michael.
More information about the fpc-devel
mailing list