Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2006, 10:45:12 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: new Completor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_completion_plugin.cc

    r7377 r7387  
    3737  }
    3838
     39
     40
     41  CompletorList::CompletorList(const std::list<std::string>* list)
     42  {
     43    this->_list = list;
     44  }
     45
     46  void CompletorList::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin)
     47  {
     48    unsigned int inputLen = completionBegin.size();
     49    std::list<std::string>::const_iterator it;
     50    for (it = this->_list->begin(); it != this->_list->end(); ++it)
     51      if (!nocaseCmp((*it), completionBegin, inputLen))
     52        completionList.push_back(*it);
     53  }
     54
     55
     56
    3957  CompletorFileSystem::CompletorFileSystem(const std::string& fileExtension,
    4058      StartDirectory startDir,
     
    4260  : _fileExtension(fileExtension), _startDir(startDir), _subDir(subDir)
    4361  {  }
     62
    4463
    4564  void CompletorFileSystem::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin)
Note: See TracChangeset for help on using the changeset viewer.