Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 27, 2006, 8:42:16 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: cloning the Completors

File:
1 edited

Legend:

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

    r7388 r7407  
    2727namespace OrxShell
    2828{
    29   void CompletorStringArray::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin)
     29  CompletorDefault::CompletorDefault(const MultiType* value)
     30  :_value(value)
     31  { }
     32
     33  void CompletorDefault::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const
     34  {
     35    PRINT(0)("%s", MultiType::MultiTypeToString(this->_value->getType()).c_str());
     36  }
     37
     38  CompletorPlugin* CompletorDefault::clone() const
     39  {
     40    return new CompletorDefault(this->_value);
     41  }
     42
     43
     44
     45
     46
     47  void CompletorStringArray::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const
    3048  {
    3149    unsigned int inputLen = completionBegin.size();
     
    3553  }
    3654
     55  CompletorPlugin* CompletorStringArray::clone() const
     56  {
     57    return new CompletorStringArray(this->_stringArray, this->_size);
     58  }
    3759
    3860
     
    4264  }
    4365
    44   void CompletorList::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin)
     66  void CompletorList::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const
    4567  {
    4668    unsigned int inputLen = completionBegin.size();
     
    5173  }
    5274
     75  CompletorPlugin* CompletorList::clone() const
     76  {
     77    return new CompletorList(this->_list);
     78  }
    5379
    5480
     
    6086
    6187
    62   void CompletorFileSystem::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin)
     88  void CompletorFileSystem::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const
    6389  {
    6490    if (completionBegin.empty()) // if we do not yet have the beginning of the line, start with the chosen startDir.
     
    6894    }
    6995  }
     96  CompletorPlugin* CompletorFileSystem::clone() const
     97  {
     98    return new CompletorFileSystem(this->_fileExtension, this->_startDir, this->_subDir);
     99  }
     100
    70101
    71102}
Note: See TracChangeset for help on using the changeset viewer.