This is the declaration of the ClassTraitsBase, ClassTraits and BaseClassTraits classes.
The templated ClassTraitsBase class defines a set of default information about classes used by Pythia7. By default, the ClassTraits simply inherits from ClassTraitsBase, but it can be specialized to override the static member functions.
The information that should be made available is:
create() creates an object of the described class,
className() returns the name of the class,
version() return the version number,
output() output the members of the class to a
PersistentOStream,
output() reads
the members of the class from a PersistentIStream
and
cast() dynamically cast a pointer to
Base to a pointer to the class.
The BaseClassTraits should be specialized once for each base class of a class to be described. The specializations should contain a typedef so that BaseClassTraits<T,1>::NthBase is made an alias for the first base class of T, BaseClassTraits<T,2>::NthBase the second base class and so on. The typedef defaults to int which means no base class.
This header file also defines a couple of macros for easy
specialization of ClassTraits and
BaseClassTraits:
PYTHIA7_DECLARE_CLASS_TRAITS(Class,Base) defines traits
classes for Class with base class Base giving
it the class name /Pythia7/Class
PYTHIA7_DECLARE_CLASS_TRAITS2(Class,Base1,Base2) defines
traits classes for Class with base classes
Base1 and Base2 and giving it the class name
/Pyythia7/Class and
PYTHIA7_DECLARE_NAMED_CLASS_TRAITS(Class,Base,Name)
defines traits classes for Class with base class
Base giving it the class name Name.
STRUCT
ClassTraitsBase