]> git.tdb.fi Git - libs/demoscene.git/blobdiff - source/demo.h
Put everything in namespace Msp::DemoScene
[libs/demoscene.git] / source / demo.h
index e9d369bf9b337b202480b8ef1cf128a47127fb80..b4adb371f1c1d65ce2a152a0121cd07d08b4d901 100644 (file)
 #include "action.h"
 #include "sequencer.h"
 
+namespace Msp {
+namespace DemoScene {
+
+class Stage;
+
 class Demo
 {
 private:
@@ -30,6 +35,8 @@ private:
        };
 
 public:
+       typedef std::map<std::string, Msp::Variant> ThingMap;
+
        sigc::signal<void> signal_finished;
 
 protected:
@@ -46,7 +53,7 @@ protected:
        Msp::Time::TimeStamp last_tick;
        Msp::Time::TimeStamp next_frame;
 
-       std::map<std::string, Msp::Variant> things;
+       ThingMap things;
 
        Demo(Msp::Graphics::Window &, Msp::Graphics::GLContext &, Msp::DataFile::Collection &);
 public:
@@ -55,6 +62,9 @@ public:
        Msp::DataFile::Collection &get_resources() const { return resources; }
        Msp::GL::AnimationPlayer &get_animation_player() { return anim_player; }
 
+protected:
+       void add_stage(const std::string &, Stage &);
+public:
        template<typename T>
        T &get_thing(const std::string &);
 
@@ -72,4 +82,7 @@ T &Demo::get_thing(const std::string &name)
        return *get_item(things, name).value<T *>();
 }
 
+} // namespace DemoScene
+} // namespace Msp
+
 #endif