My Project
BlockWorldManager.h
1 #pragma once
2 #include <map>
3 #include <string>
4 
5 namespace ParaEngine
6 {
7  class CBlockWorld;
8 
11  {
12  public:
13  typedef std::map<std::string, CBlockWorld*> BlockWorldMap_t;
14 
16  virtual ~CBlockWorldManager();
17  public:
18  static CBlockWorldManager* GetSingleton();
19 
21  CBlockWorld* GetBlockWorld(const std::string& sInstanceName);
22 
23  void RemoveBlockWorld(const std::string& sInstanceName);
24 
26  CBlockWorld* CreateBlockWorld(const std::string& sInstanceName);
27 
29  CBlockWorld* CreateGetBlockWorld(const std::string& sInstanceName);
30 
31 
33  void Cleanup();
34  private:
35  BlockWorldMap_t m_mapBlockWorlds;
36  };
37 }
CBlockWorld * CreateBlockWorld(const std::string &sInstanceName)
create a new block world by name.
Definition: BlockWorldManager.cpp:50
different physics engine has different winding order.
Definition: EventBinding.h:32
factory class for multiple instances of CBlockWorld
Definition: BlockWorldManager.h:10
Definition: PERef.h:11
CBlockWorld * GetBlockWorld(const std::string &sInstanceName)
get block world by name.
Definition: BlockWorldManager.cpp:30
base class for an instance of block world
Definition: BlockWorld.h:35
CBlockWorld * CreateGetBlockWorld(const std::string &sInstanceName)
create get a block world
Definition: BlockWorldManager.cpp:57
void Cleanup()
called once when application exits
Definition: BlockWorldManager.cpp:70