Re: how to notify one class about the streamer for another?

Fons Rademakers ((no email))
Thu, 19 Jun 1997 00:38:43 +0200 (METDST)


Hi Terrence,

try using a single rootcint statement. This will generate a single
dictionary file which will contain the includes for paramVec.h as
well as for param.defs.h and that will solve your problem since
the operator<< is declared in the ClassDef macro. If you are not
interested in I/O put the version ID in ClassDef to 0 and you
will get empty streamers.

So: rootcint dict.C -c paramVec.h param.defs.h

To use the dictionary do:
- compile dictionary
- compile paramVec and param
- link together in shared library (g++ -shared -o ...)
- start root (standard module) and do:
root [0] gSystem.Load("paramVec.so")
root [1] .class paramVec
should print info about class paramVec
(if class is not known, the shared library did not
load correctly (return value=1 error =0 ok). This
might be due to unresolved symbols or methods.
Check code and try again)
- now proceed with making the html doc
(see "Automatic Documentation Generation" item on
root home page).

If you have problems with or questions about the HTML generator
contact directly nenad.buncic@cern.ch. He is the author of the
THtml class.

Cheers, Fons.

>
> The #ifdef/#ifndef mods Fons sent me work just fine. Thanks a
> million. I have no problem with rootcint now. Now I have some sort of
> function prototyping problem because one class demands functionality
> defined in another class:
>
> rootcint paramVecDict.cc -c paramVec.h
> Note: operator new() masked c
> Note: operator delete() masked c
> class paramVec in paramVec.h line 46 original base of virtual func
> g++ -O -fPIC -I/oscar/public/root/include -c paramVecDict.cc -o paramVecDict.o
> paramVecDict.cc: In method `void paramVec::Streamer(class TBuffer &)':
> paramVecDict.cc:537: no match for `operator <<(class TBuffer, class param *)'
> make: *** [paramVecDict.o] Error 1
> brannon@surf ~/rs/VisionMagick/terry :

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910