/TGame/TServerMS/Scene/SceneManagerSvr.h

http://awoe.googlecode.com/ · C Header · 37 lines · 16 code · 7 blank · 14 comment · 0 complexity · fa58f6c5a357173f2345953e95bd166b MD5 · raw file

  1. #ifndef ___SCENE_MANAGER_SVR____
  2. #define ___SCENE_MANAGER_SVR____
  3. #include "Scene/SceneManager.h"
  4. //
  5. // dynamic data interface used for creating a new scene
  6. //
  7. class SceneManagerSvr : public SceneManager
  8. {
  9. public:
  10. SceneManagerSvr();
  11. virtual ~SceneManagerSvr();
  12. //
  13. // add a scene by static id and table
  14. // scene will be fully initialized in it loading method
  15. //
  16. virtual IScene* addScene(int nStaticID, short type);
  17. //
  18. // remove a scene by its instance id
  19. //
  20. virtual bool rmvScene(int nInstanceID);
  21. protected:
  22. virtual IScene* createScene(int nStaticID, short type);
  23. //
  24. // static id to instance id for city only
  25. // note that each city will only have one instance
  26. //
  27. typedef stdext::hash_map<int, int> StaticToInstance;
  28. StaticToInstance m_stoi;
  29. };
  30. #endif