Field3D
|
#include <RefCount.h>
Public Types | |
typedef boost::intrusive_ptr < RefBase > | Ptr |
Public Member Functions | |
void | ref () const |
Used by boost::intrusive_pointer. | |
size_t | refcnt () |
Used by boost::intrusive_pointer. | |
void | unref () const |
Used by boost::intrusive_pointer. | |
Constructors, destructors, copying | |
RefBase () | |
RefBase (const RefBase &) | |
Copy constructor. | |
RefBase & | operator= (const RefBase &) |
Assignment operator. | |
virtual | ~RefBase () |
Destructor. | |
Private Attributes | |
boost::detail::atomic_count | m_counter |
For boost intrusive pointer. | |
RTTI replacement | |
| |
virtual bool | checkRTTI (const char *typenameStr)=0 |
This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();. | |
bool | matchRTTI (const char *typenameStr) |
Performs a check to see if the given typename string matches this class' This needs to be implemented in -all- subclasses, even abstract ones. | |
static const char * | classType () |
Definition at line 90 of file RefCount.h.
typedef boost::intrusive_ptr<RefBase> RefBase::Ptr |
Reimplemented in DenseField< Data_T >, DenseFieldIO, EmptyField< Data_T >, FieldBase, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, File::Partition, FieldInterp< Data_T >, LinearFieldInterp< Data_T >, CubicFieldInterp< Data_T >, LinearGenericFieldInterp< Field_T >, LinearMACFieldInterp< Data_T >, CubicGenericFieldInterp< Field_T >, CubicMACFieldInterp< Data_T >, ProceduralFieldLookup< Data_T >, FieldIO, FieldMapping, NullFieldMapping, MatrixFieldMapping, FrustumFieldMapping, FieldMappingIO, NullFieldMappingIO, MatrixFieldMappingIO, FrustumFieldMappingIO, MACField< Data_T >, MACFieldIO, ProceduralField< Data_T >, SparseField< Data_T >, and SparseFieldIO.
Definition at line 96 of file RefCount.h.
RefBase::RefBase | ( | ) | [inline] |
Definition at line 103 of file RefCount.h.
: m_counter(0) {}
RefBase::RefBase | ( | const RefBase & | ) | [inline] |
virtual RefBase::~RefBase | ( | ) | [inline, virtual] |
size_t RefBase::refcnt | ( | ) | [inline] |
Used by boost::intrusive_pointer.
Definition at line 125 of file RefCount.h.
References m_counter.
Referenced by intrusive_ptr_release().
{ return m_counter; }
void RefBase::ref | ( | ) | const [inline] |
Used by boost::intrusive_pointer.
Definition at line 129 of file RefCount.h.
References m_counter.
Referenced by intrusive_ptr_add_ref().
{ #ifndef FIELD3D_USE_ATOMIC_COUNT boost::mutex::scoped_lock lock(m_refMutex); #endif ++m_counter; }
void RefBase::unref | ( | ) | const [inline] |
Used by boost::intrusive_pointer.
Definition at line 138 of file RefCount.h.
References m_counter.
Referenced by intrusive_ptr_release().
{ #ifndef FIELD3D_USE_ATOMIC_COUNT boost::mutex::scoped_lock lock(m_refMutex); #endif --m_counter; // since we use intrusive_pointer no need // to delete the object ourselves. }
virtual bool RefBase::checkRTTI | ( | const char * | typenameStr | ) | [pure virtual] |
This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();.
bool RefBase::matchRTTI | ( | const char * | typenameStr | ) | [inline] |
Performs a check to see if the given typename string matches this class' This needs to be implemented in -all- subclasses, even abstract ones.
Definition at line 167 of file RefCount.h.
References classType().
{ if (strcmp(classType(), typenameStr) == 0) return true; return false; }
static const char* RefBase::classType | ( | ) | [inline, static] |
Reimplemented in DenseField< Data_T >, DenseFieldIO, EmptyField< Data_T >, FieldBase, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, File::Partition, FieldInterp< Data_T >, LinearFieldInterp< Data_T >, CubicFieldInterp< Data_T >, LinearGenericFieldInterp< Field_T >, LinearMACFieldInterp< Data_T >, CubicGenericFieldInterp< Field_T >, CubicMACFieldInterp< Data_T >, ProceduralFieldLookup< Data_T >, FieldIO, FieldMapping, NullFieldMapping, MatrixFieldMapping, FrustumFieldMapping, FieldMappingIO, NullFieldMappingIO, MatrixFieldMappingIO, FrustumFieldMappingIO, MACField< Data_T >, MACFieldIO, ProceduralField< Data_T >, and SparseField< Data_T >.
Definition at line 174 of file RefCount.h.
Referenced by matchRTTI().
{ return "RefBase"; }
boost::detail::atomic_count RefBase::m_counter [mutable, private] |
For boost intrusive pointer.
Definition at line 185 of file RefCount.h.