#include <Teuchos_Handle.hpp>
Inheritance diagram for Teuchos::ConstHandle< PointerType >:

Public Member Functions | |
| ConstHandle (const RefCountPtr< const PointerType > &ptr) | |
| Construct with an existing RefCountPtr. | |
| ConstHandle (const ConstHandleable< PointerType > *ptr) | |
| Construct with a raw pointer to a ConstHandleable. This will make a call to rcp(), thus removing that call from the user interface. | |
| const RefCountPtr< const PointerType > & | constPtr () const |
| Read-only access to the underlying smart pointer. | |
| const PointerType *const | rawPtr () |
| Access to raw pointer. | |
Protected Member Functions | |
| ConstHandle () | |
| The empty ctor will only be called by Handle ctors. | |
| void | setRcp (const RefCountPtr< PointerType > &ptr) |
| This function is needed in Handle ctors. | |
| RefCountPtr< PointerType > | nonConstPtr () const |
| Protected non-const access to the underlying smart pointer. | |
In writing derived types, it is usually simplest to use the TEUCHOS_CONST_HANDLE_CTORS macro to generate boilerplate constructor code.
There are two modes of construction: construction from an existing RefCountPtr,
RefCountPtr<const Base> r = rcp(new Derived(blahblah)); ConstHandle<Base> h = r;
ConstHandle<Base> h = new Derived(blahblah);
Note that the first form with rcp() must be used whenever the object being handled has been allocated on the stack (using rcp(ptr,false) of course).
Definition at line 66 of file Teuchos_Handle.hpp.
|
||||||||||
|
Construct with an existing RefCountPtr.
Definition at line 70 of file Teuchos_Handle.hpp. |
|
||||||||||
|
Construct with a raw pointer to a ConstHandleable. This will make a call to rcp(), thus removing that call from the user interface.
Definition at line 73 of file Teuchos_Handle.hpp. |
|
|||||||||
|
The empty ctor will only be called by Handle ctors.
Definition at line 80 of file Teuchos_Handle.hpp. |
|
|||||||||
|
Read-only access to the underlying smart pointer.
Definition at line 75 of file Teuchos_Handle.hpp. |
|
|||||||||
|
Access to raw pointer.
Definition at line 77 of file Teuchos_Handle.hpp. |
|
||||||||||
|
This function is needed in Handle ctors. The Handle ctors call the empty ConstHandle ctor and then set the pointer in the ConstHandle with a call to setRcp(). Definition at line 85 of file Teuchos_Handle.hpp. |
|
|||||||||
|
Protected non-const access to the underlying smart pointer. This will be called by the nonConstPtr() method of the non-const Handle subclass Definition at line 91 of file Teuchos_Handle.hpp. |
1.3.9.1