Orxonox: orxonox::CommandEvaluation Class Reference

# orxonox::CommandEvaluation Class Reference

`#include <src/core/CommandEvaluation.h>`

List of all members.

## Public Member Functions

| CommandEvaluation ()
std::string | complete ()
void | evaluateParams ()
bool | execute () const
std::string | getAdditionalParameter () const
const std::string & | getCommand () const
ConsoleCommand * | getConsoleCommand () const
MultiType | getEvaluatedParameter (unsigned int index) const
const std::string & | getOriginalCommand () const
MultiType | getReturnvalue () const
bool | hasReturnvalue () const
std::string | hint () const
void | initialize (const std::string &command)
bool | isValid () const
void | setAdditionalParameter (const std::string &param)
void | setEvaluatedParameter (unsigned int index, MultiType param)

## Private Member Functions

unsigned int | getStartindex () const

## Static Private Member Functions

static std::string | dump (const ConsoleCommand *command)
static std::string | dump (const ArgumentCompletionList &list)
static std::string | dump (const std::list< std::pair< const std::string *, const std::string * > > &list)

## Private Attributes

std::string | additionalParameter_
std::string | argument_
bool | bCommandChanged_
bool | bEvaluatedParams_
bool | bNewCommand_
std::string | command_
SubString | commandTokens_
std::string | errorMessage_
ConsoleCommand * | function_
Identifier * | functionclass_
ArgumentCompletionList | listOfPossibleArguments_
std::list< std::pair< const std::string *, const std::string * > > | listOfPossibleFunctions_
std::list< std::pair< const std::string *, const std::string * > > | listOfPossibleIdentifiers_
std::string | originalCommand_
MultiType | param_ [5]
std::string | possibleArgument_
CommandState::Value | state_

## Friends

class | CommandExecutor

## Constructor & Destructor Documentation

orxonox::CommandEvaluation::CommandEvaluation | ( |  | ) |

References initialize(), state_, and orxonox::CommandState::Uninitialized.

## Member Function Documentation

std::string orxonox::CommandEvaluation::complete | ( |  | ) |

References argument_, bNewCommand_, command_, commandTokens_, orxonox::CommandState::Empty, orxonox::CommandState::Error, orxonox::CommandState::Finished, orxonox::CommandState::Function, function_, functionclass_, orxonox::Identifier::getName(), orxonox::Executor::getName(), orxonox::Executor::getParamCount(), getStartindex(), orxonox::SubString::join(), orxonox::CommandState::ParamPreparation, orxonox::CommandState::Params, possibleArgument_, orxonox::CommandState::ShortcutOrIdentifier, orxonox::SubString::size(), state_, orxonox::SubString::subSet(), and orxonox::CommandState::Uninitialized.

Referenced by orxonox::CommandExecutor::complete().

std::string orxonox::CommandEvaluation::dump | ( | const ConsoleCommand * | command | ) | `[static, private]`

References orxonox::Executor::defaultValueSet(), orxonox::Executor::getDefaultValue(), orxonox::Executor::getName(), orxonox::Executor::getParamCount(), orxonox::MultiType::getString(), and orxonox::Executor::getTypenameParam().

std::string orxonox::CommandEvaluation::dump | ( | const ArgumentCompletionList & | list | ) | `[static, private]`

std::string orxonox::CommandEvaluation::dump | ( | const std::list< std::pair< const std::string *, const std::string * > > & | list | ) | `[static, private]`

Referenced by hint().

void orxonox::CommandEvaluation::evaluateParams | ( |  | ) |

References bEvaluatedParams_, commandTokens_, orxonox::Executor::evaluate(), function_, getAdditionalParameter(), getStartindex(), isValid(), orxonox::MAX_FUNCTOR_ARGUMENTS, orxonox::MT_Type::Null, param_, and orxonox::SubString::size().

Referenced by orxonox::CommandExecutor::evaluate().

bool orxonox::CommandEvaluation::execute | ( |  | ) | const

References additionalParameter_, bCommandChanged_, bEvaluatedParams_, command_, commandTokens_, COUT, function_, getAdditionalParameter(), orxonox::Executor::getName(), getStartindex(), isValid(), orxonox::SubString::join(), orxonox::nocaseCmp(), originalCommand_, param_, orxonox::Executor::parse(), orxonox::removeSlashes(), orxonox::removeTrailingWhitespaces(), orxonox::SubString::size(), and orxonox::SubString::subSet().

Referenced by orxonox::SimpleCommand::execute(), orxonox::BufferedParamCommand::execute(), and orxonox::CommandExecutor::execute().

std::string orxonox::CommandEvaluation::getAdditionalParameter | ( |  | ) | const`[inline]`

Referenced by evaluateParams(), and execute().

const std::string& orxonox::CommandEvaluation::getCommand | ( |  | ) | const`[inline]`

ConsoleCommand* orxonox::CommandEvaluation::getConsoleCommand | ( |  | ) | const`[inline]`

Referenced by orxonox::Button::parse().

MultiType orxonox::CommandEvaluation::getEvaluatedParameter | ( | unsigned int | index | ) | const

References orxonox::MAX_FUNCTOR_ARGUMENTS, orxonox::MT_Type::Null, and param_.

const std::string& orxonox::CommandEvaluation::getOriginalCommand | ( |  | ) | const`[inline]`

MultiType orxonox::CommandEvaluation::getReturnvalue | ( |  | ) | const

References function_, and orxonox::Executor::getReturnvalue().

Referenced by orxonox::TclThreadManager::evalQuery(), orxonox::CommandExecutor::getReturnValue(), orxonox::CommandExecutor::getReturnValueString(), and orxonox::TclBind::tcl_query().

