Teuchos - Trilinos Tools Package
Version of the Day
|
Subclass for wrapped opaque objects with a free function. More...
#include <Teuchos_OpaqueWrapper.hpp>
Public Member Functions | |
OpaqueWrapperWithFree (Opaque opaque, OpaqueFree opaqueFree) | |
Constructor: takes the opaque handle, and its free function. More... | |
~OpaqueWrapperWithFree () | |
Destructor: invokes the free function. More... | |
Public Member Functions inherited from Teuchos::OpaqueWrapper< Opaque > | |
OpaqueWrapper (Opaque opaque) | |
Constructor that accepts and wraps a raw handle. More... | |
operator Opaque () const | |
Implicit type conversion from wrapper to raw handle. More... | |
Opaque | operator() () const |
Explicit type conversion from wrapper to raw handle. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Teuchos::OpaqueWrapper< Opaque > | |
Opaque | opaque_ |
The actual handle. More... | |
Related Functions inherited from Teuchos::OpaqueWrapper< Opaque > | |
template<class Opaque > | |
RCP< OpaqueWrapper< Opaque > > | opaqueWrapper (Opaque opaque) |
Create a new OpaqueWrapper object without a free function. More... | |
template<class Opaque , class OpaqueFree > | |
RCP< OpaqueWrapper< Opaque > > | opaqueWrapper (Opaque opaque, OpaqueFree opaqueFree) |
Create a new OpaqueWrapper object with a free function. More... | |
Subclass for wrapped opaque objects with a free function.
Opaque | Type of the opaque object (a.k.a. handle). |
OpaqueFree | Type of the function for freeing the handle. |
This subclass allows a client to easily wrap any opaque object that needs a function to free it. This function (or function object) must be callable as:
It must also be copy constructible. (A function pointer is trivially copy constructible.) Please refer to the documentation of OpaqueWrapper for examples of how to supply a function for freeing an opaque handle.
Definition at line 280 of file Teuchos_OpaqueWrapper.hpp.
|
inline |
Constructor: takes the opaque handle, and its free function.
Definition at line 283 of file Teuchos_OpaqueWrapper.hpp.
|
inline |
Destructor: invokes the free function.
Definition at line 287 of file Teuchos_OpaqueWrapper.hpp.