Sacado Package Browser (Single Doxygen Collection) Version of the Day
Public Member Functions | Private Member Functions | Private Attributes
Sacado::Handle< T > Class Template Reference

A generic handle class. More...

#include <Sacado_Handle.hpp>

Inheritance diagram for Sacado::Handle< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Handle (T *p)
 Create new handle from pointer p.
 Handle (const Handle &h)
 Copy handle.
 ~Handle ()
 Destroy handle.
T * get ()
 Return pointer to underlying data.
const T * get () const
 Return pointer to underlying data.
void Assign (const Handle &h)
 Assign to handle h as its own copy.
void makeOwnCopy ()
 Make handle have its own copy of rep.
Handleoperator= (const Handle &h)
 Assignment operator.
T * operator-> () const
 Dereference.
const T & operator* () const
 Dereference.
T & operator* ()
 Dereference.

Private Member Functions

void decrementRef ()
 Decrement reference.

Private Attributes

T * rep
 Pointer to data.
int * count
 Reference count.

Detailed Description

template<typename T>
class Sacado::Handle< T >

A generic handle class.

Definition at line 41 of file Sacado_Handle.hpp.


Constructor & Destructor Documentation

template<typename T>
Sacado::Handle< T >::Handle ( T *  p) [inline]

Create new handle from pointer p.

Definition at line 45 of file Sacado_Handle.hpp.

template<typename T>
Sacado::Handle< T >::Handle ( const Handle< T > &  h) [inline]

Copy handle.

Definition at line 48 of file Sacado_Handle.hpp.

template<typename T>
Sacado::Handle< T >::~Handle ( ) [inline]

Destroy handle.

Definition at line 51 of file Sacado_Handle.hpp.


Member Function Documentation

template<typename T>
T* Sacado::Handle< T >::get ( ) [inline]

Return pointer to underlying data.

Definition at line 54 of file Sacado_Handle.hpp.

template<typename T>
const T* Sacado::Handle< T >::get ( ) const [inline]

Return pointer to underlying data.

Definition at line 57 of file Sacado_Handle.hpp.

template<typename T>
void Sacado::Handle< T >::Assign ( const Handle< T > &  h) [inline]

Assign to handle h as its own copy.

Definition at line 60 of file Sacado_Handle.hpp.

template<typename T>
void Sacado::Handle< T >::makeOwnCopy ( ) [inline]

Make handle have its own copy of rep.

Definition at line 67 of file Sacado_Handle.hpp.

template<typename T>
Handle& Sacado::Handle< T >::operator= ( const Handle< T > &  h) [inline]

Assignment operator.

Definition at line 78 of file Sacado_Handle.hpp.

template<typename T>
T* Sacado::Handle< T >::operator-> ( ) const [inline]

Dereference.

Definition at line 89 of file Sacado_Handle.hpp.

template<typename T>
const T& Sacado::Handle< T >::operator* ( ) const [inline]

Dereference.

Definition at line 92 of file Sacado_Handle.hpp.

template<typename T>
T& Sacado::Handle< T >::operator* ( ) [inline]

Dereference.

Definition at line 95 of file Sacado_Handle.hpp.

template<typename T>
void Sacado::Handle< T >::decrementRef ( ) [inline, private]

Decrement reference.

Definition at line 106 of file Sacado_Handle.hpp.


Member Data Documentation

template<typename T>
T* Sacado::Handle< T >::rep [private]

Pointer to data.

Definition at line 100 of file Sacado_Handle.hpp.

template<typename T>
int* Sacado::Handle< T >::count [private]

Reference count.

Definition at line 103 of file Sacado_Handle.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines