sftools
2.0 dev
Bunch of tools for SFML application development
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
include
sftools
ResourceManager
SFMLManagers.hpp
Go to the documentation of this file.
1
/*
2
3
sftools - Copyright (c) 2012-2013 Marco Antognini <antognini.marco@gmail.com>
4
5
This software is provided 'as-is', without any express or implied warranty. In
6
no event will the authors be held liable for any damages arising from the use
7
of this software.
8
9
Permission is granted to anyone to use this software for any purpose, including
10
commercial applications, and to alter it and redistribute it freely, subject to
11
the following restrictions:
12
13
1. The origin of this software must not be misrepresented; you must not claim
14
that you wrote the original software. If you use this software in a product,
15
an acknowledgment in the product documentation would be appreciated but is
16
not required.
17
18
2. Altered source versions must be plainly marked as such, and must not be
19
misrepresented as being the original software.
20
21
3. This notice may not be removed or altered from any source distribution.
22
23
*/
24
30
#ifndef __SFTOOLS_SFMLMANAGERS_HPP__
31
#define __SFTOOLS_SFMLMANAGERS_HPP__
32
33
#include <
sftools/ResourceManager/Loaders.hpp
>
34
#include <SFML/Graphics/Texture.hpp>
35
#include <SFML/Graphics/Image.hpp>
36
#include <SFML/Graphics/Font.hpp>
37
38
// SFML's audio module is not always used. We don't want the user to be forced
39
// to link against sfml-audio if he doesn't use it.
40
#ifndef SFTOOLS_NO_AUDIO
41
#include <SFML/Audio/Sound.hpp>
42
#include <SFML/Audio/SoundBuffer.hpp>
43
#include <SFML/Audio/Music.hpp>
44
#endif
45
50
namespace
sftools
51
{
56
namespace
loader
57
{
62
typedef
loader::LoadFromFile<sf::Texture>
TextureLoaderFromFile
;
63
68
typedef
loader::LoadFromFile<sf::Image>
ImageLoaderFromFile
;
69
74
typedef
loader::LoadFromFile<sf::Font>
FontLoaderFromFile
;
75
76
#ifndef SFTOOLS_NO_AUDIO
77
82
typedef
loader::LoadFromFile<sf::SoundBuffer>
SoundBufferLoaderFromFile
;
83
88
typedef
loader::OpenFromFile<sf::Music>
MusicOpenerFromFile
;
89
90
#endif
91
}
92
97
typedef
sftools::GenericManager
<sf::Texture,
98
std::string,
99
loader::TextureLoaderFromFile
>
100
TextureManager
;
101
106
typedef
sftools::GenericManager
<sf::Image,
107
std::string,
108
loader::ImageLoaderFromFile
>
109
ImageManager
;
110
115
typedef
sftools::GenericManager
<sf::Font,
116
std::string,
117
loader::FontLoaderFromFile
>
118
FontManager
;
119
120
#ifndef SFTOOLS_NO_AUDIO
121
126
typedef
sftools::GenericManager
<sf::SoundBuffer,
127
std::string,
128
loader::SoundBufferLoaderFromFile
>
129
SoundBufferManager
;
130
135
typedef
sftools::GenericManager
<sf::Music,
136
std::string,
137
loader::MusicOpenerFromFile
>
138
MusicManager
;
139
140
#endif
141
146
namespace
singleton
147
{
152
typedef
sftools::Singleton<TextureManager>
TextureManager
;
153
158
typedef
sftools::Singleton<ImageManager>
ImageManager
;
159
164
typedef
sftools::Singleton<FontManager>
FontManager
;
165
166
#ifndef SFTOOLS_NO_AUDIO
167
172
typedef
sftools::Singleton<SoundBufferManager>
SoundBufferManager
;
173
178
typedef
sftools::Singleton<MusicManager>
MusicManager
;
179
180
#endif
181
}
182
}
183
184
185
#endif // __SFTOOLS_SFMLMANAGERS_HPP__
Generated on Sun Jan 27 2013 12:59:33 for sftools by
1.8.3