RE: [ROOT] operator<< not defined in the Interpreter

From: Philippe Canal (pcanal@fnal.gov)
Date: Sun Jul 06 2003 - 17:31:31 MEST


Hi Thomas,

I finally tracked down the problem and Masa was able to fix it.  The fix is
in the CVS repository.  Please give it a try and let's me know.

Cheers,
Philippe

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Thomas Bretz
Sent: Friday, June 20, 2003 4:00 AM
To: Philippe Canal
Cc: roottalk@pcroot.cern.ch
Subject: Re: [ROOT] operator<< not defined in the Interpreter


Hi Philippe,

but I think this are the same operators than I use for cout. This works.
BTW: As I mentioned before, it was working in earlier root versions. And
all the operators should be in the dictionary, because I can use these
operators for any iostream or fstream, which are based on these
operators. So for me it seems, that the interpreter doesn't cast (it is
not really a cast, is it?) my object correctly to its base class and
finds the correspoding operator. So in my opinion it is a bug in the
interpreter that it doesn't recognize and use the operators of the
ofstream classes correctly.

Regards,
Thoms.

Philippe Canal wrote:
> Hi Thomas,
>
> You need to also create the dictionary entries for the operator<<s (I
think
> :) ).
>
> Cheers,
> Philippe.
>
> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Thomas Bretz
> Sent: Wednesday, June 18, 2003 6:09 AM
> To: roottalk@pcroot.cern.ch
> Subject: [ROOT] operator<< not defined in the Interpreter
>
>
> Dear all,
>
> I have created a class which is derived from ostream and streambuf, it's
> name is MLog (The idea is to redirect a stream to file, a TGText or any
> other output, at the same time). I create a global instance of this
> class called gLog.
>
> Both, the class and the instance are exported by:
> #pragma link C++ class MLog+;
> #pragma link C++ global gLog;
>
> This worked fine with root 3.02/07. But now I'm using root 3.05/05 and
> calling:
> gLog << "Test" << endl;
> in the interpreter results in:
> Error: operator<< not defined for MLog FILE:(tmpfile) LINE:1
> *** Interpreter error recovered ***
>
> BTW: It would be nice if the error messages of the Interpreter would be
> a bit more clear...
>
> Does somebody have any idea?
>
> Thanks,
> Thomas.
>
>



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET