Hummingbird Framework
 All Classes Functions Variables Modules Pages
hb::TextureManager Class Reference
Inheritance diagram for hb::TextureManager:
Collaboration diagram for hb::TextureManager:

Public Member Functions

bool isLoaded (const std::string &path, const sf::IntRect &area=sf::IntRect()) const
 
void release (int id) override
 Release a resource with identifier id. More...
 
int getT404 () const
 
- Public Member Functions inherited from hb::ResourceManager< TextureManager, sf::Texture, detail::tex_id >
 ResourceManager ()
 Class constructor.
 
 ~ResourceManager ()
 Class destructor.
 
int addResource (const detail::tex_id &resource_id, const sf::Texture &resource)
 Add resource to manager. More...
 
void releaseAll (int id)
 Release all resources with identifier id. More...
 
const sf::Texture & get (int id) const
 Get resource with identifier id. More...
 
sf::Texture & get (int id)
 Get resource with identifier id. More...
 
const detail::tex_id & getId (int id) const
 Get ResourceId of resource with identifier id. More...
 
bool isLoaded (int id) const
 Returns wether the resource with identifier id is loaded. More...
 
bool isLoaded (const detail::tex_id &resource_id) const
 Returns wether the resource with ResourceId resource_id is loaded. More...
 
bool isLoaded (const detail::tex_id &resource_id, int &id) const
 Returns wether the resource with ResourceId resource_id is loaded and if it is loaded, puts the ResourceManager id in id. More...
 
int countResourceUsage (int id) const
 Returns number of active requests for resource id. More...
 
int size () const
 Returns number of resources currently loaded. More...
 
int resourceCount () const
 Returns number of all resources ever loaded. More...
 
void clear ()
 Release all resources.
 

Static Public Member Functions

static detail::tex_id makeTexId (const std::string &path, const sf::IntRect &area)
 
- Static Public Member Functions inherited from hb::ResourceManager< TextureManager, sf::Texture, detail::tex_id >
static TextureManagerinstance ()
 Get the singleton instance. More...
 

Member Function Documentation

void hb::TextureManager::release ( int  id)
overridevirtual

Release a resource with identifier id.

Parameters
idIdentifier of the resource in the ResourceManager.

If there is registered more than one usage of the resource, its counter will be decresed and the resource won't be deleted until its usage count reaches 0.

Reimplemented from hb::ResourceManager< TextureManager, sf::Texture, detail::tex_id >.


The documentation for this class was generated from the following file: