xoreos
0.0.5
src
graphics
aurora
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
40
struct
ManagedTexture
{
41
Texture
*
texture
;
42
uint32
referenceCount
;
43
44
ManagedTexture
(
Texture
*t);
45
~ManagedTexture
();
46
};
47
48
typedef
std::map<Common::UString, ManagedTexture *>
TextureMap
;
49
51
class
TextureHandle
{
52
public
:
53
TextureHandle
();
54
TextureHandle
(
const
TextureHandle
&right);
55
~TextureHandle
();
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
Graphics::Aurora::TextureHandle::_empty
bool _empty
Definition:
texturehandle.h:67
Graphics::Aurora::TextureHandle::getTexture
Texture & getTexture() const
Definition:
texturehandle.cpp:85
Common::UString
A class holding an UTF-8 string.
Definition:
ustring.h:48
Graphics::Aurora::TextureMap
std::map< Common::UString, ManagedTexture * > TextureMap
Definition:
texturehandle.h:48
Graphics::Aurora::TextureManager
The global Aurora texture manager.
Definition:
textureman.h:43
Graphics::Aurora::TextureHandle::clear
void clear()
Definition:
texturehandle.cpp:81
Aurora
Definition:
2dafile.cpp:51
Graphics::Aurora::ManagedTexture::~ManagedTexture
~ManagedTexture()
Definition:
texturehandle.cpp:38
Graphics::Aurora::Texture
A texture.
Definition:
texture.h:48
types.h
Low-level type definitions to handle fixed width types portably.
Graphics::Aurora::ManagedTexture
A managed texture, storing how often it's referenced.
Definition:
texturehandle.h:40
Graphics::Aurora::ManagedTexture::referenceCount
uint32 referenceCount
Definition:
texturehandle.h:42
Graphics::Aurora::TextureHandle::operator=
TextureHandle & operator=(const TextureHandle &right)
Definition:
texturehandle.cpp:58
Graphics::Aurora::TextureHandle::~TextureHandle
~TextureHandle()
Definition:
texturehandle.cpp:54
ustring.h
Unicode string handling.
uint32
uint32_t uint32
Definition:
types.h:204
Graphics::Aurora::TextureHandle::empty
bool empty() const
Definition:
texturehandle.cpp:69
Graphics::Aurora::ManagedTexture::ManagedTexture
ManagedTexture(Texture *t)
Definition:
texturehandle.cpp:35
Graphics::Aurora::TextureHandle::getName
const Common::UString & getName() const
Definition:
texturehandle.cpp:74
Graphics
Definition:
loadprogress.h:33
Graphics::Aurora::TextureHandle::_it
TextureMap::iterator _it
Definition:
texturehandle.h:68
Graphics::Aurora::TextureHandle
A handle to a texture.
Definition:
texturehandle.h:51
Graphics::Aurora::ManagedTexture::texture
Texture * texture
Definition:
texturehandle.h:41
Graphics::Aurora::TextureHandle::TextureHandle
TextureHandle()
Definition:
texturehandle.cpp:43
Generated on Sun Nov 18 2018 15:13:41 for xoreos by
1.8.14