42#ifndef TEUCHOS_OPAQUE_WRAPPER_HPP
43#define TEUCHOS_OPAQUE_WRAPPER_HPP
51#ifdef TEUCHOS_OPAQUE_WRAPPER_ANNOUNCE_FREE
239template <
class Opaque>
311template <
class Opaque,
class OpaqueFree>
325#ifdef TEUCHOS_OPAQUE_WRAPPER_ANNOUNCE_FREE
329 *out <<
"\nOpaqueWrapperWithFree::~OpaqueWrapperWithFree(): Freeing opaque object"
351template <
class Opaque>
367template <
class Opaque,
class OpaqueFree>
Reference-counted pointer class and non-member templated function implementations.
Subclass for wrapped opaque objects with a free function.
OpaqueWrapperWithFree(const OpaqueWrapperWithFree &)
~OpaqueWrapperWithFree()
Destructor: invokes the free function.
OpaqueWrapperWithFree & operator=(const OpaqueWrapperWithFree &)
OpaqueWrapperWithFree(Opaque opaque, OpaqueFree opaqueFree)
Constructor: takes the opaque handle, and its free function.
OpaqueFree opaqueFree_
Function (or function object) for freeing the handle.
Base class for wrapped opaque objects.
Opaque operator()() const
Explicit type conversion from wrapper to raw handle.
OpaqueWrapper(Opaque opaque)
Constructor that accepts and wraps a raw handle.
RCP< OpaqueWrapper< Opaque > > opaqueWrapper(Opaque opaque)
Create a new OpaqueWrapper object without a free function.
Opaque opaque_
The actual handle.
RCP< OpaqueWrapper< Opaque > > opaqueWrapper(Opaque opaque, OpaqueFree opaqueFree)
Create a new OpaqueWrapper object with a free function.
OpaqueWrapper & operator=(const OpaqueWrapper &)
OpaqueWrapper(const OpaqueWrapper &)
Concrete serial communicator subclass.
static std::string name()
static RCP< FancyOStream > getDefaultOStream()
Get the default output stream object.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.