unsigned int orxonox::CommandEvaluation::getStartindex | ( |  | ) | const`[private]`

References function_, and functionclass_.

Referenced by complete(), evaluateParams(), and execute().

bool orxonox::CommandEvaluation::hasReturnvalue | ( |  | ) | const

References function_, orxonox::Executor::hasReturnvalue(), and orxonox::MT_Type::Null.

std::string orxonox::CommandEvaluation::hint | ( |  | ) | const

References dump(), orxonox::CommandState::Empty, orxonox::CommandState::Error, errorMessage_, orxonox::CommandState::Finished, orxonox::CommandState::Function, function_, listOfPossibleArguments_, listOfPossibleFunctions_, listOfPossibleIdentifiers_, orxonox::CommandState::ParamPreparation, orxonox::CommandState::Params, orxonox::CommandState::ShortcutOrIdentifier, state_, and orxonox::CommandState::Uninitialized.

Referenced by orxonox::CommandExecutor::hint().

void orxonox::CommandEvaluation::initialize | ( | const std::string & | command | ) |

References additionalParameter_, argument_, bCommandChanged_, bEvaluatedParams_, bNewCommand_, command_, commandTokens_, orxonox::CommandState::Empty, errorMessage_, function_, functionclass_, listOfPossibleArguments_, listOfPossibleFunctions_, listOfPossibleIdentifiers_, originalCommand_, possibleArgument_, orxonox::SubString::split(), state_, and orxonox::SubString::WhiteSpaces.

Referenced by CommandEvaluation(), and orxonox::CommandExecutor::parse().

bool orxonox::CommandEvaluation::isValid | ( |  | ) | const

References function_.

Referenced by evaluateParams(), execute(), and orxonox::Button::parse().

void orxonox::CommandEvaluation::setAdditionalParameter | ( | const std::string & | param | ) | `[inline]`

void orxonox::CommandEvaluation::setEvaluatedParameter | ( | unsigned int | index,
|  | MultiType | param |
| ) |  |  |

References orxonox::MAX_FUNCTOR_ARGUMENTS, and param_.

Referenced by orxonox::BufferedParamCommand::execute().

## Friends And Related Function Documentation

friend class CommandExecutor`[friend]`

## Member Data Documentation

std::string orxonox::CommandEvaluation::additionalParameter_`[private]`

Referenced by execute(), and initialize().

std::string orxonox::CommandEvaluation::argument_`[private]`

Referenced by complete(), initialize(), and orxonox::CommandExecutor::parse().

bool orxonox::CommandEvaluation::bCommandChanged_`[private]`

Referenced by execute(), initialize(), and orxonox::CommandExecutor::parse().

bool orxonox::CommandEvaluation::bEvaluatedParams_`[private]`

Referenced by evaluateParams(), execute(), and initialize().

bool orxonox::CommandEvaluation::bNewCommand_`[private]`

Referenced by complete(), initialize(), and orxonox::CommandExecutor::parseIfNeeded().

std::string orxonox::CommandEvaluation::command_`[private]`

Referenced by orxonox::CommandExecutor::argumentsGiven(), complete(), execute(), initialize(), and orxonox::CommandExecutor::parse().

SubString orxonox::CommandEvaluation::commandTokens_`[private]`

Referenced by orxonox::CommandExecutor::argumentsGiven(), complete(), evaluateParams(), execute(), orxonox::CommandExecutor::getArgument(), initialize(), and orxonox::CommandExecutor::parse().

std::string orxonox::CommandEvaluation::errorMessage_`[private]`

Referenced by hint(), initialize(), and orxonox::CommandExecutor::parse().

ConsoleCommand* orxonox::CommandEvaluation::function_`[private]`

Referenced by complete(), evaluateParams(), execute(), getReturnvalue(), getStartindex(), hasReturnvalue(), hint(), initialize(), isValid(), and orxonox::CommandExecutor::parse().

Identifier* orxonox::CommandEvaluation::functionclass_`[private]`

Referenced by complete(), orxonox::CommandExecutor::createArgumentCompletionList(), getStartindex(), initialize(), and orxonox::CommandExecutor::parse().

ArgumentCompletionList orxonox::CommandEvaluation::listOfPossibleArguments_`[private]`

Referenced by orxonox::CommandExecutor::createListOfPossibleArguments(), hint(), initialize(), and orxonox::CommandExecutor::parse().

std::list<std::pair<const std::string*, const std::string*> > orxonox::CommandEvaluation::listOfPossibleFunctions_`[private]`

Referenced by orxonox::CommandExecutor::createListOfPossibleFunctions(), hint(), initialize(), and orxonox::CommandExecutor::parse().

std::list<std::pair<const std::string*, const std::string*> > orxonox::CommandEvaluation::listOfPossibleIdentifiers_`[private]`

Referenced by orxonox::CommandExecutor::createListOfPossibleIdentifiers(), hint(), initialize(), and orxonox::CommandExecutor::parse().

std::string orxonox::CommandEvaluation::originalCommand_`[private]`

Referenced by execute(), and initialize().

MultiType orxonox::CommandEvaluation::param_[5]`[private]`

Referenced by evaluateParams(), execute(), getEvaluatedParameter(), and setEvaluatedParameter().

std::string orxonox::CommandEvaluation::possibleArgument_`[private]`

Referenced by complete(), initialize(), and orxonox::CommandExecutor::parse().

CommandState::Value orxonox::CommandEvaluation::state_`[private]`

Referenced by CommandEvaluation(), complete(), hint(), initialize(), and orxonox::CommandExecutor::parse().

The documentation for this class was generated from the following files:

- src/core/CommandEvaluation.h
- src/core/CommandEvaluation.cc