|
ThePEG
1.8.0
|
AnyReference is inspired by boost::any to hold a reference to an object of arbitrary type. More...
#include <AnyReference.h>
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. | |
| AnyReference & | swap (AnyReference &other) |
| Swap the references held. | |
| template<class T > | |
| AnyReference & | operator= (T &v) |
| Assign from definite type. | |
| AnyReference & | operator= (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 | |
| ReferenceHolderBase * | holder |
| The reference holder used. | |
AnyReference is inspired by boost::any to hold a reference to an object of arbitrary type.
Definition at line 22 of file AnyReference.h.
1.8.9.1