Changeset 5181 in orxonox.OLD for trunk/src/lib/shell/shell_completion.cc
- Timestamp:
- Sep 14, 2005, 12:07:06 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_completion.cc
r5178 r5181 18 18 #include "shell_completion.h" 19 19 20 #include "shell_input.h" 21 20 22 #include "base_object.h" 21 23 #include "class_list.h" … … 33 35 ShellCompletion::ShellCompletion () 34 36 { 35 // this->setClassID(CL_PROTO_ID, "ProtoClass"); 36 37 /* If you make a new class, what is most probably the case when you write this file 38 don't forget to: 39 1. Add the new file new_class.cc to the ./src/Makefile.am 40 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS 41 42 Advanced Topics: 43 - if you want to let your object be managed via the ObjectManager make sure to read 44 the object_manager.h header comments. You will use this most certanly only if you 45 make many objects of your class, like a weapon bullet. 46 */ 37 this->completionList = NULL; 47 38 } 48 39 … … 54 45 { 55 46 // delete what has to be deleted here 47 if (this->completionList) 48 { 49 delete this->completionList; 50 } 56 51 } 57 52 … … 64 59 * @todo implement it!! 65 60 */ 66 bool ShellCompletion::autoComplete( const char* inputLine)61 bool ShellCompletion::autoComplete(ShellInput* input) 67 62 { 68 63 //PRINTF(3)("AutoCompletion not implemented yet\n"); 69 64 70 char* completionLine = new char[strlen(input Line)+1];71 strcpy(completionLine, input Line);65 char* completionLine = new char[strlen(input->getText())+1]; 66 strcpy(completionLine, input->getText()); 72 67 73 68 char* commandBegin = strrchr(completionLine, ' ');
Note: See TracChangeset
for help on using the changeset viewer.