Changeset 6089 in orxonox.OLD for branches/objectmanager/src/util/object_manager.h
- Timestamp:
- Dec 13, 2005, 2:58:57 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/objectmanager/src/util/object_manager.h
r5795 r6089 9 9 #include "base_object.h" 10 10 #include <list> 11 #include <vector> 12 13 /// Enumerator for Managed Object Lists 14 typedef enum { 15 OM_NULL = 0, 16 OM_DEAD, 17 OM_ENVIRON_NOTICK, 18 OM_ENVIRON, 19 OM_COMMON, 20 21 OM_GROUP_00, 22 OM_GROUP_00_PROJ, 23 OM_GROUP_01, 24 OM_GROUP_01_PROJ, 25 OM_GROUP_02, 26 OM_GROUP_02_PROJ, 27 OM_GROUP_03, 28 OM_GROUP_03_PROJ, 29 OM_GROUP_04, 30 OM_GROUP_04_PROJ, 31 OM_GROUP_05, 32 OM_GROUP_05_PROJ, 33 OM_GROUP_06, 34 OM_GROUP_06_PROJ, 35 OM_GROUP_07, 36 OM_GROUP_07_PROJ, 37 OM_GROUP_08, 38 OM_GROUP_08_PROJ, 39 OM_GROUP_09, 40 OM_GROUP_09_PROJ, 41 OM_GROUP_10, 42 OM_GROUP_10_PROJ, 43 OM_GROUP_11, 44 OM_GROUP_11_PROJ, 45 OM_GROUP_12, 46 OM_GROUP_12_PROJ, 47 OM_GROUP_13, 48 OM_GROUP_13_PROJ, 49 OM_GROUP_14, 50 OM_GROUP_14_PROJ, 51 OM_GROUP_15, 52 OM_GROUP_15_PROJ, 53 54 OM_SIZE, 55 56 57 OM_INIT = -1, //!< DO NOT USE THIS. (WorldEntity Internal). 58 } OM_LIST; 59 60 #define OM_DEFAULT_LIST OM_NULL 61 11 62 12 63 // FORWARD DECLARATION 13 64 class PNode; 14 65 class WorldEntity; 15 16 class ObjectGroupList17 {18 19 20 21 };22 23 66 24 67 //! A default singleton class. … … 28 71 virtual ~ObjectManager(void); 29 72 /** @returns a Pointer to the only object of this Class */ 30 inline static ObjectManager* getInstance(void) { if (!ObjectManager::singletonRef) ObjectManager::singletonRef = new ObjectManager(); return ObjectManager::singletonRef; } ;73 inline static ObjectManager* getInstance(void) { if (!ObjectManager::singletonRef) ObjectManager::singletonRef = new ObjectManager(); return ObjectManager::singletonRef; } 31 74 75 76 void toList (WorldEntity* entity, OM_LIST omList = OM_DEFAULT_LIST); 77 void toList (WorldEntity* entity, const char* omList); 78 79 80 std::list<WorldEntity*>& getObjectList(OM_LIST listNumber) { return this->objectLists[listNumber]; } 81 const std::list<WorldEntity*>& getObjectList(OM_LIST listNumber) const { return this->objectLists[listNumber]; } 32 82 33 83 static std::list<WorldEntity*>* distanceFromObject(const PNode& center, float radius, ClassID classID); 34 84 35 ObjectGroupList* getGroupList( ); 85 86 static OM_LIST StringToOMList(const char* listName); 87 static const char* StringToOMList(OM_LIST omList); 36 88 37 89 private: … … 39 91 static ObjectManager* singletonRef; 40 92 41 std::list<ObjectGroupList> groupList;93 const std::list<BaseObject>* pNodeList; 42 94 43 const std::list<BaseObject>* pNodeList;44 95 96 std::list<WorldEntity*> objectLists[OM_SIZE]; 45 97 46 98 };
Note: See TracChangeset
for help on using the changeset viewer.