| 1 | = !ClassList = |
| 2 | !ClassList is an extension to [wiki:archive/BaseObject BaseObject], with which one is able to retrieve information about Elements in existence in the game. |
| 3 | |
| 4 | source:/trunk/src/lib/class_list.h |
| 5 | |
| 6 | == Usage == |
| 7 | Functions to __get Lists__ of Objects of type ClassID, or by Name |
| 8 | {{{ |
| 9 | #!cpp |
| 10 | static tList<BaseObject>* getList(long classID = CL_NULL); |
| 11 | static tList<BaseObject>* getList(const char* className); |
| 12 | }}} |
| 13 | |
| 14 | function to __check if__ an Element __exists__ in a given List |
| 15 | {{{ |
| 16 | #!cpp |
| 17 | static bool exists(const BaseObject* object, long classID = CL_NULL); |
| 18 | }}} |
| 19 | |
| 20 | function to retrieve a __List of all known Classes__ |
| 21 | {{{ |
| 22 | #!cpp |
| 23 | static const tList<const char>* getClassList(); |
| 24 | }}} |
| 25 | |
| 26 | == Debug Information == |
| 27 | to print out __nice information__ on what classes and how many objects are allocated visit: |
| 28 | {{{ |
| 29 | static void debug(unsigned int debugLevel = 0, long classID = CL_NULL); |
| 30 | }}} |
| 31 | |
| 32 | == Dependencies == |
| 33 | * [wiki:archive/BaseObject BaseObject] |
| 34 | * [source:/trunk/src/defs/class_id.h#HEAD ClassID] |