[fpc-pascal]Mapping Object Pascal Classes to C++ Classes

memsom at interalpha.co.uk memsom at interalpha.co.uk
Thu Nov 14 11:02:36 CET 2002

Ah, Olivier, you're 'here', that's cool ;-) The other guy is called Eric, for 
the record. I do know peoples names, honest ;-) I just glossed over the general 
project as I don't know who is doing what at the moment.

> I am one of the french guys ;-)
> >The other guys have written a class mapper of sorts. I haven't really been 
> >keeping up with them. 
> In fact, the class mapper is not yet finished. 
> Our tool is an automated C++ class flattener, but it is specifically 
> designed
> for the C++ API of BeOS :
>  - no C++ exception 
>  - no template 
>  - few multi-inheritance
>  - support of hooks to answer to system events (optional and maybe a 
> BeOS feature)

I had a look at it. I wanted to use is myself for mapping Muscle classes to 
Pascal - for the uninformed, Muscle was originally written for BeOS, but now 
compiles on Win32, Linux and IIRC Solaris, amoungst others, and has a Java 
layer also. I found it wouldn't compile - probably type sizes etc. I did wonder 
why you used the K&R parameter syntax with in some of the C parts though ;-) 
> It should also work on other systems if your API respect the above 
> requirements (with some minor change i think).

One day, when I get 5 minutes to let the dust settle, I am goint to write a 
class flattener in C/C++. It will supply flattened API, just as Florian 

However, I think for BeOS I have another solution. I'm not saying too much, but 
I think I can hack out a generic wrapping method. Watch this space :-) (hint: 
BeOS, on all platforms, mangles the method names in a completely regular way. 
The ABI is never going to change as BeOS is effectively a closed 
source, 'final' platform.) 

> This is in my TODO's list too but i have no time yet because of the 
> above project...

Olivier, I think I will handle this (as above) because I have some ideas I want 
to try out.


This message was sent using Mistral WebMail.

More information about the fpc-pascal mailing list