src/CityManager.h

Go to the documentation of this file.
00001 /* Crown and Cutlass
00002  * City Manager Class
00003  *
00004  * This class is a vector of cities. It will handle all the
00005  * appropriate actions to take on the cities. (Displaying,
00006  * checking collisions, etc)
00007  */
00008 
00009 #ifndef _CITYMANAGER_H_
00010 
00011 #define _CITYMANAGER_H_
00012 
00013 #include <vector>
00014 #include <map>
00015 #include <string>
00016 
00017 class Ship;
00018 class City;
00019 class Terrain;
00020 class Model;
00021 class TiXmlElement;
00022 
00023 using namespace std;
00024 
00025 class CityManager {
00026 public:
00027   // Constructor
00028   CityManager(Terrain *land);
00029 
00030   // Destructor
00031   ~CityManager();
00032 
00033   // Methods
00034   City* CheckCollision(Ship *ship);
00035 
00036   void DisplayCities();
00037 
00038   bool CheckCity(const char *cityName);
00039 
00040   unsigned int NumberCities();
00041 
00042   City* GetCity(const char *cityName);
00043   City* GetCity(int CityIndex);
00044 
00045 private:
00046   vector<string> Keys;
00047   map<string, City*> CityList;
00048 
00049   void LoadCityConfig(const char *filename, Terrain *land);
00050 
00051   // ParseClusters reads the building clusters from the xml file and loads the models into the clusters vector
00052   void ParseClusters(TiXmlElement *clustersNode);
00053   vector<Model*> clusters;
00054 
00055   Model *tempModel;
00056 
00057 };
00058 
00059 #endif

Generated on Mon Jan 8 22:34:12 2007 for CrownandCutlass by  doxygen 1.4.7