xoreos  0.0.5
texturehandle.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef GRAPHICS_AURORA_TEXTUREHANDLE_H
26 #define GRAPHICS_AURORA_TEXTUREHANDLE_H
27 
28 #include <map>
29 
30 #include "src/common/types.h"
31 #include "src/common/ustring.h"
32 
33 namespace Graphics {
34 
35 namespace Aurora {
36 
37 class Texture;
38 
43 
46 };
47 
48 typedef std::map<Common::UString, ManagedTexture *> TextureMap;
49 
52 public:
53  TextureHandle();
54  TextureHandle(const TextureHandle &right);
56 
57  TextureHandle &operator=(const TextureHandle &right);
58 
59  bool empty() const;
60  const Common::UString &getName() const;
61 
62  void clear();
63 
64  Texture &getTexture() const;
65 
66 private:
67  bool _empty;
68  TextureMap::iterator _it;
69 
70  TextureHandle(TextureMap::iterator &i);
71 
72  friend class TextureManager;
73 };
74 
75 } // End of namespace Aurora
76 
77 } // End of namespace Graphics
78 
79 #endif // GRAPHICS_AURORA_TEXTUREHANDLE_H
A class holding an UTF-8 string.
Definition: ustring.h:48
std::map< Common::UString, ManagedTexture * > TextureMap
Definition: texturehandle.h:48
The global Aurora texture manager.
Definition: textureman.h:43
Low-level type definitions to handle fixed width types portably.
A managed texture, storing how often it&#39;s referenced.
Definition: texturehandle.h:40
TextureHandle & operator=(const TextureHandle &right)
Unicode string handling.
uint32_t uint32
Definition: types.h:204
const Common::UString & getName() const
TextureMap::iterator _it
Definition: texturehandle.h:68
A handle to a texture.
Definition: texturehandle.h:51