Class Referenced
Defined in File Referenced.h
Inheritance Relationships
Derived Types
public AdvectionField
(Class AdvectionField)public Candidate
(Class Candidate)public CylindricalProjectionMap
(Class CylindricalProjectionMap)public Density
(Class Density)public EmissionMap
(Class EmissionMap)public Grid< T >
(Template Class Grid)public GridProperties
(Class GridProperties)public MagneticField
(Class MagneticField)public Module
(Class Module)public ObserverFeature
(Class ObserverFeature)public PhotonField
(Class PhotonField)public SourceFeature
(Class SourceFeature)public SourceInterface
(Class SourceInterface)public StepLengthModifier
(Class StepLengthModifier)public Surface
(Class Surface)public TurbulenceSpectrum
(Class TurbulenceSpectrum)
Class Documentation
-
class Referenced
Base class for reference counting.
A form of memory management is needed to prevent memory leaks when using MPC in Python via SWIG. This base class enables reference counting. Every reference increases the reference counter, every dereference decreases it. When the counter is decreased to 0, the object is deleted. Candidate, Module, MagneticField and Source inherit from this class
Subclassed by AdvectionField, Candidate, CylindricalProjectionMap, Density, EmissionMap, Grid< T >, GridProperties, MagneticField, Module, ObserverFeature, PhotonField, SourceFeature, SourceInterface, StepLengthModifier, Surface, TurbulenceSpectrum
Public Functions
-
inline Referenced()
-
inline Referenced(const Referenced&)
-
inline Referenced &operator=(const Referenced&)
-
inline size_t addReference() const
-
inline size_t removeReference() const
-
inline int removeReferenceNoDelete() const
-
inline size_t getReferenceCount() const
Protected Functions
-
inline virtual ~Referenced()
Protected Attributes
-
mutable size_t _referenceCount
-
inline Referenced()