regina::boost::reference_wrapper< T > Class Template Reference
[General Utility Classes]

A wrapper allowing references to be passed through generic functions. More...

#include <boostutils.h>

List of all members.

Public Types

typedef T type
 The data type being referenced by this wrapper.

Public Member Functions

 reference_wrapper (type &t)
 Creates a new wrapper to reference the given object.
 operator type & () const
 Returns a reference to the object being referenced.
typeget () const
 Returns a reference to the object being referenced.
typeget_pointer () const
 Returns a pointer to the object being referenced.


Detailed Description

template<class T>
class regina::boost::reference_wrapper< T >

A wrapper allowing references to be passed through generic functions.

This class is for use with the Standard Template Library.

The primary advantage of this class is its implicit conversion to type T&. Thus it can be passed to routines expecting references to T but can also be passed by reference itself.

See global routines ref() and cref() for simple creation of these wrappers.

Python:
Not present.
Author:
This class was taken and modified from the Boost C++ libraries (http://www.boost.org/).


Member Typedef Documentation

template<class T>
typedef T regina::boost::reference_wrapper< T >::type

The data type being referenced by this wrapper.


Constructor & Destructor Documentation

template<class T>
regina::boost::reference_wrapper< T >::reference_wrapper ( type t  )  [inline, explicit]

Creates a new wrapper to reference the given object.

Parameters:
t the object to be referenced.


Member Function Documentation

template<class T>
regina::boost::reference_wrapper< T >::operator type & (  )  const [inline]

Returns a reference to the object being referenced.

This routine provides an implicit conversion to type T&.

Returns:
the corresonding reference.

template<class T>
type& regina::boost::reference_wrapper< T >::get (  )  const [inline]

Returns a reference to the object being referenced.

Returns:
the corresonding reference.

template<class T>
type* regina::boost::reference_wrapper< T >::get_pointer (  )  const [inline]

Returns a pointer to the object being referenced.

Returns:
the corresponding pointer.


The documentation for this class was generated from the following file:
Copyright © 1999-2006, Ben Burton
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).