9 #ifndef ThePEG_DescribeClass_H 10 #define ThePEG_DescribeClass_H 12 #include "ThePEG/Utilities/ClassDescription.h" 22 template <
typename BaseT1,
typename BaseT2 = int,
23 typename BaseT3 = int,
typename BaseT4 =
int>
51 template <
typename BaseT1,
typename BaseT2,
typename BaseT3,
typename BaseT4>
72 template <
typename T,
bool NoPIO>
79 t.persistentOutput(os);
86 t.persistentInput(is, oldVersion);
114 template <
typename T,
bool abstract>
129 template <
typename T>
136 throw std::logic_error(
"Tried to instantiate abstract class " +
158 template <
typename T,
typename BaseT,
bool Abstract = false,
bool NoPIO = false>
188 if ( b ) bases.push_back(b);
190 if ( b ) bases.push_back(b);
192 if ( b ) bases.push_back(b);
194 if ( b ) bases.push_back(b);
195 baseClasses(bases.begin(), bases.end());
243 template <
typename T,
typename BaseT = int,
244 bool Abstract =
false,
bool NoPIO =
false>
276 template <
typename T,
typename BaseT =
int>
308 template <
typename T,
typename BaseT =
int>
340 template <
typename T,
typename BaseT =
int>
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
PersistentIStream is used to read persistent objects from a stream where they were previously written...
ClassDescriptionBase is the base class for all class description classes.
static void output(const T &, PersistentOStream &)
Do nothing as T has no persistent I/O functions.
static void input(T &t, PersistentIStream &is, int oldVersion)
Call standard input function.
DescribeClass and its companion classes DescribeAbstractClass, DescribeNoPIOClass and DescribeAbstrac...
static const ClassDescriptionBase * find(const type_info &ti)
Get the description of a class giving its type_info object.
Define the base class from which all (polymorphic) classes in ThePEG are derived. ...
DescribeClass and its companion classes DescribeAbstractClass, DescribeNoPIOClass and DescribeAbstrac...
static void Register(ClassDescriptionBase &)
Insert a description in the list.
virtual void input(tBPtr o, PersistentIStream &is, int oldVersion) const
Call standard input function.
virtual void setup()
Set up the base class information for this object.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
DescribeClass and its companion classes DescribeAbstractClass, DescribeNoPIOClass and DescribeAbstrac...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
T1 dynamic_ptr_cast(const T2 &t2)
Replacement for the standard dynamic_cast.
This is the main namespace within which all identifiers in ThePEG are declared.
BaseT3 Base3
The third base class.
Helper class used by DescribeClassT for transparent handling of classes with and without persistent I...
#define ThePEG_DECLARE_TEMPLATE_POINTERS(full, abbrev)
This macro helps us to declare pointers and stuff to standard classes.
virtual void output(tcBPtr o, PersistentOStream &os) const
Call standard output function.
Helper class used by DescribeClassT for transparent handling of abstract and concrete classes...
T Base1
The first base class.
DescribeClass and its companion classes DescribeAbstractClass, DescribeNoPIOClass and DescribeAbstrac...
DescribeNoPIOClass(string cname, string lib, int vers=0)
Constructor taking the name of the class, the dynamic library where it is located and an optional ver...
Helper class for multiple base classes.
DescribeAbstractClass(string cname, string lib, int vers=0)
Constructor taking the name of the class, the dynamic library where it is located and an optional ver...
static void input(T &, PersistentIStream &, int)
Do nothing as T has no persistent I/O functions.
DescribeClassT(string cname, string lib, int vers=0)
Constructor taking the name of the class, the dynamic library where it is located and an optional ver...
static void output(const T &t, PersistentOStream &os)
Call standard output function.
BaseT4 Base4
The fourth base class.
Traits class used by DescribeCLassT for transparent handling of one base class or a several base clas...
BaseT2 Base2
The second base class.
RCPtr is a reference counted (smart) pointer.
static ThePEG::Ptr< T >::pointer create()
Default-creat an object.
#define ThePEG_DECLARE_POINTERS(full, abbrev)
This macro helps us to declare pointers and stuff to standard classes.
DescribeClass(string cname, string lib, int vers=0)
Constructor taking the name of the class, the dynamic library where it is located and an optional ver...
static ThePEG::Ptr< T >::pointer create()
Throw an exception as the class is bastract.
virtual ~DescribeClassT()
The descructor.
virtual BPtr create() const
Default-create an object.
int Base4
The fourth base class.
The default concrete implementation of ClassTraitsBase.
vector< const ClassDescriptionBase * > DescriptionVector
A vector of class descriptions.
int Base2
The second base class.
int Base3
The third base class.
BaseT1 Base1
The first base class.
DescribeAbstractNoPIOClass(string cname, string lib, int vers=0)
Constructor taking the name of the class, the dynamic library where it is located and an optional ver...
DescribeClassT and its derived companion classes DescribeClass DescribeAbstractClass, DescribeNoPIOClass and DescribeAbstractNoPIOClass, is a simplified interface to the type information system in ThePEG.