#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. |
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< T >::pointer ThePEG::ClassTraitsBase< T >::TPtr |
typedef ThePEG::Ptr< T >::const_pointer ThePEG::ClassTraitsBase< T >::cTPtr |
typedef ThePEG::Ptr< T >::transient_pointer ThePEG::ClassTraitsBase< T >::tTPtr |
typedef ThePEG::Ptr< T >::transient_const_pointer ThePEG::ClassTraitsBase< T >::tcTPtr |
typedef ThePEG::Ptr< Base >::pointer ThePEG::ClassTraitsBase< T >::BPtr |
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< Base >::transient_pointer ThePEG::ClassTraitsBase< T >::tBPtr |
typedef ThePEG::Ptr< Base >::transient_const_pointer ThePEG::ClassTraitsBase< T >::tcBPtr |
static string ThePEG::ClassTraitsBase< T >::library | ( | ) | [inline, static] |
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.
Reimplemented in ThePEG::ThePEG::ClassTraits< PDFBase >.
Definition at line 80 of file ClassTraits.h.