#include <DynObjPtr.hpp>

Public Types | |
| enum | { isStatic = 1, hasDoRef = 2, hasWeakRef = 4, hasStrongRef = 8 } |
Public Member Functions | |
| DynObjPtr () | |
| DynObjPtr (T *pt, bool try_strong_ref=false) | |
| DynObjPtr (DynObjPtr &dop) | |
| DynObjPtr & | operator= (T *pt) |
| DynObjPtr & | operator= (DynObjPtr< T > &dop) |
| DynObjPtr & | Assign (T *pt, bool try_strong_ref=false) |
| operator T * () | |
| operator T & () | |
| T & | operator* () |
| T * | operator-> () |
| T * | Get () |
| bool | HasStrongRef () |
| bool | IsOk () |
| bool | Release () |
Protected Member Functions | |
| bool | InternalAssign (T *pt, int try_strong_ref) |
| void | InternalRelease () |
| virtual bool docall | OnNotify (NotifierI *pni, int evt, NotifDataI *pnd) |
Protected Attributes | |
| char | m_flags |
| bool | m_flag_unused2 |
| bool | m_flag_unused1 |
| bool | m_flag_unused |
| T * | m_pt |
| union { | |
| NotifierI * m_pni | |
| DynObj * m_pdo | |
| }; | |
So, if all objects instantiated from a plugin are held with a DynObjPtr, that plugin can be safely unloaded (with regards to valid pointers).
One argument constructor.
Assignment operator.
| pt | The DynObj we want to own. |
Assignment operator.
| dop | The DynObj we want to own. |
| DynObjPtr& DynObjPtr< T >::Assign | ( | T * | pt, | |
| bool | try_strong_ref = false | |||
| ) | [inline] |
Assignment operator.
| pt | The DynObj we want to own. | |
| try_strong_ref | Attempt to create a shared ref on the object? (default: false). |
| DynObjPtr< T >::operator T * | ( | ) | [inline] |
Access raw pointer.
| DynObjPtr< T >::operator T & | ( | ) | [inline] |
Access as a reference.
| T& DynObjPtr< T >::operator* | ( | ) | [inline] |
Access as a reference.
| T* DynObjPtr< T >::operator-> | ( | ) | [inline] |
Access raw pointer.
| T* DynObjPtr< T >::Get | ( | ) | [inline] |
Access raw pointer.
| bool DynObjPtr< T >::HasStrongRef | ( | ) | [inline] |
Returns true if we have a ref on a shared object
| bool DynObjPtr< T >::IsOk | ( | ) | [inline] |
Do we have an object now?
Reimplemented in ScopedDynObj< T >.
| bool DynObjPtr< T >::Release | ( | ) | [inline] |
Release our object in the suitable way
1.5.6