Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 5, 2008, 5:54:24 PM (16 years ago)
Author:
landauf
Message:
  • added some symbols to the CommandExecutor: a) expression | expression: the pipe leads the output from the right expression into the left one b) expression > file: writes the output of the expression into a file c) expression < file: reads a file and uses it's content as input for the expression
  • added new console commands: a) echo text: returns the input b) read file: reads a file and returns the content c) write file text: writes text into a file d) append file text: appends text to a file
  • added stripEnclosingQuotes function to String.h, that removes enclosing quotes (if there are some). whitespaces outside the quotes are stripped, whitespaces inside the quotes stay. removes the quotes only if there is nothing else than whitespaces outside of them. what it changes: "expression" → expression what it let unchanged:
    • ex"press"ion
    • a"expression"b
    • a"expression"
    • "expression"b
    • express"ion
  • extended SubString: added some bools to determine the behaviour when dividing a string like the following up into pieces: mytext "this is a quoted area" blub (0, 1, 2)

this usually results in:
mytext / this is a quoted area / blub / 0, 1, 2

but now you can change it to:
mytext / "this is a quoted area" / blub / (0, 1, 2)

this is important if the string wents through several substring splitups and the quotes and brackets should stay.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/core/CommandExecutor.h

    r993 r994  
    6262
    6363    void exec(const std::string& filename);
     64    std::string echo(const std::string& text);
     65
     66    void write(const std::string& filename, const std::string& text);
     67    void append(const std::string& filename, const std::string& text);
     68    std::string read(const std::string& filename);
    6469
    6570    enum KeybindMode {}; // temporary
     
    8792
    8893            void evaluateParams();
     94
     95            MultiTypeMath getReturnvalue() const;
    8996
    9097        private:
Note: See TracChangeset for help on using the changeset viewer.