#include <ReferenceCounters.h>
Public Member Functions | |
virtual ReferenceCounterValueType | AddStrongRef ()=0 |
Increments the number of strong references by 1. | |
virtual ReferenceCounterValueType | ReleaseStrongRef ()=0 |
virtual ReferenceCounterValueType | AddWeakRef ()=0 |
Increments the number of weak references by 1. | |
virtual ReferenceCounterValueType | ReleaseWeakRef ()=0 |
virtual void | QueryObject (struct IObject **ppObject)=0 |
Queries a pointer to the IUnknown interface of the referenced object. | |
virtual ReferenceCounterValueType | GetNumStrongRefs () const =0 |
Returns the number of outstanding strong references. | |
virtual ReferenceCounterValueType | GetNumWeakRefs () const =0 |
Returns the number of outstanding weak references. | |
Base interface for a reference counter object that stores the number of strong and weak references and the pointer to the object. It is necessary to separate reference counters from the object to support weak pointers.
|
pure virtual |
Increments the number of strong references by 1.
|
pure virtual |
Increments the number of weak references by 1.
|
pure virtual |
Returns the number of outstanding strong references.
|
pure virtual |
Returns the number of outstanding weak references.
|
pure virtual |
Queries a pointer to the IUnknown interface of the referenced object.
[out] | ppObject | - Memory address where the pointer to the object will be stored. |
|
pure virtual |
Decrements the number of strong references by 1 and destroys the referenced object when the counter reaches zero. If there are no more weak references, destroys the reference counters object itself.
|
pure virtual |
Decrements the number of weak references by 1. If there are no more strong and weak references, destroys the reference counters object itself.