Gamedev Framework (gf)  0.3.0
A C++11 framework for 2D games
Public Member Functions | List of all members
gf::ResourceManager Class Reference

A resource manager. More...

#include <gf/ResourceManager.h>

Inheritance diagram for gf::ResourceManager:
Inheritance graph
[legend]

Public Member Functions

 ResourceManager ()
 Default constructor. More...
 
TexturegetTexture (const Path &path)
 Get a texture. More...
 
FontgetFont (const Path &path)
 Get a font. More...
 
- Public Member Functions inherited from gf::AssetManager
void addSearchDir (Path path)
 Add a search directory. More...
 
Path getAbsolutePath (const Path &relativePath) const
 Search a file in the search directories. More...
 

Detailed Description

A resource manager.

See also
gf::ResourceCache

Constructor & Destructor Documentation

gf::ResourceManager::ResourceManager ( )

Default constructor.

Member Function Documentation

Font& gf::ResourceManager::getFont ( const Path path)
inline

Get a font.

Parameters
pathA path to the font
Returns
A reference to the font
Exceptions
std::runtime_errorIf the font is not found
Texture& gf::ResourceManager::getTexture ( const Path path)
inline

Get a texture.

Parameters
pathA path to the texture
Returns
A reference to the texture
Exceptions
std::runtime_errorIf the texture is not found