aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
TiCppRCImp Class Reference

#include <ticpprc.h>

+ Collaboration diagram for TiCppRCImp:

Public Member Functions

 TiCppRCImp (TiCppRC *tiCppRC)
 Initializes m_tiCppRC pointer, and set reference count to 1. More...
 
void Nullify ()
 Allows the TiCppRC object to set the pointer to itself ( m_tiCppRc ) to nullptr when the TiCppRC object is deleted. More...
 
void IncRef ()
 Increment Reference Count. More...
 
void DecRef ()
 Decrement Reference Count. More...
 
void InitRef ()
 Set Reference Count to 1 - dangerous! - Use only if you are sure of the consequences. More...
 
TiCppRCGet ()
 Get internal pointer to the TiCppRC object - not reference counted, use at your own risk. More...
 
bool IsNull ()
 Returns state of internal pointer - will be null if the object was deleted. More...
 

Detailed Description

Definition at line 74 of file ticpprc.h.

Constructor & Destructor Documentation

◆ TiCppRCImp()

TiCppRCImp::TiCppRCImp ( TiCppRC tiCppRC)

Initializes m_tiCppRC pointer, and set reference count to 1.

Definition at line 952 of file ticpp.cpp.

953  : m_count(1)
954  , m_tiCppRC(tiCppRC) {}
TiCppRC * m_tiCppRC
Holds pointer to an object inheriting TiCppRC.
Definition: ticpprc.h:78
int m_count
Holds reference count to me, and to the node I point to.
Definition: ticpprc.h:76

Member Function Documentation

◆ DecRef()

void TiCppRCImp::DecRef ( )

Decrement Reference Count.

Definition at line 958 of file ticpp.cpp.

Referenced by ticpp::Attribute::Attribute(), ticpp::Attribute::operator=(), ticpp::Attribute::~Attribute(), and ticpp::NodeImp< TiXmlDeclaration >::~NodeImp().

958  {
959  m_count--;
960 
961  if (0 == m_count) {
962  delete m_tiCppRC;
963  delete this;
964  }
965 }
TiCppRC * m_tiCppRC
Holds pointer to an object inheriting TiCppRC.
Definition: ticpprc.h:78
int m_count
Holds reference count to me, and to the node I point to.
Definition: ticpprc.h:76
+ Here is the caller graph for this function:

◆ Get()

TiCppRC * TiCppRCImp::Get ( )

Get internal pointer to the TiCppRC object - not reference counted, use at your own risk.

Definition at line 971 of file ticpp.cpp.

971 { return m_tiCppRC; }
TiCppRC * m_tiCppRC
Holds pointer to an object inheriting TiCppRC.
Definition: ticpprc.h:78

◆ IncRef()

void TiCppRCImp::IncRef ( )

Increment Reference Count.

Definition at line 956 of file ticpp.cpp.

Referenced by ticpp::Attribute::Attribute(), ticpp::Node::InsertAfterChild(), ticpp::Node::InsertBeforeChild(), ticpp::Node::LinkEndChild(), ticpp::NodeImp< TiXmlDeclaration >::NodeImp(), ticpp::Attribute::operator=(), and ticpp::Node::ReplaceChild().

956 { m_count++; }
int m_count
Holds reference count to me, and to the node I point to.
Definition: ticpprc.h:76
+ Here is the caller graph for this function:

◆ InitRef()

void TiCppRCImp::InitRef ( )

Set Reference Count to 1 - dangerous! - Use only if you are sure of the consequences.

Definition at line 967 of file ticpp.cpp.

Referenced by ticpp::Attribute::Attribute().

967 { m_count = 1; }
int m_count
Holds reference count to me, and to the node I point to.
Definition: ticpprc.h:76
+ Here is the caller graph for this function:

◆ IsNull()

bool TiCppRCImp::IsNull ( )

Returns state of internal pointer - will be null if the object was deleted.

Definition at line 973 of file ticpp.cpp.

Referenced by ticpp::Base::ValidatePointer().

973 { return 0 == m_tiCppRC; }
TiCppRC * m_tiCppRC
Holds pointer to an object inheriting TiCppRC.
Definition: ticpprc.h:78
+ Here is the caller graph for this function:

◆ Nullify()

void TiCppRCImp::Nullify ( )

Allows the TiCppRC object to set the pointer to itself ( m_tiCppRc ) to nullptr when the TiCppRC object is deleted.

Definition at line 969 of file ticpp.cpp.

969 { m_tiCppRC = 0; }
TiCppRC * m_tiCppRC
Holds pointer to an object inheriting TiCppRC.
Definition: ticpprc.h:78

Member Data Documentation

◆ m_count

int TiCppRCImp::m_count
private

Holds reference count to me, and to the node I point to.

Definition at line 76 of file ticpprc.h.

◆ m_tiCppRC

TiCppRC* TiCppRCImp::m_tiCppRC
private

Holds pointer to an object inheriting TiCppRC.

Definition at line 78 of file ticpprc.h.


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