Teuchos::RCPNode Class Reference
[Teuchos Memory Management Utilities]

Node class to keep track of the delete address and the reference count for a reference-counted utility class. More...

#include <Teuchos_RCPNode.hpp>

Inheritance diagram for Teuchos::RCPNode:

Teuchos::RCPNodeTmpl< T, Dealloc_T > List of all members.

Public Member Functions

 RCPNode (bool has_ownership_in)
 
virtual ~RCPNode ()
 
int count () const
 
int incr_count ()
 
int deincr_count ()
 
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
 

Protected Member Functions

void pre_delete_extra_data ()
 

Related Functions

(Note that these are not member functions.)

bool isTracingActiveRCPNodes ()
 Return if we are tracing active nodes or not.
void printActiveRCPNodes (std::ostream &out)
 Print the list of currently active RCP nodes.

Detailed Description

Node class to keep track of the delete address and the reference count for a reference-counted utility class.

This is not a general user-level class. This is used in the implementation of all of the reference-counting utility classes.

Definition at line 62 of file Teuchos_RCPNode.hpp.


Constructor & Destructor Documentation

Teuchos::RCPNode::RCPNode ( bool  has_ownership_in  )  [inline]

Definition at line 65 of file Teuchos_RCPNode.hpp.

virtual Teuchos::RCPNode::~RCPNode (  )  [inline, virtual]

Definition at line 69 of file Teuchos_RCPNode.hpp.


Member Function Documentation

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

Definition at line 75 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNode::incr_count (  )  [inline]

Definition at line 79 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNode::deincr_count (  )  [inline]

Definition at line 83 of file Teuchos_RCPNode.hpp.

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

Definition at line 87 of file Teuchos_RCPNode.hpp.

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

Definition at line 91 of file Teuchos_RCPNode.hpp.

void Teuchos::RCPNode::set_extra_data ( const any extra_data,
const std::string &  name,
EPrePostDestruction  destroy_when,
bool  force_unique 
)

Definition at line 93 of file Teuchos_RCPNode.cpp.

any & Teuchos::RCPNode::get_extra_data ( const std::string &  type_name,
const std::string &  name 
)

Definition at line 117 of file Teuchos_RCPNode.cpp.

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

Definition at line 102 of file Teuchos_RCPNode.hpp.

any * Teuchos::RCPNode::get_optional_extra_data ( const std::string &  type_name,
const std::string &  name 
)

Definition at line 136 of file Teuchos_RCPNode.cpp.

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

Definition at line 111 of file Teuchos_RCPNode.hpp.

void Teuchos::RCPNode::pre_delete_extra_data (  )  [inline, protected]

Definition at line 118 of file Teuchos_RCPNode.hpp.


Friends And Related Function Documentation

bool isTracingActiveRCPNodes (  )  [related]

Return if we are tracing active nodes or not.

NOTE: This will always return false when TEUCHOS_DEBUG is not defined.

Definition at line 255 of file Teuchos_RCPNode.cpp.

void printActiveRCPNodes ( std::ostream &  out  )  [related]

Print the list of currently active RCP nodes.

When the macro TEUCHOS_SHOW_ACTIVE_REFCOUNTPTR_NODE_TRACE is defined, this function will print out all of the RCP nodes that are currently active. This function can be called at any time during a program.

When the macro TEUCHOS_SHOW_ACTIVE_REFCOUNTPTR_NODE_TRACE is defined this function will get called automatically after the program ends and all of the local and global RCP objects have been destroyed. If any RCP nodes are printed at that time, then this is an indication that there may be some circular references that will caused memory leaks. You memory checking tool such as valgrind or purify should complain about this!

Definition at line 284 of file Teuchos_RCPNode.cpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:40:34 2010 for Teuchos - Trilinos Tools Package by  doxygen 1.4.7