Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7319 in orxonox.OLD for trunk/src/lib/shell


Ignore:
Timestamp:
Apr 17, 2006, 1:00:09 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: MUCH more comprehensive SubString

Location:
trunk/src/lib/shell
Files:
2 edited

Legend:

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

    r7225 r7319  
    165165  SubString inputSplits(executionString, " \t\n,");
    166166
    167   if (inputSplits.getCount() == 0)
     167  if (inputSplits.size() == 0)
    168168    return false;
    169   if (inputSplits.getCount() >= 1)
     169  if (inputSplits.size() >= 1)
    170170  {
    171171    // CHECK FOR ALIAS
     
    181181          if (objectList != NULL)
    182182          {
    183             if (inputSplits.getCount() > 1)
     183            if (inputSplits.size() > 1)
    184184            {
    185185
     
    210210    }
    211211
    212     if (commandClass != NULL && inputSplits.getCount() >= 2)
     212    if (commandClass != NULL && inputSplits.size() >= 2)
    213213    {
    214214      if (objectList != NULL)
     
    231231      }
    232232      // match a function.
    233       if (commandClass != NULL && (fktPos == 1 || (fktPos == 2 && inputSplits.getCount() >= 3)))
     233      if (commandClass != NULL && (fktPos == 1 || (fktPos == 2 && inputSplits.size() >= 3)))
    234234      {
    235235        list<ShellCommand*>::iterator cmdIT;
     
    240240            if (objectPointer == NULL && (*cmdIT)->executor->getType() & Executor_Objective)
    241241              return false;
    242             if (inputSplits.getCount() > fktPos+1)
     242            if (inputSplits.size() > fktPos+1)
    243243              (*cmdIT)->executor->execute(objectPointer, executionString.substr(inputSplits.getOffset(fktPos +1))); /// TODO CHECK IF OK
    244244            else
  • trunk/src/lib/shell/shell_completion.cc

    r7225 r7319  
    8888    completeString = "";
    8989  else
    90     completeString = inputSplits.getString(inputSplits.getCount()-1).c_str();
     90    completeString = inputSplits.getString(inputSplits.size()-1).c_str();
    9191
    9292  // CLASS COMPLETION
    93   if (inputSplits.getCount() == 0)
     93  if (inputSplits.size() == 0)
    9494  {
    9595    completeType |= SHELLC_CLASS;
    9696    completeType |= SHELLC_ALIAS;
    9797  }
    98   else if (inputSplits.getCount() == 1 && emptyComplete == false)
     98  else if (inputSplits.size() == 1 && emptyComplete == false)
    9999  {
    100100    completeType |= SHELLC_CLASS;
     
    103103
    104104  // OBJECT/FUNCTION COMPLETIONS
    105   else if ((inputSplits.getCount() == 1 && emptyComplete == true) ||
    106             (inputSplits.getCount() == 2 && emptyComplete == false))
     105  else if ((inputSplits.size() == 1 && emptyComplete == true) ||
     106            (inputSplits.size() == 2 && emptyComplete == false))
    107107  {
    108108    classID = ClassList::StringToID(inputSplits.getString(0).c_str()); //FIXME
     
    113113      completeType |= SHELLC_FUNCTION;
    114114  }
    115   else if ((inputSplits.getCount() == 2 && emptyComplete == true) ||
    116             (inputSplits.getCount() == 3 && emptyComplete == false))
     115  else if ((inputSplits.size() == 2 && emptyComplete == true) ||
     116            (inputSplits.size() == 3 && emptyComplete == false))
    117117  {
    118118    classID = ClassList::StringToID(inputSplits.getString(0) .c_str()); // FIXME
Note: See TracChangeset for help on using the changeset viewer.