Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Protected Attributes | List of all members
Mezzanine::UI::TextureAtlasHandler Class Reference

This handles the creation, storage and overall handling of Texture Atlases. More...

#include <textureatlashandler.h>

+ Collaboration diagram for Mezzanine::UI::TextureAtlasHandler:

Public Types

typedef std::map< String, UI::TextureAtlas * > AtlasContainer
 Container type for TextureAtlas storage within this class.
 
typedef AtlasContainer::iterator AtlasIterator
 Iterator type for TextureAtlases being stored within this class.
 
typedef AtlasContainer::const_iterator ConstAtlasIterator
 Const Iterator type for TextureAtlases being stored within this class.
 

Public Member Functions

 TextureAtlasHandler ()
 Class constructor.
 
 ~TextureAtlasHandler ()
 Class destructor.
 
void DestroyAllAtlases ()
 Destroys all loaded texture atlases.
 
void DestroyAtlas (TextureAtlas *ToBeDestroyed)
 Destroys a loaded texture atlas. More...
 
UI::TextureAtlasGetAtlas (const String &AtlasName)
 Gets a loaded Atlas being stored in this manager. More...
 
UI::TextureAtlasGetAtlasExcept (const String &AtlasName)
 Gets a loaded Atlas being stored in this manager. More...
 
void LoadAtlasFromFile (const String &Name, const String &Group="UI")
 Loads a Mezzanine Texture Atlas file for use with UI::Screen's. More...
 

Protected Attributes

AtlasContainer Atlases
 Container storing all currently loaded texture atlases. More...
 

Detailed Description

This handles the creation, storage and overall handling of Texture Atlases.

Definition at line 54 of file textureatlashandler.h.

Member Function Documentation

void Mezzanine::UI::TextureAtlasHandler::DestroyAtlas ( TextureAtlas ToBeDestroyed)

Destroys a loaded texture atlas.

Parameters
ToBeDestroyedA pointer to the texture atlas that will be destroyed.

Definition at line 112 of file textureatlashandler.cpp.

UI::TextureAtlas * Mezzanine::UI::TextureAtlasHandler::GetAtlas ( const String AtlasName)

Gets a loaded Atlas being stored in this manager.

Parameters
AtlasNameThe name of the Atlas, which is usually the name of the file without the extension.
Returns
Returns a pointer to the requested Atlas, or NULL if it doesn't exist.

Definition at line 92 of file textureatlashandler.cpp.

UI::TextureAtlas * Mezzanine::UI::TextureAtlasHandler::GetAtlasExcept ( const String AtlasName)

Gets a loaded Atlas being stored in this manager.

Parameters
AtlasNameThe name of the Atlas, which is usually the name of the file without the extension.
Returns
Returns a pointer to the requested Atlas, or throws an exception if it doesn't exist.

Definition at line 102 of file textureatlashandler.cpp.

void Mezzanine::UI::TextureAtlasHandler::LoadAtlasFromFile ( const String Name,
const String Group = "UI" 
)

Loads a Mezzanine Texture Atlas file for use with UI::Screen's.

Parameters
NameThe name of the file to be loaded.
GroupThe resource group where the MTA file can be found.
Todo:
Update after we have refactored the resource system if needed.

Definition at line 63 of file textureatlashandler.cpp.

Member Data Documentation

AtlasContainer Mezzanine::UI::TextureAtlasHandler::Atlases
protected

Container storing all currently loaded texture atlases.

Definition at line 66 of file textureatlashandler.h.


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