Changeset 5140 in orxonox.OLD for trunk/src/util
- Timestamp:
- Aug 26, 2005, 2:15:06 PM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/shell_command.cc
r5138 r5140 34 34 35 35 this->classID = classID; 36 if (classID & CL_MASK_SINGLETON == CL_MASK_SINGLETON) 37 this->isSingleton = true; 38 else 39 this->isSingleton = false; 40 36 41 this->commandName = new char[strlen(commandName)+1]; 37 42 strcpy(this->commandName, commandName); … … 75 80 if (classID == elem->classID && !strcmp(commandName, elem->commandName)) 76 81 { 77 //PRINTF(2)("Command already registered\n");82 PRINTF(2)("Command already registered\n"); 78 83 delete iterator; 79 84 return true; … … 82 87 } 83 88 delete iterator; 84 return true;89 return false; 85 90 } 91 86 92 87 93 bool ShellCommandBase::execute(const char* executionString) … … 98 104 while(elem != NULL) 99 105 { 106 printf("%s\n", elem->commandName); 100 107 if (!strncmp(executionString, elem->commandName, strlen(elem->commandName))) 101 108 { -
trunk/src/util/shell_command.h
r5139 r5140 65 65 unsigned int paramCount; //!< the count of parameters 66 66 ParameterType* parameters; //!< Parameters 67 bool isSingleton; //!< if the Class is Singleton @todo autocheck 67 68 68 69 private: … … 123 124 virtual void executeCommand (const char* parameters) 124 125 { 126 printf("not implemented yet\n"); 125 127 /* if (this->paramCount == 0) 126 128 (objectPointer->*functionPointer_NULL)();*/
Note: See TracChangeset
for help on using the changeset viewer.