#pragma once #include "Array.h" #include "Critical.h" namespace Framework { class Textur; //! Textur.h //! Manages all loaded texture data so that multiple drawings can use //! the same data class TexturList : public virtual ReferenceCounter { private: static int id; static Critical cs; RCArray* textures; RCArray* names; public: //! Constructor TexturList(); //! Destructor ~TexturList(); //! Deletes all textures DLLEXPORT void leeren(); //! Adds a texture to the list //! \param t The texture //! \param name The name under which the texture is stored in the list DLLEXPORT bool addTextur(Textur* t, const char* name); //! Removes a texture from the list //! \param name The name of the texture DLLEXPORT void removeTextur(const char* name); //! Checks whether a texture is stored under a specific name //! \param name The name \return true if a texture with the name exists DLLEXPORT bool hatTextur(const char* name) const; //! Returns a specific texture //! \param name The name of the texture DLLEXPORT Textur* getTextur(const char* name) const; //! Returns a specific texture //! \param id The id of the texture DLLEXPORT Textur* getTextur(int id) const; //! Returns a specific texture without increased reference counter //! \param name The name of the texture DLLEXPORT Textur* zTextur(const char* name) const; //! Returns a specific texture without increased reference counter //! \param id The id of the texture DLLEXPORT Textur* zTextur(int id) const; //! Initializes static private members. Called automatically by the //! framework. static void init(); //! Deletes static private members. Called automatically by the //! framework. static void destroy(); }; } // namespace Framework