MURE
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
TReference Class Reference

Base class to reference all Shape objects and some nucleus. More...

#include <TReference.hxx>

Inheritance diagram for TReference:
Nucleus Shape MathBrick MathCylinder MathNode MathPlane MathSphere MathZTorus MCNP::Brick Serpent::Brick MCNP::Cylinder Serpent::Cylinder MCNP::Node MathHexagon MathTube Serpent::Node MCNP::Plane Serpent::Plane MCNP::Sphere Serpent::Sphere MCNP::ZTorus Serpent::ZTorus

Public Member Functions

 TReference ()
 
virtual ~TReference ()=default
 Destructor.
 
void AddReference (unsigned n=1)
 
unsigned DelReference (unsigned n=1)
 
unsigned Reference ()
 

Private Attributes

unsigned fNbReferences
 Number of references to an object.
 

Detailed Description

Base class to reference all Shape objects and some nucleus.

This is used for the smart pointer definition ; object reference increase from its creation, to any reference to an object ; dereferecing an object decrased the number of references until it is equal to 0, then object could be safely removed.

Author
WEC
Version
1.0

Constructor & Destructor Documentation

◆ TReference()

TReference::TReference ( )
inline

< Default constructor. Number of references is set to 0

◆ ~TReference()

virtual TReference::~TReference ( )
virtualdefault

Destructor.

Member Function Documentation

◆ AddReference()

void TReference::AddReference ( unsigned  n = 1)
inline

< Add n references to an object

◆ DelReference()

unsigned TReference::DelReference ( unsigned  n = 1)
inline

< Remove n references to an object

◆ Reference()

unsigned TReference::Reference ( )
inline

< returns the Number of references to an object

Member Data Documentation

◆ fNbReferences

unsigned TReference::fNbReferences
private

Number of references to an object.


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

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024