#include <RefCount.h>
|
boost::detail::atomic_count | m_counter |
| For boost intrusive pointer.
|
|
boost::shared_ptr< RefBase > | m_sharedPtr |
| For use by the FieldCache only: The shared pointer lets us see if this object is still alive.
|
|
|
- Note
- A note on why the RTTI replacement is needed: RTTI calls fail once the object crosses the dso boundary. We revert to using simple string checks which is more expensive but at least works once the dso is used in Houdini, etc. Use field_dynamic_cast<> for any RefBase subclass instead of dynamic_cast<>.
|
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 * | staticClassType () |
|
Definition at line 106 of file RefCount.h.
◆ Ptr
◆ WeakPtr
◆ RefBase() [1/2]
Definition at line 120 of file RefCount.h.
123 { }
boost::shared_ptr< RefBase > m_sharedPtr
For use by the FieldCache only: The shared pointer lets us see if this object is still alive.
boost::detail::atomic_count m_counter
For boost intrusive pointer.
Used to let a shared pointer exist that doesn't delete anything. This is used by RefBase to hold a sh...
◆ RefBase() [2/2]
RefBase::RefBase |
( |
const RefBase & | | ) |
|
|
inline |
Copy constructor.
- Note
- The null_deleter ensures we never try to actually delete this object using the shared pointer.
Definition at line 128 of file RefCount.h.
◆ ~RefBase()
virtual RefBase::~RefBase |
( |
| ) |
|
|
inlinevirtual |
◆ operator=()
◆ refcnt()
size_t RefBase::refcnt |
( |
| ) |
|
|
inline |
◆ ref()
void RefBase::ref |
( |
| ) |
const |
|
inline |
Used by boost::intrusive_pointer.
Definition at line 150 of file RefCount.h.
151 {
152#ifndef FIELD3D_USE_ATOMIC_COUNT
153 boost::mutex::scoped_lock lock(m_refMutex);
154#endif
156 }
Referenced by intrusive_ptr_add_ref().
◆ unref()
void RefBase::unref |
( |
| ) |
const |
|
inline |
Used by boost::intrusive_pointer.
Definition at line 159 of file RefCount.h.
160 {
161#ifndef FIELD3D_USE_ATOMIC_COUNT
162 boost::mutex::scoped_lock lock(m_refMutex);
163#endif
165
166
167 }
Referenced by intrusive_ptr_release().
◆ weakPtr()
◆ checkRTTI()
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();.
◆ 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 193 of file RefCount.h.
194 {
196 return true;
197 return false;
198 }
static const char * staticClassType()
◆ staticClassType()
static const char * RefBase::staticClassType |
( |
| ) |
|
|
inlinestatic |
Definition at line 200 of file RefCount.h.
201 {
202 return "RefBase";
203 }
◆ m_counter
boost::detail::atomic_count RefBase::m_counter |
|
mutableprivate |
For boost intrusive pointer.
Definition at line 211 of file RefCount.h.
◆ m_sharedPtr
boost::shared_ptr<RefBase> RefBase::m_sharedPtr |
|
private |
For use by the FieldCache only: The shared pointer lets us see if this object is still alive.
Definition at line 220 of file RefCount.h.
The documentation for this class was generated from the following file: