Cytopia
0.3
A city building simulation game
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
z
~
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
a
c
d
e
g
i
m
n
p
r
s
t
u
v
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
Functions
b
c
d
f
g
i
m
o
p
r
s
t
w
Variables
a
c
d
g
h
i
l
m
n
r
s
t
Typedefs
a
c
d
e
f
g
i
j
l
m
n
r
s
t
v
Enumerations
Enumerator
a
b
d
e
f
g
l
m
n
p
r
s
t
u
w
z
Macros
_
c
e
i
l
n
r
s
t
v
Examples
▼
Cytopia
Todo List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
src
►
engine
►
game
►
scripting
▼
services
►
AudioMixer.cxx
►
AudioMixer.hxx
►
GameClock.cxx
►
GameClock.hxx
GameClock.inl.hxx
Randomizer.cxx
►
Randomizer.hxx
►
ResourceManager.cxx
►
ResourceManager.hxx
►
ResourceManager.inl.hxx
►
util
►
windows
Game.cxx
►
Game.hxx
►
main.cxx
►
MainMenu.cxx
►
MainMenu.hxx
phc.hxx
►
File Members
►
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
ResourceManager.inl.hxx
Go to the documentation of this file.
1
2
template
<
typename
ResourceID>
struct
ResourceManager::resource_type
3
{
4
};
5
6
#ifdef USE_AUDIO
7
template
<>
struct
ResourceManager::resource_type
<
SoundtrackID
>
8
{
9
using
type =
SoundtrackUPtr
&;
10
};
11
#endif // USE_AUDIO
12
13
template
<
typename
ResourceID>
14
typename
ResourceManager::resource_type<ResourceID>::type
ResourceManager::get
(
const
ResourceID &
id
)
15
{
16
fetch(
id
);
17
#ifdef USE_AUDIO
18
if
constexpr (std::is_same_v<ResourceID, SoundtrackID>)
19
return
m_soundtracks.at(
id
).resource;
20
#endif // USE_AUDIO
21
}
StrongType< string, struct SoundtrackIDTag >
SoundtrackUPtr
std::unique_ptr< Soundtrack > SoundtrackUPtr
Definition:
Soundtrack.hxx:98
ResourceManager::resource_type
Definition:
ResourceManager.hxx:60
ResourceManager::get
resource_type< ResourceID >::type get(const ResourceID &)
Fetches and return a Soundtrack.
Definition:
ResourceManager.inl.hxx:14
src
services
ResourceManager.inl.hxx
Generated on Sun Nov 27 2022 09:50:52 for Cytopia by
1.8.17