Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7216 in orxonox.OLD for branches/std/src/lib/shell/shell_input.h


Ignore:
Timestamp:
Mar 12, 2006, 8:54:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/std:: compile and run again, with many more std::strings….

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/shell/shell_input.h

    r5786 r7216  
    3131
    3232  /** @returns the inputLine */
    33   const char* getInput() const { return this->inputLine; };
     33  const std::string& getInput() const { return this->inputLine; };
    3434
    3535  // InputLine
    3636  void flush();
    37   void setInputText(const char* text);
     37  void setInputText(const std::string& text);
    3838  void addCharacter(char character);
    39   void addCharacters(const char* characters);
     39  void addCharacters(const std::string& characters);
    4040  void removeCharacters(unsigned int characterCount = 1);
    4141  void setRepeatDelay(float repeatDelay, float repeatRate);
     
    4747  void historyMoveDown();
    4848
    49   void help(const char* className = "", const char* function = "");
     49  void help(const std::string& className = "", const std::string& function = "");
    5050
    5151  virtual void tick(float dt);
     
    5454 private:
    5555    // HANDLING TEXT INPUT
    56    ShellCompletion*            completion;             //!< The Completion Interface.
     56   ShellCompletion*                  completion;       //!< The Completion Interface.
    5757
    58    char*                       inputLine;              //!< the Char-Array of the Buffer
    59    float                       repeatRate;             //!< The Repeat-Delay.
    60    float                       repeatDelay;            //!< The delay of the first Character of a given Character.
    61    float                       delayed;                //!< how much of the delay is remaining.
    62    Uint16                      pressedKey;             //!< the pressed key that will be repeated.
     58   std::string                       inputLine;        //!< the Char-Array of the Buffer
     59   float                             repeatRate;       //!< The Repeat-Delay.
     60   float                             repeatDelay;      //!< The delay of the first Character of a given Character.
     61   float                             delayed;          //!< how much of the delay is remaining.
     62   Uint16                            pressedKey;       //!< the pressed key that will be repeated.
    6363
    64    std::list<char*>            history;                //!< The history of given commands.
    65    std::list<char*>::iterator  historyIT;
    66    unsigned int                historyLength;          //!< The maximum length of the InputHistory.
    67    bool                        historyScrolling;      //!< true if we are scrolling through the history.
     64   std::list<std::string>            history;          //!< The history of given commands.
     65   std::list<std::string>::iterator  historyIT;        //!< The locator that tells us, where we are in the history.
     66   unsigned int                      historyLength;    //!< The maximum length of the InputHistory.
     67   bool                              historyScrolling; //!< true if we are scrolling through the history.
    6868};
    6969
Note: See TracChangeset for help on using the changeset viewer.