#include <Teuchos_Handle.hpp>
Public Member Functions | |
Handle () | |
| |
Handle (const RCP< PointerType > &smartPtr) | |
Construct with an existing RCP. | |
Handle (Handleable< PointerType > *rawPtr) | |
Construct with a raw pointer to a Handleable. | |
RCP< PointerType > | ptr () const |
Read/write access to the underlying smart pointer. | |
PointerType * | rawPtr () const |
Access to non-const raw pointer. |
In writing derived types, it is usually simplest to use the TEUCHOS_HANDLE_CTORS macro to generate boilerplate constructor code.
There are two modes of construction: construction from an existing RCP,
RCP<Base> r = rcp(new Derived(blahblah)); Handle<Base> h = r;
Handle<Base> h = new Derived(blahblah);
Note that the first form must be used whenever the object being handled has been allocated on the stack.
Definition at line 122 of file Teuchos_Handle.hpp.
Teuchos::Handle< PointerType >::Handle | ( | ) | [inline] |
Teuchos::Handle< PointerType >::Handle | ( | const RCP< PointerType > & | smartPtr | ) | [inline] |
Teuchos::Handle< PointerType >::Handle | ( | Handleable< PointerType > * | rawPtr | ) | [inline, explicit] |
Construct with a raw pointer to a Handleable.
This will make a call to rcp() internally, thus removing that call from the user interface.
Definition at line 140 of file Teuchos_Handle.hpp.
RCP<PointerType> Teuchos::Handle< PointerType >::ptr | ( | ) | const [inline] |
Read/write access to the underlying smart pointer.
Definition at line 148 of file Teuchos_Handle.hpp.
PointerType* Teuchos::Handle< PointerType >::rawPtr | ( | ) | const [inline] |