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