DeveloperConsole::Consume for strings
This commit is contained in:
@@ -39,21 +39,25 @@ public:
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Consume(const std::string& command)
|
||||||
|
{
|
||||||
|
if (command.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
boost::char_separator<char> argumentSeparator(" ");
|
||||||
|
tokenizer tokens(command, argumentSeparator);
|
||||||
|
|
||||||
|
for (tokenizer::const_iterator it = tokens.begin(); it != tokens.end(); it++) {
|
||||||
|
consumeToken(it, tokens.end());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void Consume(std::istream& stream)
|
static void Consume(std::istream& stream)
|
||||||
{
|
{
|
||||||
std::string input;
|
std::string input;
|
||||||
std::getline(stream, input);
|
std::getline(stream, input);
|
||||||
|
Consume(input);
|
||||||
if (input.empty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
boost::char_separator<char> argumentSeparator(" ");
|
|
||||||
tokenizer tokens(input, argumentSeparator);
|
|
||||||
|
|
||||||
for (tokenizer::const_iterator it = tokens.begin(); it != tokens.end(); it++) {
|
|
||||||
consumeToken(it, tokens.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*if (stream.peek() == '\n') {
|
/*if (stream.peek() == '\n') {
|
||||||
printValue(key);
|
printValue(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user