Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Related Functions | List of all members
Teuchos::RCPNode Class Referenceabstract

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

#include <Teuchos_RCPNode.hpp>

Inheritance diagram for Teuchos::RCPNode:
Teuchos::RCPNodeTmpl< T, Dealloc_T >

Public Member Functions

 RCPNode (bool has_ownership_in)
 
virtual ~RCPNode ()
 
bool attemptIncrementStrongCountFromNonZeroValue ()
 attemptIncrementStrongCountFromNonZeroValue() supports weak to strong conversion but this is forward looking code. More...
 
int strong_count () const
 
int weak_count () const
 
void incr_count (const ERCPStrength strength)
 
int deincr_count (const ERCPStrength strength)
 
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
 
virtual bool is_valid_ptr () const =0
 
virtual void delete_obj ()=0
 
virtual void throw_invalid_obj_exception (const std::string &rcp_type_name, const void *rcp_ptr, const RCPNode *rcp_node_ptr, const void *rcp_obj_ptr) const =0
 
virtual const std::string get_base_obj_type_name () const =0
 

Protected Member Functions

void pre_delete_extra_data ()
 

Related Functions

(Note that these are not member functions.)

TEUCHOSCORE_LIB_DLL_EXPORT void throw_null_ptr_error (const std::string &type_name)
 Throw that a pointer passed into an RCP object is null. More...
 

Detailed Description

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

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

NOTE: The reference counts all start a 0 so the client (i.e. RCPNodeHandle) must increment them from 0 after creation.

Definition at line 121 of file Teuchos_RCPNode.hpp.

Constructor & Destructor Documentation

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

Definition at line 124 of file Teuchos_RCPNode.hpp.

virtual Teuchos::RCPNode::~RCPNode ( )
inlinevirtual

Definition at line 134 of file Teuchos_RCPNode.hpp.

Member Function Documentation

bool Teuchos::RCPNode::attemptIncrementStrongCountFromNonZeroValue ( )
inline

attemptIncrementStrongCountFromNonZeroValue() supports weak to strong conversion but this is forward looking code.

Definition at line 142 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNode::strong_count ( ) const
inline

Definition at line 170 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNode::weak_count ( ) const
inline

Definition at line 175 of file Teuchos_RCPNode.hpp.

void Teuchos::RCPNode::incr_count ( const ERCPStrength  strength)
inline

Definition at line 180 of file Teuchos_RCPNode.hpp.

int Teuchos::RCPNode::deincr_count ( const ERCPStrength  strength)
inline

Definition at line 190 of file Teuchos_RCPNode.hpp.

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

Definition at line 201 of file Teuchos_RCPNode.hpp.

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

Definition at line 206 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 183 of file Teuchos_RCPNode.cpp.

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

Definition at line 213 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 218 of file Teuchos_RCPNode.hpp.

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

Definition at line 233 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 228 of file Teuchos_RCPNode.hpp.

virtual bool Teuchos::RCPNode::is_valid_ptr ( ) const
pure virtual
virtual void Teuchos::RCPNode::delete_obj ( )
pure virtual
virtual void Teuchos::RCPNode::throw_invalid_obj_exception ( const std::string &  rcp_type_name,
const void *  rcp_ptr,
const RCPNode rcp_node_ptr,
const void *  rcp_obj_ptr 
) const
pure virtual
virtual const std::string Teuchos::RCPNode::get_base_obj_type_name ( ) const
pure virtual
void Teuchos::RCPNode::pre_delete_extra_data ( )
inlineprotected

Definition at line 253 of file Teuchos_RCPNode.hpp.

Friends And Related Function Documentation

TEUCHOSCORE_LIB_DLL_EXPORT void throw_null_ptr_error ( const std::string &  type_name)
related

Throw that a pointer passed into an RCP object is null.


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