Namespace for resource-specific functionality. More...
Classes | |
class | SoundBufferKey |
Predefined key class for sf::SoundBuffer resources. More... | |
class | MusicKey |
Predefined key class for sf::Music resources. More... | |
class | ImageKey |
Predefined key class for sf::Image resources. More... | |
class | FontKey |
Predefined key class for sf::Font resources. More... | |
class | ShaderKey |
Predefined key class for sf::Shader resources. More... | |
struct | KeyTraits |
Maps common SFML resources to ResourceManager keys. More... | |
Enumerations | |
enum | LoadingFailureStrategy { ThrowException, ReturnNullPointer } |
Specifies the behavior when resources can't be loaded. More... | |
enum | ReleaseStrategy { AutoRelease, ExplicitRelease } |
Specifies the release behavior of unused resources. More... |
Namespace for resource-specific functionality.
Contains resource-related functionality that is a bit more specific than ResourceManager and ResourcePtr.
Specifies the behavior when resources can't be loaded.
This strategy determines what happens when a call to ResourceManager::Acquire() fails (e.g. because of a wrong filename).
ThrowException |
Throws an exception of type ResourceLoadingException. |
ReturnNullPointer |
Returns an empty ResourcePtr. |
Specifies the release behavior of unused resources.
A resource is unused when no more ResourcePtr references it. With this type, you can determine if the resource manager should try to cache the resources or to keep the allocation as low as possible.
AutoRelease |
Resources are immediately released as soon as they are unused. |
ExplicitRelease |
Unused resources are kept in memory until they are explicitly released or the ResourceManager is destroyed. |