|
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. | |
| ~OpaqueWrapperWithFree () | |
| Destructor: invokes the free function. | |
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:
opaqueFree(&opaque);
Again, this is typical for the opaque objects implemented in MPI for instance. For example, in order to delete an MPI_Comm object created by the user (not MPI_COMM_WORLD), you must use the function MPI_Comm_free(). See the documentation of OpaqueWrapper for examples of how to supply a function for freeing an opaque handle.
Definition at line 283 of file Teuchos_OpaqueWrapper.hpp.
| Teuchos::OpaqueWrapperWithFree< Opaque, OpaqueFree >::OpaqueWrapperWithFree | ( | Opaque | opaque, |
| OpaqueFree | opaqueFree | ||
| ) | [inline] |
Constructor: takes the opaque handle, and its free function.
Definition at line 286 of file Teuchos_OpaqueWrapper.hpp.
| Teuchos::OpaqueWrapperWithFree< Opaque, OpaqueFree >::~OpaqueWrapperWithFree | ( | ) | [inline] |
Destructor: invokes the free function.
Definition at line 290 of file Teuchos_OpaqueWrapper.hpp.
1.7.6.1