#include <PointerHandle.h>
Definition at line 34 of file PointerHandle.h.
Public Member Functions | |
PointerHandle () | |
virtual | ~PointerHandle () |
_PtrType * | ptr () const |
| |
_PtrType & | operator * () const |
referencing operations will resurrect pointers if need be | |
_PtrType * | operator-> () const |
referencing operations will resurrect pointers if need be | |
Protected Member Functions | |
virtual void | invalidate () const =0 |
virtual void | restore () const =0 |
virtual void | update () const =0 |
void | restore_and_update () const |
Protected Attributes | |
_PtrType * | ptr_ |
oasys::PointerHandle< _PtrType >::PointerHandle | ( | ) | [inline] |
Adds the pointer to the cache.
Definition at line 39 of file PointerHandle.h.
virtual oasys::PointerHandle< _PtrType >::~PointerHandle | ( | ) | [inline, virtual] |
Unregisters the contained pointer from the cache.
Definition at line 44 of file PointerHandle.h.
References oasys::PointerHandle< _PtrType >::ptr_.
_PtrType& oasys::PointerHandle< _PtrType >::operator * | ( | ) | const [inline] |
referencing operations will resurrect pointers if need be
Definition at line 47 of file PointerHandle.h.
References oasys::PointerHandle< _PtrType >::ptr_, and oasys::PointerHandle< _PtrType >::restore_and_update().
_PtrType* oasys::PointerHandle< _PtrType >::operator-> | ( | ) | const [inline] |
referencing operations will resurrect pointers if need be
Definition at line 51 of file PointerHandle.h.
References oasys::PointerHandle< _PtrType >::ptr_, and oasys::PointerHandle< _PtrType >::restore_and_update().
_PtrType* oasys::PointerHandle< _PtrType >::ptr | ( | ) | const [inline] |
Definition at line 58 of file PointerHandle.h.
References oasys::PointerHandle< _PtrType >::ptr_, and oasys::PointerHandle< _PtrType >::restore_and_update().
virtual void oasys::PointerHandle< _PtrType >::invalidate | ( | ) | const [protected, pure virtual] |
Invalidate and free the resources associated with this pointer. Invalid pointers are null pointers.
virtual void oasys::PointerHandle< _PtrType >::restore | ( | ) | const [protected, pure virtual] |
Restore the resources associated with this pointer. Assumes the pointer is invalid.
Referenced by oasys::PointerHandle< _PtrType >::restore_and_update().
virtual void oasys::PointerHandle< _PtrType >::update | ( | ) | const [protected, pure virtual] |
Update usage information (e.g. for LRU)
Referenced by oasys::PointerHandle< _PtrType >::restore_and_update().
void oasys::PointerHandle< _PtrType >::restore_and_update | ( | ) | const [inline, protected] |
Definition at line 83 of file PointerHandle.h.
References ASSERT, oasys::PointerHandle< _PtrType >::ptr_, oasys::PointerHandle< _PtrType >::restore(), and oasys::PointerHandle< _PtrType >::update().
Referenced by oasys::PointerHandle< _PtrType >::operator *(), oasys::PointerHandle< _PtrType >::operator->(), and oasys::PointerHandle< _PtrType >::ptr().
_PtrType* oasys::PointerHandle< _PtrType >::ptr_ [mutable, protected] |
Definition at line 64 of file PointerHandle.h.
Referenced by oasys::PointerHandle< _PtrType >::operator *(), oasys::PointerHandle< _PtrType >::operator->(), oasys::PointerHandle< _PtrType >::ptr(), oasys::PointerHandle< _PtrType >::restore_and_update(), and oasys::PointerHandle< _PtrType >::~PointerHandle().