Sion Tower (demo técnica) 0.1

/home/david/programacion/iberogre-siontower/siontower/trunk/src/include/levelManager.h

00001 /*
00002  * This file is part of SionTower.
00003  *
00004  * 
00005  * David Saltares Márquez (C) 2011
00006  * <david.saltares@gmail.com>
00007  *
00008  * 
00009  * SionTower examples are free software: you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License ad
00011  * published by the Free Software Foundation, either version 3 of the
00012  * License, or (at your option) ant later version.
00013  *
00014  * SionTower examples are distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with SionTower examples.  If not, see <http://www.gnu.org/licenses/>.
00021  */
00022 
00023 
00024 #ifndef SIONTOWER_TRUNK_SRC_INCLUDE_LEVELMANAGER_H_
00025 #define SIONTOWER_TRUNK_SRC_INCLUDE_LEVELMANAGER_H_
00026 
00027 #include <vector>
00028 
00029 #include <boost/unordered_map.hpp>
00030 #include <OGRE/Ogre.h>
00031 
00032 
00033 class Level;
00034 class Body;
00035 class Shape;
00036 
00038 
00050 class LevelManager: public Ogre::Singleton<LevelManager> {
00051     public:
00057         LevelManager();
00058 
00062         ~LevelManager();
00063 
00067         static LevelManager& getSingleton();
00068 
00073         static LevelManager* getSingletonPtr();
00074 
00078         const Ogre::String& getBasePath() const;
00079 
00083         std::vector<Level*> getLevels();
00084 
00089         Level* getLevel(const Ogre::String& id);
00090 
00095         int getNumLevels() const;
00096 
00097         Body* createBodyFromCatalog(const Ogre::String& name);
00098     private:
00099         std::vector<Level*> _levels;
00100         int _numLevels;
00101         Ogre::String _basePath;
00102 
00103         typedef boost::unordered_map<Ogre::String, Body* > BodyCatalog;
00104         BodyCatalog _bodyCatalog;
00105         std::vector<Shape*> _shapes;
00106 
00107         void lookForLevels();
00108         void initialiseBodyCatalog();
00109 };
00110 
00111 #endif  // SIONTOWER_TRUNK_SRC_INCLUDE_LEVELMANAGER_H_
 Todo Clases Archivos Funciones 'typedefs' Enumeraciones