Provides a resource manager for various resource types as well as the possibility to access them safely. More...
Namespaces | |
| namespace | thor::Resources |
| Namespace for resource-specific functionality. | |
Classes | |
| class | thor::ResourceManager< Resource, ResourceKey > |
| Class that is responsible for the management of resources like images, fonts or music. More... | |
| class | thor::ResourcePtr< Resource > |
| Shared ownership smart pointer allowing safe access to resources. More... | |
Functions | |
| template<class Resource > | |
| void | thor::swap (ResourcePtr< Resource > &lhs, ResourcePtr< Resource > &rhs) |
| Swaps both ResourcePtr objects. | |
| template<class Resource1 , class Resource2 > | |
| bool | thor::operator== (const ResourcePtr< Resource1 > &lhs, const ResourcePtr< Resource2 > &rhs) |
| Equality comparison operator. | |
| template<class Resource1 , class Resource2 > | |
| bool | thor::operator!= (const ResourcePtr< Resource1 > &lhs, const ResourcePtr< Resource2 > &rhs) |
| Inequality comparison operator. | |
Defines | |
| #define | THOR_MAP_RESOURCEKEY(Resource, ResourceKey) |
| Macro that maps resources to their default resource key. | |
Provides a resource manager for various resource types as well as the possibility to access them safely.
| bool operator!= | ( | const ResourcePtr< Resource1 > & | lhs, |
| const ResourcePtr< Resource2 > & | rhs | ||
| ) | [related] |
Inequality comparison operator.
Returns false when lhs and rhs share the same resource or are both NULL, and true otherwise. Resource1 and Resource2 may only differ in const-qualification, apart from that the types must be the same.
| bool operator== | ( | const ResourcePtr< Resource1 > & | lhs, |
| const ResourcePtr< Resource2 > & | rhs | ||
| ) | [related] |
Equality comparison operator.
Returns true when lhs and rhs share the same resource or are both NULL, and false otherwise. Resource1 and Resource2 may only differ in const-qualification, apart from that the types must be the same.
| #define THOR_MAP_RESOURCEKEY | ( | Resource, | |
| ResourceKey | |||
| ) |
Macro that maps resources to their default resource key.
This macro creates a specialization of thor::Resources::KeyTraits. You can use the macro in the global namespace to define a default ResourceKey for a given Resource class. Then, you don't have to specify the thor::ResourceManager's second template parameter anymore.