Teuchos::RCPNodeHandle Class Reference

Utility handle class for handling the reference counting and managuement of the RCPNode object. More...

#include <Teuchos_RCPNode.hpp>

List of all members.

Public Member Functions

 RCPNodeHandle (ENull null_arg=null)
 
 RCPNodeHandle (RCPNode *node, ERCPStrength strength_in=RCP_STRONG)
 
 RCPNodeHandle (const RCPNodeHandle &node_ref)
 
RCPNodeHandleoperator= (const RCPNodeHandle &node_ref)
 (Strong guarantee).
 ~RCPNodeHandle ()
 
RCPNodeHandle create_weak () const
 
RCPNodeHandle create_strong () const
 
RCPNodenode_ptr () const
 
bool is_node_null () const
 
bool is_valid_ptr () const
 
bool same_node (const RCPNodeHandle &node2) const
 
int strong_count () const
 
int weak_count () const
 
int total_count () const
 
int count () const
 Backward compatibility.
ERCPStrength strength () const
 
void has_ownership (bool has_ownership_in)
 
bool has_ownership () const
 
void set_extra_data (const any &extra_data, const std::string &name, EPrePostDestruction destroy_when, bool force_unique)
 
anyget_extra_data (const std::string &type_name, const std::string &name)
 
const anyget_extra_data (const std::string &type_name, const std::string &name) const
 
anyget_optional_extra_data (const std::string &type_name, const std::string &name)
 
const anyget_optional_extra_data (const std::string &type_name, const std::string &name) const
 
void debug_assert_not_null () const
 
template<class RCPType >
void assert_valid_ptr (const RCPType &rcp_obj) const
 
template<class RCPType >
void debug_assert_valid_ptr (const RCPType &rcp_obj) const
 

Private Member Functions

void unbind ()

Private Attributes

RCPNodenode_
ERCPStrength strength_

Detailed Description

Utility handle class for handling the reference counting and managuement of the RCPNode object.

Again, this is *not* a user-level class. Instead, this class is used by all of the user-level reference-counting classes.

NOTE: I (Ross Bartlett) am not generally a big fan of handle classes and greatly prefer smart pointers. However, this is one case where a handle class makes sense. First, I want special behavior in some functions when the wrapped RCPNode pointer is null. Secound, I can't use one of the smart-pointer classes because this class is used to implement all of those smart-pointer classes!

Definition at line 484 of file Teuchos_RCPNode.hpp.


Constructor & Destructor Documentation

Teuchos::RCPNodeHandle::RCPNodeHandle ( ENull  null_arg = null  )  [inline]

Definition at line 487 of file Teuchos_RCPNode.hpp.

Teuchos::RCPNodeHandle::RCPNodeHandle ( RCPNode node,
ERCPStrength  strength_in = RCP_STRONG 
) [inline]

Definition at line 491 of file Teuchos_RCPNode.hpp.

Teuchos::RCPNodeHandle::RCPNodeHandle ( const RCPNodeHandle node_ref  )  [inline]

Definition at line 514 of file Teuchos_RCPNode.hpp.

Teuchos::RCPNodeHandle::~RCPNodeHandle (  )  [inline]

Definition at line 536 of file Teuchos_RCPNode.hpp.


Member Function Documentation

RCPNodeHandle& Teuchos::RCPNodeHandle::operator= ( const RCPNodeHandle node_ref  )  [inline]

(Strong guarantee).

Definition at line 521 of file Teuchos_RCPNode.hpp.

RCPNodeHandle Teuchos::RCPNodeHandle::create_weak (  )  const [inline]

Definition at line 541 of file Teuchos_RCPNode.hpp.

RCPNodeHandle Teuchos::RCPNodeHandle::create_strong (  )  const [inline]

Definition at line 550 of file Teuchos_RCPNode.hpp.

RCPNode* Teuchos::RCPNodeHandle::node_ptr (  )  const [inline]

Definition at line 559 of file Teuchos_RCPNode.hpp.

bool Teuchos::RCPNodeHandle::is_node_null (  )  const [inline]

Definition at line 564 of file Teuchos_RCPNode.hpp.

bool Teuchos::RCPNodeHandle::is_valid_ptr (  )  const [inline]

Definition at line 569 of file Teuchos_RCPNode.hpp.

bool Teuchos::RCPNodeHandle::same_node ( const RCPNodeHandle node2  )  const [inline]

Definition at line 576 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNodeHandle::strong_count (  )  const [inline]

Definition at line 581 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNodeHandle::weak_count (  )  const [inline]

Definition at line 588 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNodeHandle::total_count (  )  const [inline]

Definition at line 595 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNodeHandle::count (  )  const [inline]

Backward compatibility.

Definition at line 602 of file Teuchos_RCPNode.hpp.

ERCPStrength Teuchos::RCPNodeHandle::strength (  )  const [inline]

Definition at line 609 of file Teuchos_RCPNode.hpp.

void Teuchos::RCPNodeHandle::has_ownership ( bool  has_ownership_in  )  [inline]

Definition at line 614 of file Teuchos_RCPNode.hpp.

bool Teuchos::RCPNodeHandle::has_ownership (  )  const [inline]

Definition at line 620 of file Teuchos_RCPNode.hpp.

void Teuchos::RCPNodeHandle::set_extra_data ( const any extra_data,
const std::string &  name,
EPrePostDestruction  destroy_when,
bool  force_unique 
) [inline]

Definition at line 627 of file Teuchos_RCPNode.hpp.

any& Teuchos::RCPNodeHandle::get_extra_data ( const std::string &  type_name,
const std::string &  name 
) [inline]

Definition at line 636 of file Teuchos_RCPNode.hpp.

const any& Teuchos::RCPNodeHandle::get_extra_data ( const std::string &  type_name,
const std::string &  name 
) const [inline]

Definition at line 644 of file Teuchos_RCPNode.hpp.

any* Teuchos::RCPNodeHandle::get_optional_extra_data ( const std::string &  type_name,
const std::string &  name 
) [inline]

Definition at line 651 of file Teuchos_RCPNode.hpp.

const any* Teuchos::RCPNodeHandle::get_optional_extra_data ( const std::string &  type_name,
const std::string &  name 
) const [inline]

Definition at line 659 of file Teuchos_RCPNode.hpp.

void Teuchos::RCPNodeHandle::debug_assert_not_null (  )  const [inline]

Definition at line 666 of file Teuchos_RCPNode.hpp.

template<class RCPType >
void Teuchos::RCPNodeHandle::assert_valid_ptr ( const RCPType &  rcp_obj  )  const [inline]

Definition at line 675 of file Teuchos_RCPNode.hpp.

template<class RCPType >
void Teuchos::RCPNodeHandle::debug_assert_valid_ptr ( const RCPType &  rcp_obj  )  const [inline]

Definition at line 686 of file Teuchos_RCPNode.hpp.

void Teuchos::RCPNodeHandle::unbind (  )  [inline, private]

Definition at line 696 of file Teuchos_RCPNode.hpp.


Member Data Documentation

Definition at line 693 of file Teuchos_RCPNode.hpp.

Definition at line 694 of file Teuchos_RCPNode.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Oct 20 10:14:05 2009 for Teuchos Package Browser (Single Doxygen Collection) by  doxygen 1.6.1