X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FResource.hh;h=671aeb65bc3329c69666ba31a0451d7ff1913c52;hp=716e906e03f4c1f53d1ae0b3ba44ace3b3f3ba0b;hb=3f6e44698c38b74bb622ad81ea9d2daa636981d2;hpb=c2321281bf12a7efaedde930422c7ddbc92080d4 diff --git a/src/Moof/Resource.hh b/src/Moof/Resource.hh index 716e906..671aeb6 100644 --- a/src/Moof/Resource.hh +++ b/src/Moof/Resource.hh @@ -34,7 +34,6 @@ * Interface for textures, sounds, and other types of resources. */ -#include #include #include @@ -49,13 +48,8 @@ namespace Mf { class Resource { public: - struct Exception : public std::runtime_error - { - explicit Exception(const std::string& what_arg) : - std::runtime_error(what_arg) {} - }; - virtual ~Resource(); + virtual ~Resource() {} /** @@ -63,7 +57,8 @@ public: * @param directory Path to a directory. */ - static void addSearchPath(const std::string& directory); + static void addSearchPaths(const std::string& path); + static void addSearchPaths(const std::vector& path); /** * Get the path to a resource of a given name. @@ -72,10 +67,11 @@ public: * @return The first path found which resolves to a file. */ - static std::string getPathToResource(const std::string& name); + static std::string getPath(const std::string& name); private: - static std::vector searchPaths_; + + static std::vector gSearchPaths; };