#include <tb_resource_handle.hpp>
Public Member Functions | |
| ResourceHandle (void) | |
| ~ResourceHandle (void) | |
| bool | IsValid (void) const |
| operator bool () const | |
| bool | operator== (const ResourceHandle &other) const |
| bool | operator!= (const ResourceHandle &other) const |
| bool | operator< (const ResourceHandle &other) const |
| size_t | GetHash (void) const |
| ResourceHandle (const tbCore::uint32 value) | |
Public Attributes | |
| tbCore::uint32 | mValue |
The ResourceHandle provides a typesafe handle specific to a type of ResourceCache so that mixing TextureHandle's and AudioHandle's and such will cause compilation errors and prevent mistakes.
| TurtleBrains::Core::ResourceHandle< Type >::ResourceHandle | ( | void | ) |
Constructs an invalid resource handle by default.
| TurtleBrains::Core::ResourceHandle< Type >::~ResourceHandle | ( | void | ) |
Destructs the resource handle object.
| TurtleBrains::Core::ResourceHandle< Type >::ResourceHandle | ( | const tbCore::uint32 | value | ) |
Disabled constructor that allows the setting of value directly by the ResouceCache only.
| bool TurtleBrains::Core::ResourceHandle< Type >::IsValid | ( | void | ) | const |
Checks to see if the handle is a valid handle and returns true if it is valid, false if it is in invalid.
| TurtleBrains::Core::ResourceHandle< Type >::operator bool |
Checks to see if the handle is a valid handle and returns true if it is valid, false if it is in invalid.
| bool TurtleBrains::Core::ResourceHandle< Type >::operator!= | ( | const ResourceHandle< Type > & | other | ) | const |
Checks to see if two ResourceHandles are NOT matching one another.
| bool TurtleBrains::Core::ResourceHandle< Type >::operator== | ( | const ResourceHandle< Type > & | other | ) | const |
Checks to see if two ResourceHandles are matching one another.
| tbCore::uint32 TurtleBrains::Core::ResourceHandle< Type >::mValue |
Disabled size_t operator to convert the ResourceHandle into an index to be used for accessing in the ResourceCache arrays.
The index into the ResouceCache to the Resource that the handle represents.