aGrUM  0.16.0
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.

References m_count, and m_tiCppRC.

Referenced by ticpp::Attribute::Attribute(), and ticpp::Attribute::~Attribute().

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.

References m_tiCppRC.

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.

References m_count.

Referenced by ticpp::Attribute::Attribute(), ticpp::Node::InsertAfterChild(), ticpp::Node::InsertBeforeChild(), ticpp::Node::LinkEndChild(), 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.

References m_count.

Referenced by ticpp::Node::Clone(), ticpp::Comment::Comment(), ticpp::Declaration::Declaration(), ticpp::Document::Document(), ticpp::Element::Element(), ticpp::StylesheetReference::StylesheetReference(), and ticpp::Text::Text().

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.

References m_tiCppRC.

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.

References m_tiCppRC.

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.

Referenced by DecRef(), IncRef(), and InitRef().

◆ m_tiCppRC

TiCppRC* TiCppRCImp::m_tiCppRC
private

Holds pointer to an object inheriting TiCppRC.

Definition at line 78 of file ticpprc.h.

Referenced by DecRef(), Get(), IsNull(), and Nullify().


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