another rootcint suggestion

Terrence Brannon (brannon@quake.usc.edu)
26 Jun 1997 18:05:04 -0700


The ClassDef() macro is designed with the assumption that the classes
being defined will have a base class which has a Streamer()
function. This is not always true. Use of the M4 macro preprocessor
would allow the line

virtual void Streamer(TBuffer &b); \

to not be added during expansion of the ClassDef() if the id is zero.

As it stands, I am faced with pursuing one of two unsavory alternatives:

1: Comment out the Streamer() method in the ROOT Rtypes.h header file.
2: Subclassing all my classes to the ROOT system.

#define ClassDef(name,id) \
private: \
static TClass *fgIsA; \
public: \
static const char *DeclFileName() { return __FILE__; } \
static int DeclFileLine() { return __LINE__; } \
static const char *ImplFileName(); \
static int ImplFileLine(); \
static Version_t Class_Version() { return id; } \
static TClass *Class(); \
static void Dictionary(); \
virtual TClass *IsA() const { return name::Class(); } \
virtual void ShowMembers(TMemberInspector &insp, char *parent); \
virtual void Streamer(TBuffer &b); \
friend TBuffer &operator>>(TBuffer &buf, name *&obj);

-- 
o============o  Sending unsolicited commercial e-mail (UCE)  to this address
 Legal Notice   is indication of your consent to pay me $120/hour for 1 hour
o============o  minimum for professional proofreading & technical assessment.
  Terrence Brannon * brannon@quake.usc.edu * http://quake.usc.edu/~brannon