Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9328 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 18, 2006, 7:28:06 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: substring nicer now

Location:
branches/proxy/src/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/shell/shell_command.cc

    r9112 r9328  
    299299      {
    300300        PRINT(0)("Command '%s' on '%s::%s'\n", sc->getName(), (*bo)->getClassName(), (*bo)->getName());
    301         (*sc->executor)((*bo), inputSplits.getSubSet(paramBegin));
     301        (*sc->executor)((*bo), inputSplits.subSet(paramBegin));
    302302      }
    303303      return true;
     
    375375//       if(this->completors[parameter] == NULL)
    376376//       delete this->completors[parameter];
    377 //       this->completors[parameter] = completorPlugin.clone(); 
     377//       this->completors[parameter] = completorPlugin.clone();
    378378    }
    379379    return this;
  • branches/proxy/src/lib/util/substring.cc

    r9316 r9328  
    249249 * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
    250250 */
    251 SubString SubString::getSubSet(unsigned int subSetBegin) const
     251SubString SubString::subSet(unsigned int subSetBegin) const
    252252{
    253253  return SubString(*this, subSetBegin);
     
    264264 * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
    265265 */
    266 SubString SubString::getSubSet(unsigned int subSetBegin, unsigned int subSetEnd) const
     266SubString SubString::subSet(unsigned int subSetBegin, unsigned int subSetEnd) const
    267267{
    268268  return SubString(*this, subSetBegin, subSetEnd);
     
    288288 * Supports delimiters, escape characters,
    289289 * ignores special  characters between safemode_char and between comment_char and linend '\n'.
    290  *
    291  *
    292290 */
    293291SubString::SPLIT_LINE_STATE
  • branches/proxy/src/lib/util/substring.h

    r9316 r9328  
    7575
    7676  // retrieve a SubSet from the String
    77   SubString getSubSet(unsigned int subSetBegin) const;
    78   SubString getSubSet(unsigned int subSetBegin, unsigned int subSetEnd) const;
     77  SubString subSet(unsigned int subSetBegin) const;
     78  SubString subSet(unsigned int subSetBegin, unsigned int subSetEnd) const;
    7979
    8080  // retrieve Information from within
     
    8484  inline unsigned int size() const { return this->strings.size(); };
    8585  /** @param i the i'th String @returns the i'th string from the subset of Strings */
    86   inline const std::string& operator[](unsigned int i) const { return /*(i < this->strings.size()) ? */this->strings[i] /*: emptyString*/; };
     86  inline const std::string& operator[](unsigned int i) const { return this->strings[i]; };
    8787  /** @param i the i'th String @returns the i'th string from the subset of Strings */
    8888  inline const std::string& getString(unsigned int i) const { return (*this)[i]; };
     
    113113private:
    114114  std::vector<std::string>  strings;                      //!< strings produced from a single string splitted in multiple strings
    115 
    116 //   static const std::string emptyString;
    117115};
    118116
Note: See TracChangeset for help on using the changeset viewer.