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

This class executes an argument completion function and returns a list of the possible arguments. More...

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

Public Member Functions

 ArgumentCompleter (ArgumentCompletionList(*function)(void), bool bUseMultipleWords)
 Constructor, assigns a function-pointer with no arguments. More...
 
 ArgumentCompleter (ArgumentCompletionList(*function)(const std::string &param1), bool bUseMultipleWords)
 Constructor, assigns a function-pointer with one argument. More...
 
 ArgumentCompleter (ArgumentCompletionList(*function)(const std::string &param1, const std::string &param2), bool bUseMultipleWords)
 Constructor, assigns a function-pointer with two arguments. More...
 
 ArgumentCompleter (ArgumentCompletionList(*function)(const std::string &param1, const std::string &param2, const std::string &param3), bool bUseMultipleWords)
 Constructor, assigns a function-pointer with three arguments. More...
 
 ArgumentCompleter (ArgumentCompletionList(*function)(const std::string &param1, const std::string &param2, const std::string &param3, const std::string &param4), bool bUseMultipleWords)
 Constructor, assigns a function-pointer with four arguments. More...
 
 ArgumentCompleter (ArgumentCompletionList(*function)(const std::string &param1, const std::string &param2, const std::string &param3, const std::string &param4, const std::string &param5), bool bUseMultipleWords)
 Constructor, assigns a function-pointer with five arguments. More...
 
ArgumentCompletionList operator() (const std::string &param1="", const std::string &param2="", const std::string &param3="", const std::string &param4="", const std::string &param5="")
 Calls the argument completion function with a maximum of five parameters. More...
 
bool useMultipleWords () const
 Returns true if the argument completion list supports multiple words. More...
 

Private Attributes

bool bUseMultipleWords_
 If true, the argument completion list supports multiple words. More...
 
ArgumentCompletionList(* function_0_ )(void)
 Function-pointer for an argument completion function with no arguments. More...
 
ArgumentCompletionList(* function_1_ )(const std::string &param1)
 Function-pointer for an argument completion function with one argument. More...
 
ArgumentCompletionList(* function_2_ )(const std::string &param1, const std::string &param2)
 Function-pointer for an argument completion function with two arguments. More...
 
ArgumentCompletionList(* function_3_ )(const std::string &param1, const std::string &param2, const std::string &param3)
 Function-pointer for an argument completion function with three arguments. More...
 
ArgumentCompletionList(* function_4_ )(const std::string &param1, const std::string &param2, const std::string &param3, const std::string &param4)
 Function-pointer for an argument completion function with four arguments. More...
 
ArgumentCompletionList(* function_5_ )(const std::string &param1, const std::string &param2, const std::string &param3, const std::string &param4, const std::string &param5)
 Function-pointer for an argument completion function with five arguments. More...
 
unsigned char paramCount_
 The number of parameters of the argument completion function. More...
 

Detailed Description

This class executes an argument completion function and returns a list of the possible arguments.

ArgumentCompleter is used to wrap argument completion functions as defined in ArgumentCompletionFunctions.h and can be assigned to a ConsoleCommand to create a list of possible arguments.

See also
See ArgumentCompleter.h for more information.
See ArgumentCompletionFunctions.h for an example.

Constructor & Destructor Documentation

orxonox::ArgumentCompleter::ArgumentCompleter ( ArgumentCompletionList(*)(void function,
bool  bUseMultipleWords 
)
inline

Constructor, assigns a function-pointer with no arguments.

orxonox::ArgumentCompleter::ArgumentCompleter ( ArgumentCompletionList(*)(const std::string &param1)  function,
bool  bUseMultipleWords 
)
inline

Constructor, assigns a function-pointer with one argument.

orxonox::ArgumentCompleter::ArgumentCompleter ( ArgumentCompletionList(*)(const std::string &param1, const std::string &param2)  function,
bool  bUseMultipleWords 
)
inline

Constructor, assigns a function-pointer with two arguments.

orxonox::ArgumentCompleter::ArgumentCompleter ( ArgumentCompletionList(*)(const std::string &param1, const std::string &param2, const std::string &param3)  function,
bool  bUseMultipleWords 
)
inline

Constructor, assigns a function-pointer with three arguments.

orxonox::ArgumentCompleter::ArgumentCompleter ( ArgumentCompletionList(*)(const std::string &param1, const std::string &param2, const std::string &param3, const std::string &param4)  function,
bool  bUseMultipleWords 
)
inline

Constructor, assigns a function-pointer with four arguments.

orxonox::ArgumentCompleter::ArgumentCompleter ( ArgumentCompletionList(*)(const std::string &param1, const std::string &param2, const std::string &param3, const std::string &param4, const std::string &param5)  function,
bool  bUseMultipleWords 
)
inline

Constructor, assigns a function-pointer with five arguments.

Member Function Documentation

ArgumentCompletionList orxonox::ArgumentCompleter::operator() ( const std::string &  param1 = "",
const std::string &  param2 = "",
const std::string &  param3 = "",
const std::string &  param4 = "",
const std::string &  param5 = "" 
)
inline

Calls the argument completion function with a maximum of five parameters.

Returns
Returns the list of possible arguments, created by the argument completion function
bool orxonox::ArgumentCompleter::useMultipleWords ( ) const
inline

Returns true if the argument completion list supports multiple words.

Member Data Documentation

bool orxonox::ArgumentCompleter::bUseMultipleWords_
private

If true, the argument completion list supports multiple words.

ArgumentCompletionList(* orxonox::ArgumentCompleter::function_0_) (void)
private

Function-pointer for an argument completion function with no arguments.

ArgumentCompletionList(* orxonox::ArgumentCompleter::function_1_) (const std::string &param1)
private

Function-pointer for an argument completion function with one argument.

ArgumentCompletionList(* orxonox::ArgumentCompleter::function_2_) (const std::string &param1, const std::string &param2)
private

Function-pointer for an argument completion function with two arguments.

ArgumentCompletionList(* orxonox::ArgumentCompleter::function_3_) (const std::string &param1, const std::string &param2, const std::string &param3)
private

Function-pointer for an argument completion function with three arguments.

ArgumentCompletionList(* orxonox::ArgumentCompleter::function_4_) (const std::string &param1, const std::string &param2, const std::string &param3, const std::string &param4)
private

Function-pointer for an argument completion function with four arguments.

ArgumentCompletionList(* orxonox::ArgumentCompleter::function_5_) (const std::string &param1, const std::string &param2, const std::string &param3, const std::string &param4, const std::string &param5)
private

Function-pointer for an argument completion function with five arguments.

unsigned char orxonox::ArgumentCompleter::paramCount_
private

The number of parameters of the argument completion function.


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