ThePEG::ClassTraitsBase< T > Struct Template Reference

The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG. More...

#include <ClassTraits.h>

Inheritance diagram for ThePEG::ClassTraitsBase< T >:

ThePEG::ClassTraitsType ThePEG::TraitsType ThePEG::ClassTraits< T > ThePEG::ThePEG::ClassTraits< PDFBase >

List of all members.

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.


Detailed Description

template<typename T>
struct ThePEG::ClassTraitsBase< 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.

See also:
PersistentOStream

PersistentIStream

Definition at line 52 of file ClassTraits.h.


Member Typedef Documentation

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.


Member Function Documentation

template<typename T>
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.


The documentation for this struct was generated from the following file:

Generated on Thu Apr 29 12:43:24 2010 for ThePEG by  doxygen 1.5.5