Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | List of all members
orxonox::ExecutorStatic Class Reference

A child class of Executor, used to distinguish executors that wrap static functions from executors that wrap member-functions. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/command/Executor.h>

Inheritance diagram for orxonox::ExecutorStatic:
orxonox::Executor

Public Member Functions

 ExecutorStatic (const FunctorStaticPtr &functor, const std::string &name="")
 Constructor: Initializes the parent class. More...
 
virtual ~ExecutorStatic ()
 Destructor. More...
 
- Public Member Functions inherited from orxonox::Executor
 Executor (const FunctorPtr &functor, const std::string &name="")
 Constructor: Creates an executor. More...
 
 Executor (const Executor &other)
 Copy-constructor: Creates a new executor with the same values and a clone of the wrapped Functor. More...
 
virtual ~Executor ()=default
 
bool allDefaultValuesSet () const
 Returns true if the executor has a default value for each parameter of the wrapped function, so it can be called without passing additional arguments. More...
 
bool defaultValueSet (unsigned int index) const
 Returns true if the executor contains a default value for the parameter with given index (the first parameter has index 0). More...
 
int evaluateArguments (const SubString &arguments, MultiType arg[MAX_FUNCTOR_ARGUMENTS], int *error=nullptr, const std::string &delimiter=" ") const
 Converts the arguments in a SubString to the right type, so they can be used to execute the function without further conversions. More...
 
MultiType getDefaultValue (unsigned int index) const
 Returns the default value for a parameter with given index (the first parameter has index 0). More...
 
const FunctorPtrgetFunctor () const
 Returns the functor. More...
 
const std::string & getName () const
 Returns the name of the executor. More...
 
unsigned int getParamCount () const
 Returns the number of parameters of the wrapped function. More...
 
Functor::Type getType () const
 Returns the type of the wrapped function (static or member). More...
 
std::string getTypenameParam (unsigned int param) const
 Returns the name of the type of a parameter with given index (the first parameter has index 0). More...
 
std::string getTypenameReturnvalue () const
 Returns the name of the type of the return value. More...
 
bool hasReturnvalue () const
 Returns true if the wrapped function returns a value. More...
 
MultiType operator() () const
 Calls the wrapped function with 0 arguments. If the function needs more arguments, the executor's default values are used. More...
 
MultiType operator() (const MultiType &arg1) const
 Calls the wrapped function with 1 argument. If the function needs more arguments, the executor's default values are used. More...
 
MultiType operator() (const MultiType &arg1, const MultiType &arg2) const
 Calls the wrapped function with 2 arguments. If the function needs more arguments, the executor's default values are used. More...
 
MultiType operator() (const MultiType &arg1, const MultiType &arg2, const MultiType &arg3) const
 Calls the wrapped function with 3 arguments. If the function needs more arguments, the executor's default values are used. More...
 
MultiType operator() (const MultiType &arg1, const MultiType &arg2, const MultiType &arg3, const MultiType &arg4) const
 Calls the wrapped function with 4 arguments. If the function needs more arguments, the executor's default values are used. More...
 
MultiType operator() (const MultiType &arg1, const MultiType &arg2, const MultiType &arg3, const MultiType &arg4, const MultiType &arg5) const
 Calls the wrapped function with 5 arguments. If the function needs more arguments, the executor's default values are used. More...
 
MultiType parse (const std::string &arguments, int *error=nullptr, const std::string &delimiter=" ", bool bPrintError=false) const
 Calls the wrapped function with arguments that are passed in a string. More...
 
MultiType parse (const SubString &arguments, int *error=nullptr, const std::string &delimiter=" ", bool bPrintError=false) const
 Calls the wrapped function with arguments that are passed as tokens in a SubString. More...
 
void setDefaultValue (unsigned int index, const MultiType &arg)
 Defines the default value for a parameter with given index (the first parameter has index 0). More...
 
void setDefaultValues (const MultiType &arg1)
 Defines the default value for the first parameter. More...
 
void setDefaultValues (const MultiType &arg1, const MultiType &arg2)
 Defines the default value for the first two parameters. More...
 
void setDefaultValues (const MultiType &arg1, const MultiType &arg2, const MultiType &arg3)
 Defines the default value for the first three parameters. More...
 
void setDefaultValues (const MultiType &arg1, const MultiType &arg2, const MultiType &arg3, const MultiType &arg4)
 Defines the default value for the first four parameters. More...
 
void setDefaultValues (const MultiType &arg1, const MultiType &arg2, const MultiType &arg3, const MultiType &arg4, const MultiType &arg5)
 Defines the default value for the first five parameters. More...
 
void setFunctor (const FunctorPtr &functor)
 Changes the functor. More...
 
void setName (const std::string &name)
 Changes the name of the executor. More...
 

Additional Inherited Members

- Protected Attributes inherited from orxonox::Executor
MultiType defaultValue_ [MAX_FUNCTOR_ARGUMENTS]
 The default values, one for each parameter. More...
 
FunctorPtr functor_
 The underlying Functor that wraps a function. More...
 
std::string name_
 The name of the executor. More...
 

Detailed Description

A child class of Executor, used to distinguish executors that wrap static functions from executors that wrap member-functions.

Behaves exactly like Executor, because static functions need no special treatment.

Constructor & Destructor Documentation

orxonox::ExecutorStatic::ExecutorStatic ( const FunctorStaticPtr functor,
const std::string &  name = "" 
)
inline

Constructor: Initializes the parent class.

virtual orxonox::ExecutorStatic::~ExecutorStatic ( )
inlinevirtual

Destructor.


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