Gamedev Framework (gf)
0.3.0
A C++11 framework for 2D games
|
An asset manager. More...
#include <gf/AssetManager.h>
Public Member Functions | |
void | addSearchDir (Path path) |
Add a search directory. More... | |
Path | getAbsolutePath (const Path &relativePath) const |
Search a file in the search directories. More... | |
An asset manager.
gf::AssetManager is a base class for searching files in some seach directories. If you are looking for some more sophisticated manager, you should look at gf::ResourceManager.
void gf::AssetManager::addSearchDir | ( | Path | path | ) |
Add a search directory.
If the provided path is not a directory, it is not added to the current search directories.
path | The path of the directory |
Search a file in the search directories.
This function tries to build absolute paths by joining a search directory and the relative path to the file.
If the provided path is absolute, then it is returned without searching in the search directories.
relativePath | A path to the file, relative to a search directory |