Orxonox: orxonox::Executor Class Reference

# orxonox::Executor Class Reference

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

Inheritance diagram for orxonox::Executor:

List of all members.

## Public Member Functions

bool | allDefaultValuesSet () const
bool | defaultValueSet (unsigned int index) const
bool | evaluate (const std::string &params, MultiType param[5], const std::string &delimiter=" ") const
| Executor (Functor *functor, const std::string &name="")
MultiType | getDefaultValue (unsigned int index) const
const std::string & | getDescription () const
const std::string & | getDescriptionParam (unsigned int param) const
const std::string & | getDescriptionReturnvalue (int param) const
Functor * | getFunctor () const
const std::string & | getName () const
unsigned int | getParamCount () const
const MultiType & | getReturnvalue () const
FunctionType::Value | getType () const
const std::string & | getTypenameParam (unsigned int param) const
const std::string & | getTypenameReturnvalue () const
bool | hasReturnvalue () const
void | operator() (const MultiType &param1, const MultiType &param2, const MultiType &param3, const MultiType &param4, const MultiType &param5) const
void | operator() (const MultiType &param1, const MultiType &param2, const MultiType &param3, const MultiType &param4) const
void | operator() (const MultiType &param1, const MultiType &param2, const MultiType &param3) const
void | operator() (const MultiType &param1, const MultiType &param2) const
void | operator() (const MultiType &param1) const
void | operator() () const
bool | parse (const std::string &params, const std::string &delimiter=" ") const
Executor & | setDefaultValue (unsigned int index, const MultiType &param)
Executor & | setDefaultValues (const MultiType &param1, const MultiType &param2, const MultiType &param3, const MultiType &param4, const MultiType &param5)
Executor & | setDefaultValues (const MultiType &param1, const MultiType &param2, const MultiType &param3, const MultiType &param4)
Executor & | setDefaultValues (const MultiType &param1, const MultiType &param2, const MultiType &param3)
Executor & | setDefaultValues (const MultiType &param1, const MultiType &param2)
Executor & | setDefaultValues (const MultiType &param1)
Executor & | setDescription (const std::string &description)
Executor & | setDescriptionParam (unsigned int param, const std::string &description)
Executor & | setDescriptionReturnvalue (const std::string &description)
void | setName (const std::string name)
virtual | ~Executor ()

## Protected Attributes

bool | bAddedDefaultValue_ [MAX_FUNCTOR_ARGUMENTS]
MultiType | defaultValue_ [MAX_FUNCTOR_ARGUMENTS]
Functor * | functor_
std::string | name_

## Private Attributes

bool | bAddedDescription_
bool | bAddedDescriptionParam_ [MAX_FUNCTOR_ARGUMENTS]
bool | bAddedDescriptionReturnvalue_
LanguageEntryLabel | description_
LanguageEntryLabel | descriptionParam_ [MAX_FUNCTOR_ARGUMENTS]
LanguageEntryLabel | descriptionReturnvalue_

## Constructor & Destructor Documentation

orxonox::Executor::Executor | ( | Functor * | functor,
|  | const std::string & | name = `""` |
| ) |  |  |

References bAddedDefaultValue_, bAddedDescription_, bAddedDescriptionParam_, bAddedDescriptionReturnvalue_, functor_, and name_.

orxonox::Executor::~Executor | ( |  | ) | `[virtual]`

References functor_.

## Member Function Documentation

bool orxonox::Executor::allDefaultValuesSet | ( |  | ) | const

References bAddedDefaultValue_, functor_, and orxonox::Functor::getParamCount().

bool orxonox::Executor::defaultValueSet | ( | unsigned int | index | ) | const`[inline]`

References orxonox::MAX_FUNCTOR_ARGUMENTS.

Referenced by orxonox::CommandEvaluation::dump().

bool orxonox::Executor::evaluate | ( | const std::string & | params,
|  | MultiType | param[5],
|  | const std::string & | delimiter = `" "` |
| ) |  |  | const

