9 #ifndef ThePEG_ClassDescription_H
10 #define ThePEG_ClassDescription_H
12 #include "ThePEG/Config/ThePEG.h"
13 #include "ClassDescription.fh"
14 #include "ThePEG/Utilities/Named.h"
15 #include "ThePEG/Persistency/PersistentOStream.fh"
16 #include "ThePEG/Persistency/PersistentIStream.fh"
17 #include "ClassTraits.h"
18 #include "DescriptionList.h"
82 const type_info & newInfo,
126 virtual void setup() = 0;
170 DescriptionVector::iterator last)
214 template <
typename T,
int IBase,
218 static void addBases(vector<const ClassDescriptionBase *> & c){
232 template <
typename T,
int IBase>
233 struct ClassDescriptionHelper<T, IBase, int> {
235 static void addBases(vector<const ClassDescriptionBase *> & ) {}
244 template <
typename T>
287 template <
typename T>
307 throw std::logic_error(
"Tried to instantiate virtual class " +
Named::name());
328 int oldVersion)
const {
338 template <
typename T>
376 int oldVersion)
const {
386 template <
typename T>
422 template <
typename T>
442 throw std::logic_error(
"Tried to instantiate virtual class " +
Named::name());
459 #define ThePEG_DECLARE_CLASS_DESCRIPTION(Class) \
461 static ClassDescription<Class> init ## Class \
463 #define ThePEG_DECLARE_ABSTRACT_CLASS_DESCRIPTION(Class) \
465 static AbstractClassDescription<Class> init ## Class \
467 #define ThePEG_DECLARE_NOPIO_CLASS_DESCRIPTION(Class) \
469 static NoPIOClassDescription<Class> init ## Class \
471 #define ThePEG_DECLARE_ABSTRACT_NOPIO_CLASS_DESCRIPTION(Class) \
473 static AbstractNoPIOClassDescription<Class> init ## Class \
475 #define ThePEG_IMPLEMENT_CLASS_DESCRIPTION(Class) \
476 ClassDescription<Class> Class::init ## Class \
478 #define ThePEG_IMPLEMENT_ABSTRACT_CLASS_DESCRIPTION(Class) \
479 AbstractClassDescription<Class> Class::init ## Class \
481 #define ThePEG_IMPLEMENT_NOPIO_CLASS_DESCRIPTION(Class) \
482 NoPIOClassDescription<Class> Class::init ## Class \
484 #define ThePEG_IMPLEMENT_ABSTRACT_NOPIO_CLASS_DESCRIPTION(Class) \
485 AbstractNoPIOClassDescription<Class> Class::init ## Class \