D:/simple_rts/include/UnitTypeManager.h

Go to the documentation of this file.
00001 #ifndef __UNIT_TYPE_MANAGER_H__
00002 #define __UNIT_TYPE_MANAGER_H__
00003 
00004 #include "UnitType.h"
00005 
00006 #include "OgreSingleton.h"
00007 using Ogre::Singleton;
00008 
00009 #include <map>
00010 using std::map;
00011 
00012 
00013 namespace ASR
00014 {
00015         // ----------------------------------------------------------------------------
00016         class UnitTypeManager : public Singleton<UnitTypeManager>
00017         {
00018         // Data Members
00019         // ----------------------------------------------------------------------------
00020         private:
00021                 typedef map<String, UnitType*> UnitTypeMap;
00022                 UnitTypeMap             mUnitTypes;
00023 
00024         // Construction
00025         // ----------------------------------------------------------------------------
00026         public:
00027                 UnitTypeManager ();
00028                 ~UnitTypeManager ();
00029 
00045                 static UnitTypeManager& getSingleton(void);
00061                 static UnitTypeManager* getSingletonPtr(void);
00062 
00063         // ----------------------------------------------------------------------------
00064         public:
00065                 UnitType* createUnitType ( const String& typeName );
00066                 UnitType* getUnitType ( const String& typeName );
00067                 void removeUnitType ( const String& typeName );
00068 
00069                 void removeAllUnitTypes ();
00070         };
00071 }
00072 
00073 #endif

Generated on Sun Jun 25 19:23:43 2006 for Valors End by  doxygen 1.4.7