Re: [CINT] FW: [ROOT] CINT and operator methods

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Mon Dec 30 2002 - 05:31:13 MET


Hello Roger,

The '#progma link C++ function' statements does not request function return
type because return type does not contribute identifying overloaded
functions.
You simply need to specify scope, name and argument types of the function.
So, it goes as follows.

#pragma link C++ function operator<(UnaryFunction<PhysicsObject*>&,double);

Please refer to cint/doc/ref.txt and look for '#pragma link' section.

I'll attach a small example code.

Thank you
Masa Goto


----- Original Message -----
From: "Philippe Canal" <pcanal@fnal.gov>
To: "Cint" <cint@pcroot.cern.ch>
Sent: Friday, December 20, 2002 3:42 AM
Subject: [CINT] FW: [ROOT] CINT and operator methods


>
>
> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Roger Moore
> Sent: Wednesday, December 18, 2002 2:33 PM
> To: roottalk@pcroot.cern.ch
> Subject: [ROOT] CINT and operator methods
>
>
> I have just encountered another problem which I alos believe is CINT
> related. When I add the following line to my linkdef file:
>
> #pragma link C++ function moan::UnaryFunctionCut<std::less<double> >
> operator<(UnaryFunction<PhysicsObject *> &,double);
>
> I get the following error from rootcint:
>
> Error: Unexpected EOF G__fgetstream_template():2 FILE:LinkDef.h LINE:16
> Advice: You may need to use +P or -p option
> Warning: #pragma link, function less<double>
> >operator<(UnaryFunction<PhysicsObject*>&,double) not found FILE:LinkDef.h
> LINE:16
> Warning: Error occured during reading source files
> Warning: Error occured during dictionary source generation
>
> However when I change the name of the function to 'less' then it works
> correctly. The version of ROOT which I am using is 3.03/09.
>
> Roger
>
>
>





This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:24 MET