10#ifndef TEUCHOS_OPAQUE_WRAPPER_HPP
11#define TEUCHOS_OPAQUE_WRAPPER_HPP
19#ifdef TEUCHOS_OPAQUE_WRAPPER_ANNOUNCE_FREE
20# include "Teuchos_VerboseObject.hpp"
207template <
class Opaque>
231 operator Opaque ()
const
279template <
class Opaque,
class OpaqueFree>
293#ifdef TEUCHOS_OPAQUE_WRAPPER_ANNOUNCE_FREE
297 *out <<
"\nOpaqueWrapperWithFree::~OpaqueWrapperWithFree(): Freeing opaque object"
305 OpaqueFree opaqueFree_;
319template <
class Opaque>
321RCP<OpaqueWrapper<Opaque> >
335template <
class Opaque,
class OpaqueFree>
Reference-counted pointer class and non-member templated function implementations.
Subclass for wrapped opaque objects with a free function.
~OpaqueWrapperWithFree()
Destructor: invokes the free function.
OpaqueWrapperWithFree(Opaque opaque, OpaqueFree opaqueFree)
Constructor: takes the opaque handle, and its free function.
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.
Smart reference counting pointer class for automatic garbage collection.
static std::string name()
static RCP< FancyOStream > getDefaultOStream()
Get the default output stream object.
RCP< basic_FancyOStream< CharT, Traits > > tab(const RCP< basic_FancyOStream< CharT, Traits > > &out, const int tabs=1, const std::basic_string< CharT, Traits > linePrefix="")
Create a tab for an RCP-wrapped basic_FancyOStream object to cause the indentation of all output auto...
basic_OSTab< char > OSTab
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.