Public Types | Public Member Functions

regina::FuncNewCopyRef< T > Struct Template Reference
[Utilities]

An adaptable unary function used to create objects using copy constructors. More...

#include <memutils.h>

List of all members.

Public Types

typedef const T & argument_type
 The argument type for this unary function.
typedef T * result_type
 The return type for this unary function.

Public Member Functions

T * operator() (const T &obj) const
 Creates a new object using the copy constructor.

Detailed Description

template<class T>
struct regina::FuncNewCopyRef< T >

An adaptable unary function used to create objects using copy constructors.

This class is for use with the Standard Template Library.

Note that the template argument need not be a pointer class. If the template argument is T, this unary function will accept a reference to T and pass it directly to the copy constructor to return a pointer to a newly created object of type T.

Python:
Not present.

Member Typedef Documentation

template<class T >
typedef const T& regina::FuncNewCopyRef< T >::argument_type

The argument type for this unary function.

template<class T >
typedef T* regina::FuncNewCopyRef< T >::result_type

The return type for this unary function.


Member Function Documentation

template<class T >
T* regina::FuncNewCopyRef< T >::operator() ( const T &  obj ) const [inline]

Creates a new object using the copy constructor.

Parameters:
objthe object whose data should be passed to the copy constructor.
Returns:
the newly created object.

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

Copyright © 1999-2009, 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).