Teuchos - Trilinos Tools Package Version of the Day
Public Member Functions
Teuchos::OpaqueWrapperWithFree< Opaque, OpaqueFree > Class Template Reference

Subclass for wrapped opaque objects with a free function. More...

#include <Teuchos_OpaqueWrapper.hpp>

Inheritance diagram for Teuchos::OpaqueWrapperWithFree< Opaque, OpaqueFree >:
Teuchos::OpaqueWrapper< Opaque >

List of all members.

Public Member Functions

 OpaqueWrapperWithFree (Opaque opaque, OpaqueFree opaqueFree)
 Constructor: takes the opaque handle, and its free function.
 ~OpaqueWrapperWithFree ()
 Destructor: invokes the free function.

Detailed Description

template<class Opaque, class OpaqueFree>
class Teuchos::OpaqueWrapperWithFree< Opaque, OpaqueFree >

Subclass for wrapped opaque objects with a free function.

Template Parameters:
OpaqueType of the opaque object (a.k.a. handle).
OpaqueFreeType of the function for freeing the handle.
Note:
Teuchos users do not normally need to use or refer to this class. The opaqueWrapper() nonmember template function suffices for nearly all use cases. Please see the documentation of the base class OpaqueWrapper.

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);

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 312 of file Teuchos_OpaqueWrapper.hpp.


Constructor & Destructor Documentation

template<class Opaque , class OpaqueFree >
Teuchos::OpaqueWrapperWithFree< Opaque, OpaqueFree >::OpaqueWrapperWithFree ( Opaque  opaque,
OpaqueFree  opaqueFree 
) [inline]

Constructor: takes the opaque handle, and its free function.

Definition at line 315 of file Teuchos_OpaqueWrapper.hpp.

template<class Opaque , class OpaqueFree >
Teuchos::OpaqueWrapperWithFree< Opaque, OpaqueFree >::~OpaqueWrapperWithFree ( ) [inline]

Destructor: invokes the free function.

Definition at line 319 of file Teuchos_OpaqueWrapper.hpp.


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