References bAddedDefaultValue_, defaultValue_, orxonox::Functor::evaluateParam(), functor_, orxonox::Functor::getParamCount(), orxonox::getStripped(), orxonox::MAX_FUNCTOR_ARGUMENTS, orxonox::SubString::size(), and orxonox::SubString::WhiteSpaces.

Referenced by orxonox::CommandEvaluation::evaluateParams().

MultiType orxonox::Executor::getDefaultValue | ( | unsigned int | index | ) | const`[inline]`

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

Referenced by orxonox::CommandEvaluation::dump().

const std::string & orxonox::Executor::getDescription | ( |  | ) | const

References description_, and GetLocalisation.

const std::string & orxonox::Executor::getDescriptionParam | ( | unsigned int | param | ) | const

References descriptionParam_, GetLocalisation, and orxonox::MAX_FUNCTOR_ARGUMENTS.

const std::string & orxonox::Executor::getDescriptionReturnvalue | ( | int | param | ) | const

References descriptionReturnvalue_, and GetLocalisation.

Functor* orxonox::Executor::getFunctor | ( |  | ) | const`[inline]`

const std::string& orxonox::Executor::getName | ( |  | ) | const`[inline]`

Referenced by orxonox::Identifier::addConsoleCommand(), orxonox::CommandExecutor::addConsoleCommandShortcut(), orxonox::CommandEvaluation::complete(), orxonox::CommandEvaluation::dump(), orxonox::CommandEvaluation::execute(), and orxonox::CommandExecutor::parse().

unsigned int orxonox::Executor::getParamCount | ( |  | ) | const`[inline]`

Referenced by orxonox::CommandEvaluation::complete(), orxonox::CommandEvaluation::dump(), orxonox::CommandExecutor::enoughArgumentsGiven(), and orxonox::EventContainer::process().

const MultiType& orxonox::Executor::getReturnvalue | ( |  | ) | const`[inline]`

Referenced by orxonox::CommandEvaluation::getReturnvalue().

FunctionType::Value orxonox::Executor::getType | ( |  | ) | const`[inline]`

const std::string& orxonox::Executor::getTypenameParam | ( | unsigned int | param | ) | const`[inline]`

Referenced by orxonox::CommandEvaluation::dump().

const std::string& orxonox::Executor::getTypenameReturnvalue | ( |  | ) | const`[inline]`

bool orxonox::Executor::hasReturnvalue | ( |  | ) | const`[inline]`

Referenced by orxonox::CommandEvaluation::hasReturnvalue().

void orxonox::Executor::operator() | ( | const MultiType & | param1,
|  | const MultiType & | param2,
|  | const MultiType & | param3,
|  | const MultiType & | param4,
|  | const MultiType & | param5 |
| ) |  |  | const`[inline]`

void orxonox::Executor::operator() | ( | const MultiType & | param1,
|  | const MultiType & | param2,
|  | const MultiType & | param3,
|  | const MultiType & | param4 |
| ) |  |  | const`[inline]`

void orxonox::Executor::operator() | ( | const MultiType & | param1,
|  | const MultiType & | param2,
|  | const MultiType & | param3 |
| ) |  |  | const`[inline]`

void orxonox::Executor::operator() | ( | const MultiType & | param1,
|  | const MultiType & | param2 |
| ) |  |  | const`[inline]`

void orxonox::Executor::operator() | ( | const MultiType & | param1 | ) | const`[inline]`

void orxonox::Executor::operator() | ( |  | ) | const`[inline]`

bool orxonox::Executor::parse | ( | const std::string & | params,
|  | const std::string & | delimiter = `" "` |
| ) |  |  | const

References EXECUTOR_PARSE.

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

Executor & orxonox::Executor::setDefaultValue | ( | unsigned int | index,
|  | const MultiType & | param |
| ) |  |  |

References bAddedDefaultValue_, defaultValue_, and orxonox::MAX_FUNCTOR_ARGUMENTS.

Referenced by orxonox::ConsoleCommand::defaultValue(), and orxonox::BaseObject::XMLPort().

Executor & orxonox::Executor::setDefaultValues | ( | const MultiType & | param1,
|  | const MultiType & | param2,
|  | const MultiType & | param3,
|  | const MultiType & | param4,
|  | const MultiType & | param5 |
| ) |  |  |

