]>
Dogcows Code - chaz/yoink/blob - src/Moof/Resource.hh
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
10 **************************************************************************/
12 #ifndef _MOOF_RESOURCE_HH_
13 #define _MOOF_RESOURCE_HH_
17 * Interface for textures, sounds, and other types of resources.
28 * Generic resource class.
35 virtual ~Resource() {}
39 * Add a directory to search when looking for resource files.
40 * @param directory Path to a directory.
43 static void addSearchPaths(const std::string
& path
);
44 static void addSearchPaths(const std::vector
<std::string
>& path
);
47 * Get the path to a resource of a given name.
48 * @param name Name of a resource. The name will be appended to each
49 * search directory in order.
50 * @return The first path found which resolves to a file.
53 static std::string
getPath(const std::string
& name
);
57 static std::vector
<std::string
> gSearchPaths
;
63 #endif // _MOOF_RESOURCE_HH_
This page took 0.039502 seconds and 4 git commands to generate.