40 #ifndef _uitextureatlashandler_cpp
41 #define _uitextureatlashandler_cpp
43 #include "UI/textureatlashandler.h"
44 #include "UI/textureatlas.h"
67 AtlasStream->SetStreamPosition(0);
69 AtlasDoc.
Load( *AtlasStream.
Get() );
72 if( !RootNode.
Empty() )
95 if( AtlasIt != this->
Atlases.end() ) {
96 return (*AtlasIt).second;
105 if( AtlasIt != this->
Atlases.end() ) {
106 return (*AtlasIt).second;
115 if( AtlasIt != this->
Atlases.end() ) {
116 delete (*AtlasIt).second;
124 {
delete (*AtlasIt).second; }
Thrown when duplicates of teh same identity string exist.
const String & GetName() const
Gets the name of this Texture Atlas.
Thrown when the requested identity could not be found.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
A simple reference counting pointer.
~TextureAtlasHandler()
Class destructor.
This is a collection of smaller textures packed into a larger texture, intended to increase UI perfor...
void LoadAtlasFromFile(const String &Name, const String &Group="UI")
Loads a Mezzanine Texture Atlas file for use with UI::Screen's.
UI::TextureAtlas * GetAtlas(const String &AtlasName)
Gets a loaded Atlas being stored in this manager.
bool Empty() const
Is this storing anything at all?
ParseResult Load(std::basic_istream< char, std::char_traits< char > > &stream, unsigned int options=ParseDefault, Encoding DocumentEncoding=EncodingAuto)
Load XML from a stream.
TextureAtlasHandler()
Class constructor.
UI::TextureAtlas * GetAtlasExcept(const String &AtlasName)
Gets a loaded Atlas being stored in this manager.
static ResourceManager * GetSingletonPtr()
Fetches a pointer to the singleton.
TypePointedTo * Get() const
Get the raw pointer to the managed object.
Child node iterator (a bidirectional iterator over a collection of Node)
A light-weight handle for manipulating nodes in DOM tree.
iterator begin() const
Get a Child node iterator that references the first child Node.
void DestroyAllAtlases()
Destroys all loaded texture atlases.
iterator end() const
Get a Child node iterator that references one past the last child Node.
AtlasContainer::iterator AtlasIterator
Iterator type for TextureAtlases being stored within this class.
The defintion of the Resource Manager.
Thrown when the available information should have worked but failed for unknown reasons.
The root node of any xml hierarchy is a Document.
The bulk of the engine components go in this namspace.
void DestroyAtlas(TextureAtlas *ToBeDestroyed)
Destroys a loaded texture atlas.
AtlasContainer Atlases
Container storing all currently loaded texture atlases.
std::string String
A datatype used to a series of characters.
Declaration of DataStream.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.