References bAddedDefaultValue_, and defaultValue_.

Executor & orxonox::Executor::setDefaultValues | ( | const MultiType & | param1,
|  | const MultiType & | param2,
|  | const MultiType & | param3,
|  | const MultiType & | param4 |
| ) |  |  |

References bAddedDefaultValue_, and defaultValue_.

Executor & orxonox::Executor::setDefaultValues | ( | const MultiType & | param1,
|  | const MultiType & | param2,
|  | const MultiType & | param3 |
| ) |  |  |

References bAddedDefaultValue_, and defaultValue_.

Executor & orxonox::Executor::setDefaultValues | ( | const MultiType & | param1,
|  | const MultiType & | param2 |
| ) |  |  |

References bAddedDefaultValue_, and defaultValue_.

Executor & orxonox::Executor::setDefaultValues | ( | const MultiType & | param1 | ) |

References bAddedDefaultValue_, and defaultValue_.

Referenced by orxonox::ConsoleCommand::defaultValues(), orxonox::delay(), orxonox::Munition::Magazine::Magazine(), and orxonox::ModifierPickup::pickedUp().

Executor & orxonox::Executor::setDescription | ( | const std::string & | description | ) |

References AddLanguageEntry, bAddedDescription_, description_, and name_.

Referenced by orxonox::ConsoleCommand::description().

Executor & orxonox::Executor::setDescriptionParam | ( | unsigned int | param,
|  | const std::string & | description |
| ) |  |  |

References AddLanguageEntry, bAddedDescriptionParam_, orxonox::convertValue(), descriptionParam_, orxonox::MAX_FUNCTOR_ARGUMENTS, and name_.

Referenced by orxonox::ConsoleCommand::descriptionParam().

Executor & orxonox::Executor::setDescriptionReturnvalue | ( | const std::string & | description | ) |

References AddLanguageEntry, bAddedDescriptionReturnvalue_, descriptionReturnvalue_, and name_.

Referenced by orxonox::ConsoleCommand::descriptionReturnvalue().

void orxonox::Executor::setName | ( | const std::string | name | ) | `[inline]`

## Member Data Documentation

bool orxonox::Executor::bAddedDefaultValue_[MAX_FUNCTOR_ARGUMENTS]`[protected]`

Referenced by allDefaultValuesSet(), evaluate(), Executor(), setDefaultValue(), and setDefaultValues().

bool orxonox::Executor::bAddedDescription_`[private]`

Referenced by Executor(), and setDescription().

bool orxonox::Executor::bAddedDescriptionParam_[MAX_FUNCTOR_ARGUMENTS]`[private]`

Referenced by Executor(), and setDescriptionParam().

bool orxonox::Executor::bAddedDescriptionReturnvalue_`[private]`

Referenced by Executor(), and setDescriptionReturnvalue().

MultiType orxonox::Executor::defaultValue_[MAX_FUNCTOR_ARGUMENTS]`[protected]`

Referenced by evaluate(), orxonox::ExecutorMember< T >::operator()(), setDefaultValue(), and setDefaultValues().

LanguageEntryLabel orxonox::Executor::description_`[private]`

Referenced by getDescription(), and setDescription().

LanguageEntryLabel orxonox::Executor::descriptionParam_[MAX_FUNCTOR_ARGUMENTS]`[private]`

Referenced by getDescriptionParam(), and setDescriptionParam().

LanguageEntryLabel orxonox::Executor::descriptionReturnvalue_`[private]`

Referenced by getDescriptionReturnvalue(), and setDescriptionReturnvalue().

Functor* orxonox::Executor::functor_`[protected]`

Referenced by allDefaultValuesSet(), evaluate(), Executor(), orxonox::ExecutorMember< T >::operator()(), orxonox::ExecutorMember< T >::setObject(), and ~Executor().

std::string orxonox::Executor::name_`[protected]`

Referenced by Executor(), setDescription(), setDescriptionParam(), and setDescriptionReturnvalue().

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

- src/core/Executor.h
- src/core/Executor.cc