|
GEL
2
GEL is a library for Geometry and Linear Algebra
|
Template for a pointer to a reference counted resource. More...
#include <ResourceManager.h>
Public Member Functions | |
| ResourcePtr (const ResourcePtr &r2) | |
| const ResourcePtr & | operator= (const ResourcePtr &r2) |
| RES & | operator* () const |
| RES *const | operator-> () const |
| RES *const | get_raw_ptr () const |
| int | usage () const |
| bool | is_valid () const |
| void | relinquish_resource () |
| void | remove_when_unused () |
Friends | |
| class | ResourceManager< RES > |
Template for a pointer to a reference counted resource.
The ResourcePtr class template is a template for a reference counted resource pointer. It is a smart pointer that actually points to a ResourceRecord and not to the actual resource. Since the record contains a reference count, we can increase the reference count when the pointer is copied and decrease it in the destructor. Only the ResourceManager can create ResourcePtr's directly from a raw ResourceRecord.
| void Util::ResourcePtr< RES >::remove_when_unused | ( | ) | [inline] |
Calling this function sets the REMOVE_WHEN_UNUSED flag. If this flag is set, the resource record is removed from the manager
1.7.5.1