]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Resource.hh
minor refactoring and state progress
[chaz/yoink] / src / Moof / Resource.hh
index f7d17824dc2c6d162cd8ff4c3ddb2d3a1971950d..2740fc31a136add04d6bcc81f7a21ae37aa878bc 100644 (file)
  * Interface for textures, sounds, and other types of resources.
  */
 
-#include <stdexcept>
 #include <string>
 #include <vector>
 
+#include <Moof/Exception.hh>
+
 
 namespace Mf {
 
@@ -49,11 +50,6 @@ 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();
 
@@ -74,7 +70,20 @@ public:
 
        static std::string getPath(const std::string& name);
 
+
+       struct Exception : public Mf::Exception
+       {
+               explicit Exception(unsigned error) :
+                       Mf::Exception(error) {}
+
+               void raise()
+               {
+                       throw *this;
+               }
+       };
+
 private:
+
        static std::vector<std::string> searchPaths_;
 };
 
This page took 0.017573 seconds and 4 git commands to generate.