dune-fem 2.8.0
|
default implementation of ReferenceCounterInterface More...
#include <dune/fem/storage/referencecounter.hh>
Public Types | |
typedef BaseType::ReferenceCounterType | ReferenceCounterType |
type of the implementation (Barton-Nackman) | |
typedef RCT | Traits |
type of the traits | |
typedef ThisType | ReferenceCounterInterfaceType |
type of the reference counter interface | |
typedef Traits::ObjectType | ObjectType |
type of the object, this is a reference counter for | |
Public Member Functions | |
ReferenceCounterDefault (unsigned int refcount=1) | |
constructor initializing the reference counter | |
ReferenceCounterDefault (const ThisType &)=delete | |
ThisType & | operator= (const ThisType &)=delete |
void | addReference () const |
:: ReferenceCounterInterface :: addReference | |
void | deleteObject () |
:: ReferenceCounterInterface :: deleteObject | |
void | removeReference () const |
:: ReferenceCounterInterface :: removeReference | |
unsigned int | referenceCounter () const |
return current reference count | |
const ObjectType & | getObject () const |
access the real object (const version) | |
ObjectType & | getObject () |
access the real object (non-const version) | |
Protected Member Functions | |
const Implementation & | asImp () const |
Implementation & | asImp () |
Static Protected Member Functions | |
static const Implementation & | asImp (const ThisType &other) |
static Implementation & | asImp (ThisType &other) |
static const Implementation & | asImp (const ThisType &other) |
static Implementation & | asImp (ThisType &other) |
static const RCT::ReferenceCounterType & | asImp (const ThisType &other) |
static RCT::ReferenceCounterType & | asImp (ThisType &other) |
Protected Attributes | |
unsigned int | refcount_ |
default implementation of ReferenceCounterInterface
Reference counting usually uses a class variable to hold the number of references to the instance. To make reference counting simple to use, this mechanism is default implemented.
|
inherited |
type of the object, this is a reference counter for
|
inherited |
type of the reference counter interface
typedef BaseType::ReferenceCounterType Dune::Fem::ReferenceCounterDefault< RCT >::ReferenceCounterType |
type of the implementation (Barton-Nackman)
|
inherited |
type of the traits
|
inlineexplicit |
constructor initializing the reference counter
[in] | refcount | start value for the reference counter; this value defalts to 1 |
|
delete |
|
inline |
:: ReferenceCounterInterface :: addReference
:: ReferenceCounterInterface :: addReference
|
inlineprotected |
|
inlineprotected |
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
|
inlinestaticprotected |
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
|
inlinestaticprotected |
|
inline |
:: ReferenceCounterInterface :: deleteObject
:: ReferenceCounterInterface :: deleteObject
|
inlineinherited |
access the real object (non-const version)
Sometimes the reference counter just wraps the object for which it counts references. In such cases, this method returns the wrapped object. Otherwise, the object itself may be returned.
|
inlineinherited |
access the real object (const version)
Sometimes the reference counter just wraps the object for which it counts references. In such cases, this method returns the wrapped object. Otherwise, the object itself may be returned.
|
delete |
|
inline |
return current reference count
|
inline |
:: ReferenceCounterInterface :: removeReference
:: ReferenceCounterInterface :: removeReference
|
mutableprotected |