Changeset 5102 in orxonox.OLD for trunk/src/lib/lang
- Timestamp:
- Aug 22, 2005, 5:26:29 PM (19 years ago)
- Location:
- trunk/src/lib/lang
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/lang/base_object.cc
r4942 r5102 52 52 // delete []this->className; 53 53 if (this->objectName) 54 delete []this->objectName;}54 delete[] this->objectName;} 55 55 56 56 /** … … 84 84 { 85 85 if (this->objectName) 86 delete []this->objectName;86 delete[] this->objectName; 87 87 if (objectName) 88 88 { -
trunk/src/lib/lang/base_object.h
r5039 r5102 27 27 28 28 void setName (const char* newName); 29 /** \briefreturns the Name of this Object */29 /** returns the Name of this Object */ 30 30 inline const char* getName ()const { return this->objectName; }; 31 31 -
trunk/src/lib/lang/class_list.cc
r4874 r5102 109 109 } 110 110 111 /** 112 * searches for classID and returns the list of Entities 113 * @param classID the ID of the class to get the list from 114 * @return the List accessed by classID, or NULL if not found 115 */ 111 116 tList<BaseObject>* ClassList::getList(long classID) 112 117 { … … 119 124 { 120 125 if (unlikely(tmpCL->classID == classID)) 126 return tmpCL->objectList; 127 tmpCL = tmpCL->next; 128 } 129 } 130 return NULL; 131 } 132 133 /** 134 * searches for className and returns the list of Entities 135 * @param className the name of the class to get the list from 136 * @return the List accessed by classID, or NULL if not found 137 */tList<BaseObject>* ClassList::getList(const char* className) 138 { 139 if(unlikely(ClassList::first == NULL)) 140 return NULL; 141 else 142 { 143 ClassList* tmpCL = ClassList::first; 144 while (likely(tmpCL != NULL)) 145 { 146 if (unlikely(!strcmp(tmpCL->className, className))) 121 147 return tmpCL->objectList; 122 148 tmpCL = tmpCL->next; … … 205 231 } 206 232 207 208 233 /** 209 234 * prints out a string of all the types this Object matches -
trunk/src/lib/lang/class_list.h
r5039 r5102 39 39 40 40 static tList<BaseObject>* getList(long classID = CL_NULL); 41 static tList<BaseObject>* getList(const char* className); 41 42 static BaseObject* getObject(const char* name, long classID = CL_NULL); 42 43 static bool exists(const BaseObject* object, long classID = CL_NULL);
Note: See TracChangeset
for help on using the changeset viewer.