Changeset 7276 for code/branches/consolecommands3
- Timestamp:
- Aug 31, 2010, 1:00:20 AM (14 years ago)
- Location:
- code/branches/consolecommands3
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/data/levels/fps_test.oxw
r7163 r7276 20 20 skybox = "Orxonox/skypanoramagen1" 21 21 gravity = "0,-1000,0" 22 negativeWorldRange = " (-100000, -100000, -100000)"23 positiveWorldRange = " ( 100000, 100000, 100000)"22 negativeWorldRange = "-100000, -100000, -100000" 23 positiveWorldRange = " 100000, 100000, 100000" 24 24 hasPhysics = true 25 25 > -
code/branches/consolecommands3/data/levels/old/physicstest2.oxw
r6417 r7276 13 13 ambientlight = "0.5, 0.5, 0.5" 14 14 skybox = "Orxonox/Starbox" 15 negativeWorldRange = " (-100000, -100000, -100000)"16 positiveWorldRange = " ( 100000, 100000, 100000)"15 negativeWorldRange = "-100000, -100000, -100000" 16 positiveWorldRange = " 100000, 100000, 100000" 17 17 hasPhysics = true 18 18 > -
code/branches/consolecommands3/data/levels/presentation_FS10.oxw
r7163 r7276 20 20 skybox = "Orxonox/skypanoramagen1" 21 21 gravity = "0,-1000,0" 22 negativeWorldRange = " (-100000, -100000, -100000)"23 positiveWorldRange = " ( 100000, 100000, 100000)"22 negativeWorldRange = "-100000, -100000, -100000" 23 positiveWorldRange = " 100000, 100000, 100000" 24 24 hasPhysics = true 25 25 > -
code/branches/consolecommands3/data/levels/presentation_FS10_ed.oxw
r7163 r7276 20 20 skybox = "Orxonox/skypanoramagen1" 21 21 gravity = "0,-1000,0" 22 negativeWorldRange = " (-100000, -100000, -100000)"23 positiveWorldRange = " ( 100000, 100000, 100000)"22 negativeWorldRange = "-100000, -100000, -100000" 23 positiveWorldRange = " 100000, 100000, 100000" 24 24 hasPhysics = true 25 25 > -
code/branches/consolecommands3/src/libraries/core/CommandLineParser.h
r6021 r7276 64 64 Note the difference between "-" and "--"! 65 65 Also, there is no restriction to the number of strings you add after --name. 66 So "--startVector (2, 4, 5)" is perfectly legal.66 So "--startVector {2, 4, 5}" is perfectly legal. 67 67 68 68 Retrieving an argument is possible with the getCommandLineArgument function of the -
code/branches/consolecommands3/src/libraries/core/ConfigValueContainer.cc
r6536 r7276 302 302 bool ConfigValueContainer::callFunctionWithIndex(bool (ConfigValueContainer::* function) (unsigned int, const MultiType&), const std::string& input) 303 303 { 304 SubString token(input, " ", SubString::WhiteSpaces, true, '\\', false, '"', false, ' (', ')', false, '\0');304 SubString token(input, " ", SubString::WhiteSpaces, true, '\\', false, '"', false, '\0', '\0', false, '\0'); 305 305 int index = -1; 306 306 bool success = false; -
code/branches/consolecommands3/src/libraries/core/GraphicsManager.cc
r7236 r7276 293 293 boost::filesystem::path folder(ogrePluginsDirectory_); 294 294 // Do some SubString magic to get the comma separated list of plugins 295 SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, ' (', ')', false, '\0');295 SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, '{', '}', false, '\0'); 296 296 // Use backslash paths on Windows! file_string() already does that though. 297 297 for (unsigned int i = 0; i < plugins.size(); ++i) -
code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.cc
r7236 r7276 147 147 ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI(hiddencommand)(const std::string& fragment) 148 148 { 149 SubString tokens(fragment, " ", SubString::WhiteSpaces, false, '\\', true, '"', true, ' (', ')', true, '\0');149 SubString tokens(fragment, " ", SubString::WhiteSpaces, false, '\\', true, '"', true, '{', '}', true, '\0'); 150 150 151 151 if (tokens.size() == 0) -
code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.cc
r7238 r7276 53 53 this->numberOfEvaluatedParams_ = 0; 54 54 55 this->tokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', true, '"', true, ' (', ')', true, '\0');55 this->tokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', true, '"', true, '{', '}', true, '\0'); 56 56 } 57 57 -
code/branches/consolecommands3/src/libraries/core/command/Executor.cc
r7274 r7276 59 59 MultiType Executor::parse(const std::string& arguments, int* error, const std::string& delimiter, bool bPrintError) const 60 60 { 61 return this->parse(SubString(arguments, delimiter, SubString::WhiteSpaces, false, '\\', true, '"', true, ' (', ')', true, '\0'), error, delimiter, bPrintError);61 return this->parse(SubString(arguments, delimiter, SubString::WhiteSpaces, false, '\\', true, '"', true, '{', '}', true, '\0'), error, delimiter, bPrintError); 62 62 } 63 63 -
code/branches/consolecommands3/src/libraries/core/input/Button.cc
r7230 r7276 117 117 // separate the commands 118 118 SubString commandStrings(bindingString_, "|", SubString::WhiteSpaces, false, 119 '\\', false, '"', false, ' (', ')', false, '\0');119 '\\', false, '"', false, '{', '}', false, '\0'); 120 120 121 121 for (unsigned int iCommand = 0; iCommand < commandStrings.size(); iCommand++) … … 124 124 { 125 125 SubString tokens(commandStrings[iCommand], " ", SubString::WhiteSpaces, false, 126 '\\', false, '"', false, ' (', ')', false, '\0');126 '\\', false, '"', false, '{', '}', false, '\0'); 127 127 128 128 KeybindMode::Value mode = KeybindMode::None; -
code/branches/consolecommands3/src/libraries/util/Math.cc
r6417 r7276 234 234 bool ConverterFallback<std::string, orxonox::Vector2>::convert(orxonox::Vector2* output, const std::string& input) 235 235 { 236 size_t opening_parenthesis, closing_parenthesis = input.find(' )');237 if ((opening_parenthesis = input.find(' (')) == std::string::npos)236 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 237 if ((opening_parenthesis = input.find('{')) == std::string::npos) 238 238 opening_parenthesis = 0; 239 239 else … … 257 257 bool ConverterFallback<std::string, orxonox::Vector3>::convert(orxonox::Vector3* output, const std::string& input) 258 258 { 259 size_t opening_parenthesis, closing_parenthesis = input.find(' )');260 if ((opening_parenthesis = input.find(' (')) == std::string::npos)259 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 260 if ((opening_parenthesis = input.find('{')) == std::string::npos) 261 261 opening_parenthesis = 0; 262 262 else … … 282 282 bool ConverterFallback<std::string, orxonox::Vector4>::convert(orxonox::Vector4* output, const std::string& input) 283 283 { 284 size_t opening_parenthesis, closing_parenthesis = input.find(' )');285 if ((opening_parenthesis = input.find(' (')) == std::string::npos)284 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 285 if ((opening_parenthesis = input.find('{')) == std::string::npos) 286 286 opening_parenthesis = 0; 287 287 else … … 309 309 bool ConverterFallback<std::string, orxonox::Quaternion>::convert(orxonox::Quaternion* output, const std::string& input) 310 310 { 311 size_t opening_parenthesis, closing_parenthesis = input.find(')'); 312 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 311 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 312 if ((opening_parenthesis = input.find('{')) == std::string::npos) 313 opening_parenthesis = 0; 314 else 315 opening_parenthesis++; 313 316 314 317 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', true, '"', true, '\0', '\0', true, '\0'); … … 332 335 bool ConverterFallback<std::string, orxonox::ColourValue>::convert(orxonox::ColourValue* output, const std::string& input) 333 336 { 334 size_t opening_parenthesis, closing_parenthesis = input.find(')'); 335 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 337 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 338 if ((opening_parenthesis = input.find('{')) == std::string::npos) 339 opening_parenthesis = 0; 340 else 341 opening_parenthesis++; 336 342 337 343 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', true, '"', true, '\0', '\0', true, '\0'); -
code/branches/consolecommands3/src/libraries/util/SubString.h
r5738 r7276 81 81 SL_SAFEESCAPE, //!< In safe mode with the internal escape character, that escapes even the savemode character. 82 82 SL_COMMENT, //!< In Comment mode. 83 SL_PARENTHESES, //!< Between parentheses (usually ' (' and ')')83 SL_PARENTHESES, //!< Between parentheses (usually '{' and '}') 84 84 SL_PARENTHESESESCAPE, //!< Between parentheses with the internal escape character, that escapes even the closing paranthesis character. 85 85 } SPLIT_LINE_STATE; … … 92 92 const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries=false, 93 93 char escapeChar ='\\', bool removeEscapeChar = true, char safemode_char = '"', bool removeSafemodeChar = true, 94 char openparenthesis_char = ' (', char closeparenthesis_char = ')', bool removeParenthesisChars = true, char comment_char = '\0');94 char openparenthesis_char = '{', char closeparenthesis_char = '}', bool removeParenthesisChars = true, char comment_char = '\0'); 95 95 SubString(unsigned int argc, const char** argv); 96 96 /** @brief create a Substring as a copy of another one. @param subString the SubString to copy. */ … … 116 116 const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries = false, 117 117 char escapeChar ='\\', bool removeExcapeChar = true, char safemode_char = '"', bool removeSafemodeChar = true, 118 char openparenthesis_char = ' (', char closeparenthesis_char = ')', bool removeParenthesisChars = true, char comment_char = '\0');118 char openparenthesis_char = '{', char closeparenthesis_char = '}', bool removeParenthesisChars = true, char comment_char = '\0'); 119 119 std::string join(const std::string& delimiter = " ") const; 120 120 //////////////////////////////////////// … … 155 155 char safemode_char = '"', 156 156 bool removeSafemodeChar = true, 157 char openparenthesis_char = ' (',158 char closeparenthesis_char = ' )',157 char openparenthesis_char = '{', 158 char closeparenthesis_char = '}', 159 159 bool removeParenthesisChars = true, 160 160 char comment_char = '\0',
Note: See TracChangeset
for help on using the changeset viewer.