10#ifndef TEUCHOS_HANDLE_HPP 
   11#define TEUCHOS_HANDLE_HPP 
   15#include "Teuchos_Describable.hpp" 
   16#include "Teuchos_Handleable.hpp" 
   46  template <
typename Po
interType>
 
  102  template <
typename Po
interType>
 
  147#define TEUCHOS_HANDLE_CTORS(handle, contents) \ 
  148handle() : Teuchos::Handle<contents >() {;} \ 
  149handle(Teuchos::Handleable<contents >* rawPtr) : Teuchos::Handle<contents >(rawPtr) {;} \ 
  150handle(const Teuchos::RCP<contents >& smartPtr) : Teuchos::Handle<contents >(smartPtr){;} 
  163#define TEUCHOS_CONST_HANDLE_CTORS(handle, contents) \ 
  164handle( Teuchos::ENull _null = Teuchos::null ) : Teuchos::ConstHandle<contents >() {;} \ 
  165handle(const Teuchos::ConstHandleable<contents >* rawPtr) : Teuchos::ConstHandle<contents >(rawPtr) {;} \ 
  166handle(const Teuchos::RCP<const contents >& smartPtr) : Teuchos::ConstHandle<contents >(smartPtr){;} 
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
 
Reference-counted pointer class and non-member templated function implementations.
 
Templated handle class with strong const protection.
 
void setRcp(const RCP< PointerType > &ptr)
This function is needed in Handle ctors.
 
ConstHandle(const ConstHandleable< PointerType > *ptr)
Construct with a raw pointer to a ConstHandleable. This will make a call to rcp(),...
 
const PointerType *const rawPtr()
Access to raw pointer.
 
RCP< PointerType > nonConstPtr() const
Protected non-const access to the underlying smart pointer.
 
const RCP< const PointerType > & constPtr() const
Read-only access to the underlying smart pointer.
 
ConstHandle(const RCP< const PointerType > &ptr)
Construct with an existing RCP.
 
ConstHandle()
The empty ctor will only be called by Handle ctors.
 
Base class for all objects that can describe themselves.
 
Generic templated handle class.
 
RCP< PointerType > ptr() const
Read/write access to the underlying smart pointer.
 
Handle(const RCP< PointerType > &smartPtr)
Construct with an existing RCP.
 
PointerType * rawPtr() const
Access to non-const raw pointer.
 
Handle(Handleable< PointerType > *rawPtr)
Construct with a raw pointer to a Handleable.
 
Smart reference counting pointer class for automatic garbage collection.
 
T * get() const
Get the raw C++ pointer to the underlying object.
 
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...