Re: CINT and templated classes

From: Masaharu Goto (gotom@hpyiddq.jpn.hp.com)
Date: Wed Sep 10 1997 - 02:14:38 MEST


Dear Pasha Murat,

 I just got back from vacation and saw you had many questions. 
 Many are answered by Fons, but I'd appreciate if you give me 
 update which ones you still need help.

 Here are some infomation regarding your questions.

 * friend
   Fons explained already. You need to add #pragma link statement for
   each of the friend function in order to use it from the interpreter.
 
 * #define and -p option
   If you do not use -p option, constant value declared by #define
   statement is registered into the dictionary. However, if you use
   -p option, C/C++ preprocessor strips #define information before
   CINT reads it. So, the #define information are lost. One easy 
   workaround is to use a constant variable declaration instead.

            const double M_PI = 3.141592;

 * template support
   Fundamental functionality of template is supported in cint 
   including template as template argument and default template 
   argument.  There are still some issues regarding STL mostly
   due to very complicated typedef scoping, explicit destructor
   and overloaded new/delete operators.
   Makecint supports embedding instantiated template classes into
   the dictionary. However, rootcint may need to be improved. 
   ClassDef() macro is handled in special way and I need make it
   work with the template implimentation.

Masaharu Goto



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:20 MET