Re: rootcint: constants

From: Selim Issever (selim.issever@desy.de)
Date: Tue Jun 01 1999 - 20:26:12 MEST


Hi,.. it's me again,..

> [...  http://root.cern.ch/root/RootCintMan.html ...]
> 
> I will proceed with the [...] and also try Masaharu's advises.

First I tried Masaharu's advise and extended moBase with
#pragma link C++ enum OvStyle;

------ moBase.H --------------------
[...]
#pragma link C++ enum OvStyle;
enum OvStyle {
  ovAll,
  ovRate,
  ovPos
};
#pragma link C++ global ovAll;
#pragma link C++ global ovRate;
#pragma link C++ global ovPos;
[...]
------------------------------------

This just had no effect and ovAll/ovRate/ovPos were not accessible (may be I
just totally misunderstood the advise)

Anyways, I proceeded with building moLinkDef.h exactly as advised in the mail
before and everything was OK! So I see no sense in putting in the #pragma link
C++ enum OvStyle;?!? Or is there any reason, I just miss??

I now had a fit of megalomania and thought I could easily make my Date classes
accessible too, but failed:

my moLinkDef.h now looks like this:
---- moLinkDef.h -------------------
#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ global ovAll;
#pragma link C++ global ovRate;
#pragma link C++ global ovPos;

#pragma link C++ class mo;
#pragma link C++ class moBase;
#pragma link C++ class StyledCanvas;
#pragma link C++ class DateRange;
#pragma link C++ class Date;

#endif
------------------------------------
OK, this worked and I can create objects of type Date e.g. in my application.

but as soon as I extend moLinkDef.h by
#pragma link C++ class DateRangeList;

->
rootcint mydict.C -c mo.H moBase.H StyledCanvas.H Date.H moLinkDef.h
runs and completes

But compiling mydict.C:
eg++ -Wall -fno-rtti -fno-exceptions -fsigned-char -fPIC
-I/products/cernroot/new/@sys/gcc/root/include
-I/afs/desy.de/group/hera-b/DATABASE/pro/include -o lib/Linux_intel/mydict.o
-c mydict.C
/products/cernroot/new/@sys/gcc/root/include/TCollection.h: In method
`TSeqCollection::TSeqCollection(const class TSeqCollection &)':
/products/cernroot/new/@sys/gcc/root/include/TCollection.h:44:
`TCollection::TCollection(const class TCollection &)' is private
mydict.C:338: within this context
make: *** [lib/Linux_intel/mydict.o] Error 1

DateRangeList has a privat member of class TList, which is the only remarkable
difference between DateRangeList and Date. 

I can easily spend a TList pointer (instead of a Tlist member), which I show
to __CINT__ only as void,.. this should cure the problem imedeatly. I am just
wondering, if this behaviour is intended,..

Best Wishes
Selim

-- 
Selim Issever | Tel: 040 8998-2843    +- Talk sense to a fool and he --
DESY-F15      | Fax: 040 8998-4033    +- calls you foolish. -----------
Notkestr. 85  | selim.issever@desy.de +--------------  Euripides ------
22603 Hamburg/Germany   |  http://www.physik.uni-dortmund.de/~issevers



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