ThePEG  1.8.0
Classes | Public Member Functions | Private Attributes
ThePEG::AnyReference Class Reference

AnyReference is inspired by boost::any to hold a reference to an object of arbitrary type. More...

#include <AnyReference.h>

List of all members.

Classes

struct  ReferenceHolder
struct  ReferenceHolderBase

Public Member Functions

 AnyReference ()
 The default constructor.
template<class T >
 AnyReference (T &v)
 The standard constructor.
 AnyReference (const AnyReference &other)
 The copy constructor.
 ~AnyReference ()
 The destructor.
const std::type_info & type () const
 Return the type held.
bool empty () const
 Return true, if no reference is held.
AnyReferenceswap (AnyReference &other)
 Swap the references held.
template<class T >
AnyReferenceoperator= (T &v)
 Assign from definite type.
AnyReferenceoperator= (AnyReference other)
 Assign from AnyReference.
void reset ()
 Reset to not keep track of any reference.
template<class T >
T & cast () const
 Extract the held reference.

Private Attributes

ReferenceHolderBaseholder
 The reference holder used.

Detailed Description

AnyReference is inspired by boost::any to hold a reference to an object of arbitrary type.

Definition at line 22 of file AnyReference.h.


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