![]() |
Rosetta Utilities
2014.16.56682
|
Base class for reference-counted polymorphic classes. More...
#include <ReferenceCount.hh>
Public Types | |
| typedef platform::Size | Size |
| typedef platform::Size | size_type |
Public Member Functions | |
| void | ctor () |
| virtual | ~ReferenceCount () |
| Destructor. More... | |
| Size | ref_count () const |
| Reference count. More... | |
Protected Member Functions | |
| ReferenceCount () | |
| Default constructor. More... | |
| ReferenceCount (ReferenceCount const &) | |
| Copy constructor. More... | |
| ReferenceCount & | operator= (ReferenceCount const &) |
| Copy assignment. More... | |
Private Member Functions | |
| void | add_ref () const |
| Add a reference: Increment the count. More... | |
| void | remove_ref () const |
| Remove a reference: Decrement the count: Self-destruct if count hits zero. More... | |
Private Attributes | |
| Size | count_ |
| Reference count. More... | |
Static Private Attributes | |
| static Size const | max_count_ = static_cast< ReferenceCount::Size >( -1 ) |
| Max count. More... | |
Friends | |
| template<typename T > | |
| void | owning_ptr_acquire (T *) |
| Add a reference to the object acquired by an owning_ptr. More... | |
| template<typename T > | |
| void | owning_ptr_release (T *) |
| Remove a reference from the object released by an owning_ptr. More... | |
Base class for reference-counted polymorphic classes.
|
inlineprotected |
Default constructor.
|
inlineprotected |
Copy constructor.
|
inlinevirtual |
Destructor.
References count_.
|
inlineprivate |
Add a reference: Increment the count.
References count_, and max_count_.
| void utility::pointer::ReferenceCount::ctor | ( | ) |
|
inlineprotected |
Copy assignment.
Referenced by basic::datacache::DataCache< CacheableData >::operator=().
|
inline |
Reference count.
References count_.
|
inlineprivate |
Remove a reference: Decrement the count: Self-destruct if count hits zero.
References count_.
|
friend |
Add a reference to the object acquired by an owning_ptr.
|
friend |
Remove a reference from the object released by an owning_ptr.
|
mutableprivate |
Reference count.
Referenced by add_ref(), ref_count(), remove_ref(), and ~ReferenceCount().
|
staticprivate |
1.8.7