Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7386 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Apr 26, 2006, 10:24:31 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: completions

Location:
trunk/src/lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_command.h

    r7374 r7386  
    7979  protected:
    8080    ShellCommand(const std::string& commandName, const std::string& className, const Executor& executor);
    81     ~ShellCommand();
     81    virtual ~ShellCommand();
    8282
    8383    static bool isRegistered(const std::string& commandName, const std::string& className);
  • trunk/src/lib/shell/shell_command_class.cc

    r7374 r7386  
    6666   * @returns true on success, false otherwise
    6767   */
    68   bool ShellCommandClass::getCommandListOfClass(const std::string& className, std::list<std::string>* stringList)
    69   {
    70     if (stringList == NULL)
    71       return false;
    72 
     68  bool ShellCommandClass::getCommandListOfClass(const std::string& className, std::list<std::string>& stringList)
     69  {
    7370    std::list<ShellCommandClass*>::iterator elem;
    7471    for(elem = ShellCommandClass::commandClassList->begin(); elem != ShellCommandClass::commandClassList->end(); elem++)
     
    7875        std::list<ShellCommand*>::iterator command;
    7976        for(command = (*elem)->commandList.begin(); command != (*elem)->commandList.end(); command++)
    80           stringList->push_back((*command)->getName());
     77          stringList.push_back((*command)->getName());
    8178      }
    8279    }
     
    8986   * @returns true on success, false otherwise
    9087   */
    91   bool ShellCommandClass::getCommandListOfAlias(std::list<std::string>* stringList)
    92   {
    93     if (stringList == NULL || ShellCommandClass::aliasList == NULL)
     88  bool ShellCommandClass::getCommandListOfAlias(std::list<std::string>& stringList)
     89  {
     90    if (ShellCommandClass::aliasList == NULL)
    9491      return false;
    9592
    9693    std::list<ShellCommandAlias*>::iterator alias;
    9794    for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++)
    98       stringList->push_back((*alias)->getName());
     95      stringList.push_back((*alias)->getName());
    9996    return true;
    10097  }
  • trunk/src/lib/shell/shell_command_class.h

    r7374 r7386  
    2525    /** @returns the CommandClassList */
    2626    static const std::list<ShellCommandClass*>* getCommandClassList() { return ShellCommandClass::commandClassList; };
    27     static bool getCommandListOfClass(const std::string& className, std::list<std::string>* stringList);
    28     static bool getCommandListOfAlias(std::list<std::string>* aliasList);
     27
     28    static bool getCommandListOfClass(const std::string& className, std::list<std::string>& stringList);
     29    static bool getCommandListOfAlias(std::list<std::string>& aliasList);
    2930
    3031    static ShellCommandClass* getCommandClass(const std::string& className);
  • trunk/src/lib/shell/shell_completion.cc

    r7374 r7386  
    170170  {
    171171    std::list<std::string> fktList;
    172     ShellCommandClass::getCommandListOfClass(className, &fktList);
     172    ShellCommandClass::getCommandListOfClass(className, fktList);
    173173    //printf("%s\n", boList->firstElement()->getName());
    174174    if (!this->addToCompleteList(fktList, functionBegin, FunctionCompletion))
     
    185185  {
    186186    std::list<std::string> aliasList;
    187     ShellCommandClass::getCommandListOfAlias(&aliasList);
     187    ShellCommandClass::getCommandListOfAlias(aliasList);
    188188    //printf("%s\n", boList->firstElement()->getName());
    189189    if (!this->addToCompleteList(aliasList, aliasBegin, AliasCompletion))
  • trunk/src/lib/shell/shell_completion_plugin.h

    r7377 r7386  
    5959      std::string             _subDir;
    6060      StartDirectory          _startDir;
    61 
    6261  };
    6362
  • trunk/src/lib/sound/sound_source.cc

    r7326 r7386  
    139139  if (!this->retrieveSource())
    140140  {
    141     PRINTF(2)("No more Free sources (You might consider raising the Source-Count).\n");
     141    PRINTF(3)("No more Free sources (You might consider raising the Source-Count).\n");
    142142    return;
    143143  }
Note: See TracChangeset for help on using the changeset viewer.