ThePEG 2.3.0
|
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG. More...
#include <ClassTraits.h>
Public Types | |
typedef ThePEG::Ptr< T >::pointer | TPtr |
Alias for a reference counted pointer to T . | |
typedef ThePEG::Ptr< T >::const_pointer | cTPtr |
Alias for a reference counted pointer to a const T . | |
typedef ThePEG::Ptr< T >::transient_pointer | tTPtr |
Alias for a transient pointer to T . | |
typedef ThePEG::Ptr< T >::transient_const_pointer | tcTPtr |
Alias for a transient pointer to a const T . | |
typedef ThePEG::Ptr< Base >::pointer | BPtr |
Alias for a reference counted pointer to Base . | |
typedef ThePEG::Ptr< Base >::const_pointer | cBPtr |
Alias for a reference counted pointer to a const Base . | |
typedef ThePEG::Ptr< Base >::transient_pointer | tBPtr |
Alias for a transient pointer to Base . | |
typedef ThePEG::Ptr< Base >::transient_const_pointer | tcBPtr |
Alias for a transient pointer to a const Base . | |
Static Public Member Functions | |
static TPtr | create () |
Create a T object and return a smart pointer to it. | |
static string | className () |
Return the name of class T. | |
static int | version () |
Return the version of class T. | |
static string | library () |
The name of a file containing the dynamic library where the class T is implemented. | |
static void | output (tcTPtr t, PersistentOStream &os) |
Write the T part of an object to a persistent stream. | |
static void | input (tTPtr t, PersistentIStream &is, int oldVersion) |
Read the T part of an object from a persistent stream. | |
static TPtr | cast (BPtr b) |
Perform a dynamic cast from the given pointer to a pointer to T. | |
static cTPtr | cast (cBPtr b) |
Perform a dynamic cast from the given const pointer to a pointer to const T. | |
static tTPtr | cast (tBPtr b) |
Perform a dynamic cast from the given transient pointer to a transient pointer to T. | |
static tcTPtr | cast (tcBPtr b) |
Perform a dynamic cast from the given transient const pointer to a transient pointer to const T. | |
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG.
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 platform-independent name of the class,
version()
return the version number,
output()
output the members of the class to a PersistentOStream,
input()
reads the members of the class from a PersistentIStream and
cast()
dynamically cast a pointer to a public base class to a pointer to the class.
Definition at line 52 of file ClassTraits.h.
typedef ThePEG::Ptr<Base>::pointer ThePEG::ClassTraitsBase< T >::BPtr |
Alias for a reference counted pointer to Base .
Definition at line 55 of file ClassTraits.h.
typedef ThePEG::Ptr<Base>::const_pointer ThePEG::ClassTraitsBase< T >::cBPtr |
Alias for a reference counted pointer to a const Base .
Definition at line 55 of file ClassTraits.h.
typedef ThePEG::Ptr<T>::const_pointer ThePEG::ClassTraitsBase< T >::cTPtr |
Alias for a reference counted pointer to a const T .
Definition at line 54 of file ClassTraits.h.
typedef ThePEG::Ptr<Base>::transient_pointer ThePEG::ClassTraitsBase< T >::tBPtr |
Alias for a transient pointer to Base .
Definition at line 55 of file ClassTraits.h.
typedef ThePEG::Ptr<Base>::transient_const_pointer ThePEG::ClassTraitsBase< T >::tcBPtr |
Alias for a transient pointer to a const Base .
Definition at line 55 of file ClassTraits.h.
typedef ThePEG::Ptr<T>::transient_const_pointer ThePEG::ClassTraitsBase< T >::tcTPtr |
Alias for a transient pointer to a const T .
Definition at line 54 of file ClassTraits.h.
typedef ThePEG::Ptr<T>::pointer ThePEG::ClassTraitsBase< T >::TPtr |
Alias for a reference counted pointer to T .
Definition at line 54 of file ClassTraits.h.
typedef ThePEG::Ptr<T>::transient_pointer ThePEG::ClassTraitsBase< T >::tTPtr |
Alias for a transient pointer to T .
Definition at line 54 of file ClassTraits.h.
|
inlinestatic |
Perform a dynamic cast from the given pointer to a pointer to T.
Definition at line 106 of file ClassTraits.h.
Referenced by ThePEG::AbstractClassDescription< T >::input(), ThePEG::ClassDescription< T >::input(), ThePEG::AbstractClassDescription< T >::output(), and ThePEG::ClassDescription< T >::output().
|
inlinestatic |
Perform a dynamic cast from the given const pointer to a pointer to const T.
Definition at line 112 of file ClassTraits.h.
|
inlinestatic |
Perform a dynamic cast from the given transient pointer to a transient pointer to T.
Definition at line 118 of file ClassTraits.h.
|
inlinestatic |
Perform a dynamic cast from the given transient const pointer to a transient pointer to const T.
Definition at line 124 of file ClassTraits.h.
|
inlinestatic |
Return the name of class T.
Definition at line 66 of file ClassTraits.h.
References ThePEG::DescriptionList::className().
|
inlinestatic |
Create a T object and return a smart pointer to it.
Definition at line 60 of file ClassTraits.h.
References ThePEG::Pointer::RCPtr< T >::Create().
Referenced by ThePEG::ClassDescription< T >::create(), and ThePEG::NoPIOClassDescription< T >::create().
|
inlinestatic |
Read the T part of an object from a persistent stream.
Definition at line 99 of file ClassTraits.h.
Referenced by ThePEG::AbstractClassDescription< T >::input(), and ThePEG::ClassDescription< T >::input().
|
inlinestatic |
The name of a file containing the dynamic library where the class T is implemented.
It may also include several, space separated, libraries if the class T depends on other classes (base classes excepted). In this case the listed libraries will be dynamically linked in the order they are specified.
Definition at line 85 of file ClassTraits.h.
References ThePEG::DescriptionList::library().
|
inlinestatic |
Write the T part of an object to a persistent stream.
Definition at line 92 of file ClassTraits.h.
Referenced by ThePEG::AbstractClassDescription< T >::output(), and ThePEG::ClassDescription< T >::output().
|
inlinestatic |
Return the version of class T.
Definition at line 73 of file ClassTraits.h.
References ThePEG::DescriptionList::version().