]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Sound.hh
considerable refactoring
[chaz/yoink] / src / Moof / Sound.hh
index bc669bcd5df6dcf629ab26a97b564b23e6151b3a..3f64162f0ca4b2a690f3b7be7005095ee00a3f7c 100644 (file)
 namespace Mf {
 
 
+class Sound;
+typedef boost::shared_ptr<Sound> SoundP;
+
+
 class Sound : public Resource
 {
+protected:
+       Sound() {}
+       class Impl;
+       boost::shared_ptr<Impl> impl_;
+
 public:
+
+       static SoundP alloc(const std::string& name)
+       {
+               return SoundP(new Sound(name));
+       }
+
        Sound(const std::string& name);
 
        void play();
@@ -59,6 +74,7 @@ public:
 
        static std::string getPath(const std::string& name);
 
+
        struct Exception : public Mf::Exception
        {
                enum
@@ -84,11 +100,6 @@ public:
                        return Mf::Exception::what();
                }
        };
-
-protected:
-       Sound() {}
-       class Impl;
-       boost::shared_ptr<Impl> impl_;
 };
 
 
This page took 0.018375 seconds and 4 git commands to generate.