Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
camlp4 and class introspection
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-06-11 (08:05)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] camlp4 and class introspection

On Jun 11, 2007, at 1:58 AM, Jacques GARRIGUE wrote:

> Then you can use camlp4 to parse the .mli and generate the
> registration code to be included in the .ml file.

Right. I want to parse the class definition to extract instance  
variable types and method signatures. Then I can use this information  
to create calls to the Objective-C runtime.

If there's an instance variable of type "float outlet", for example,  
then I'll know to strip outlet from OCaml code and to tell ObjC that  
it's an outlet. The whole purpose is to be able to define ObjC  
classes in OCaml while automatically creating the glue and bridging  

	Thanks, Joel

--      - EasyLanguage to C# translator  - Blog