Classes | |
| class | Teuchos::DeallocDelete< T > |
Policy class for deallocator that uses delete to delete a pointer which is used by RefCountPtr. More... | |
| class | Teuchos::RefCountPtr< T > |
| Templated class for reference counted smart pointers. More... | |
Enumerations | |
| enum | Teuchos::ENull { Teuchos::null } |
Used to initialize a RefCountPtr object to NULL using an implicit conversion! More... | |
Functions | |
| template<class T> | |
| RefCountPtr< T > | Teuchos::rcp (T *p, bool owns_mem=true) |
Create a RefCountPtr object properly typed. | |
| template<class T, class Dealloc_T> | |
| RefCountPtr< T > | Teuchos::rcp (T *p, Dealloc_T dealloc, bool owns_mem) |
| Initialize from a raw pointer with a deallocation policy. | |
| template<class T2, class T1> | |
| RefCountPtr< T2 > | Teuchos::rcp_implicit_cast (const RefCountPtr< T1 > &p1) |
Implicit cast of underlying RefCountPtr type from T1* to T2*. | |
| template<class T2, class T1> | |
| RefCountPtr< T2 > | Teuchos::rcp_static_cast (const RefCountPtr< T1 > &p1) |
Static cast of underlying RefCountPtr type from T1* to T2*. | |
| template<class T2, class T1> | |
| RefCountPtr< T2 > | Teuchos::rcp_const_cast (const RefCountPtr< T1 > &p1) |
Constant cast of underlying RefCountPtr type from T1* to T2*. | |
| template<class T2, class T1> | |
| RefCountPtr< T2 > | Teuchos::rcp_dynamic_cast (const RefCountPtr< T1 > &p1) |
Dynamic cast of underlying RefCountPtr type from T1* to T2*. | |
| template<class T1, class T2> | |
| void | Teuchos::set_extra_data (const T1 &extra_data, const std::string &name, RefCountPtr< T2 > *p, bool force_unique=true) |
Set extra data associated with a RefCountPtr object. | |
| template<class T1, class T2> | |
| T1 & | Teuchos::get_extra_data (RefCountPtr< T2 > &p, const std::string &name) |
Get a non-const reference to extra data associated with a RefCountPtr object. | |
| template<class T1, class T2> | |
| const T1 & | Teuchos::get_extra_data (const RefCountPtr< T2 > &p, const std::string &name) |
Get a const reference to extra data associated with a RefCountPtr object. | |
| template<class Dealloc_T, class T> | |
| Dealloc_T & | Teuchos::get_dealloc (RefCountPtr< T > &p) |
Return a non-const reference to the underlying deallocator object. | |
| template<class Dealloc_T, class T> | |
| const Dealloc_T & | Teuchos::get_dealloc (const RefCountPtr< T > &p) |
Return a const reference to the underlying deallocator object. | |
|
|
Used to initialize a
Definition at line 87 of file Teuchos_RefCountPtrDecl.hpp. |
|
||||||||||||||||
|
Create a
If the pointer
Definition at line 296 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||||||||||||
|
Initialize from a raw pointer with a deallocation policy.
Postconditions:
By default, Definition at line 304 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||
|
Implicit cast of underlying
The function will compile only if ( This is to be used for conversions up an inheritance hierarchy and from non-const to const and any other standard implicit pointer conversions allowed by C++. Definition at line 312 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||
|
Static cast of underlying
The function will compile only if (
This can safely be used for conversion down an inheritance hierarchy with polymorphic types only if Definition at line 327 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||
|
Constant cast of underlying
This function will compile only if ( Definition at line 342 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||
|
Dynamic cast of underlying
This function will compile only if ( Definition at line 357 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||||||||||||||||
|
Set extra data associated with a
T1 and same arguments p and name has already been made, then the current piece of extra data already set will be overwritten with extra_data. However, if the type of the extra data T1 is different, then the extra data can be added and not overwrite existing extra data. This means that extra data is keyed on both the type and name. This helps to minimize the chance that clients will unexpectedly overwrite data by accident.
When the last Preconditions:
Note, this function is made a non-member function to be consistent with the non-member Definition at line 373 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||||||||
|
Get a non-const reference to extra data associated with a
Note, this function must be a non-member function since the client must manually select the first template argument. Definition at line 381 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||||||||
|
Get a const reference to extra data associated with a
Note, this function must be a non-member function since the client must manually select the first template argument.
Also note that this const version is a false sense of security since a client can always copy a const Definition at line 389 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||
|
Return a non- Preconditions:
Definition at line 398 of file Teuchos_RefCountPtr.hpp. |
|
||||||||||
|
Return a Preconditions:
Note that the Definition at line 415 of file Teuchos_RefCountPtr.hpp. |
1.3.9.1