Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Teuchos::RCPNodeThrowDeleter Class Reference

Deletes a (non-owning) RCPNode but not it's underlying object in case of a throw. More...

#include <Teuchos_RCPNode.hpp>

Public Member Functions

 RCPNodeThrowDeleter (RCPNode *node)
 
 ~RCPNodeThrowDeleter ()
 Called with node_!=0 when an exception is thrown.
 
RCPNodeget () const
 
void release ()
 Releaes the RCPNode pointer before the destructor is called.
 

Private Member Functions

 RCPNodeThrowDeleter ()
 
 RCPNodeThrowDeleter (const RCPNodeThrowDeleter &)
 
RCPNodeThrowDeleteroperator= (const RCPNodeThrowDeleter &)
 

Private Attributes

RCPNodenode_
 

Detailed Description

Deletes a (non-owning) RCPNode but not it's underlying object in case of a throw.

This class is used in contexts where RCPNodeTracer::addNewRCPNode(...) might thrown an exception for a duplicate node being added. The assumption is that there must already be an owning (or non-owning) RCP object that will delete the underlying object and therefore this class should not call delete_obj()!

Definition at line 1110 of file Teuchos_RCPNode.hpp.

Constructor & Destructor Documentation

◆ RCPNodeThrowDeleter() [1/3]

Teuchos::RCPNodeThrowDeleter::RCPNodeThrowDeleter ( RCPNode node)
inline

Definition at line 1113 of file Teuchos_RCPNode.hpp.

◆ ~RCPNodeThrowDeleter()

Teuchos::RCPNodeThrowDeleter::~RCPNodeThrowDeleter ( )
inline

Called with node_!=0 when an exception is thrown.

When an exception is not thrown, the client should have called release() before this function is called.

Definition at line 1121 of file Teuchos_RCPNode.hpp.

◆ RCPNodeThrowDeleter() [2/3]

Teuchos::RCPNodeThrowDeleter::RCPNodeThrowDeleter ( )
private

◆ RCPNodeThrowDeleter() [3/3]

Teuchos::RCPNodeThrowDeleter::RCPNodeThrowDeleter ( const RCPNodeThrowDeleter )
private

Member Function Documentation

◆ get()

RCPNode * Teuchos::RCPNodeThrowDeleter::get ( ) const
inline

Definition at line 1130 of file Teuchos_RCPNode.hpp.

◆ release()

void Teuchos::RCPNodeThrowDeleter::release ( )
inline

Releaes the RCPNode pointer before the destructor is called.

Definition at line 1135 of file Teuchos_RCPNode.hpp.

◆ operator=()

RCPNodeThrowDeleter & Teuchos::RCPNodeThrowDeleter::operator= ( const RCPNodeThrowDeleter )
private

Member Data Documentation

◆ node_

RCPNode* Teuchos::RCPNodeThrowDeleter::node_
private

Definition at line 1140 of file Teuchos_RCPNode.hpp.


The documentation for this class was generated from the following file: