Torque Game Engine DocumentationTGE Version 1.5.2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Resource< T > Class Template Reference#include <resManager.h>
Inheritance diagram for Resource< T >: ![]() Detailed Description
Wrapper class around a ResourceInstance subclass.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| Resource () | |
| If assigned a ResourceObject, it's assumed to already have been locked, lock count is incremented only for copies or assignment from another Resource. | |
| Resource (ResourceObject *p) | |
| Resource (const Resource &res) | |
| ~Resource () | |
| Decrements the lock count on this object, and if the lock count is 0 afterwards, adds the object to the timeoutList for deletion on execution of purge(). | |
| const char * | getFilePath () const |
| Returns the path of the file (without the actual name). | |
| const char * | getFileName () const |
| Returns the actual file name (without the path). | |
| Resource & | operator= (ResourceObject *p) |
| Resource & | operator= (const Resource &r) |
| U32 | getCRC () |
| bool | isNull () const |
| operator bool () const | |
| T * | operator-> () |
| T & | operator * () |
| operator T * () const | |
| const T * | operator-> () const |
| const T & | operator * () const |
| operator const T * () const | |
| void | unlock () |
| void | purge () |
Private Member Functions | |
| void | _lock () |
| Increments the lock count on this object. | |
| void | _unlock () |
| Decrements the lock count on this object. | |
Private Attributes | |
| ResourceObject * | obj |
| Actual resource object. | |
If assigned a ResourceObject, it's assumed to already have been locked, lock count is incremented only for copies or assignment from another Resource.
| Resource< T >::Resource | ( | ResourceObject * | p | ) | [inline] |
Decrements the lock count on this object, and if the lock count is 0 afterwards, adds the object to the timeoutList for deletion on execution of purge().
Increments the lock count on this object.
Decrements the lock count on this object.
| const char* Resource< T >::getFilePath | ( | ) | const [inline] |
Returns the path of the file (without the actual name).
| const char* Resource< T >::getFileName | ( | ) | const [inline] |
Returns the actual file name (without the path).
| Resource& Resource< T >::operator= | ( | ResourceObject * | p | ) | [inline] |
| bool Resource< T >::isNull | ( | ) | const [inline] |
| Resource< T >::operator bool | ( | ) | const [inline] |
| T* Resource< T >::operator-> | ( | ) | [inline] |
| T& Resource< T >::operator * | ( | ) | [inline] |
| Resource< T >::operator T * | ( | ) | const [inline] |
| const T* Resource< T >::operator-> | ( | ) | const [inline] |
| const T& Resource< T >::operator * | ( | ) | const [inline] |
| Resource< T >::operator const T * | ( | ) | const [inline] |
ResourceObject* Resource< T >::obj [private] |
Actual resource object.