MultipleCommand< T, U, V, W > Class Template Reference
This class represents a command which can be called multiple times in a given commandline and can have 1-4 arguments of types T, U, V and U. More...
#include <multiplecommand.h>
Public Member Functions | |
| MultipleCommand (std::vector< T > *ptr1, const std::string &name, const std::string &shortName="", const std::string &infoText="", const std::string parameterList="") | |
| MultipleCommand (std::vector< T > *ptr1, std::vector< U > *ptr2, const std::string &name, const std::string &shortName="", const std::string &infoText="", const std::string parameterList="") | |
| MultipleCommand (std::vector< T > *ptr1, std::vector< U > *ptr2, std::vector< V > *ptr3, const std::string &name, const std::string &shortName="", const std::string &infoText="", const std::string parameterList="") | |
| MultipleCommand (std::vector< T > *ptr1, std::vector< U > *ptr2, std::vector< V > *ptr3, std::vector< W > *ptr4, const std::string &name, const std::string &shortName="", const std::string &infoText="", const std::string parameterList="") | |
| bool | execute (const std::vector< std::string > ¶meters) |
| Executes this command with the given parameters. | |
| bool | checkParameters (const std::vector< std::string > ¶meters) |
| Checks the parameters for consistency and number. | |
Protected Attributes | |
| std::vector< T > * | ptr1_ |
| std::vector< U > * | ptr2_ |
| std::vector< V > * | ptr3_ |
| std::vector< W > * | ptr4_ |
Detailed Description
template<class T, class U = T, class V = U, class W = V>
class voreen::MultipleCommand< T, U, V, W >
This class represents a command which can be called multiple times in a given commandline and can have 1-4 arguments of types T, U, V and U.
This class simply tries to convert the parameters to the appropriate values and stores them in it The template must be usable within a stringstream (necessary for conversion)
- See also:
- MultipleCommandZeroArguments
Definition at line 44 of file multiplecommand.h.
Member Function Documentation
| bool checkParameters | ( | const std::vector< std::string > & | parameters | ) | [inline, virtual] |
Checks the parameters for consistency and number.
This version only tests for the number of parameters. If you want to test for other conditions, overwrite this method in a derived class
- Parameters:
-
parameters The parameters which should be tested
- Returns:
- true, if the parameters are correct
Reimplemented from Command.
Definition at line 98 of file multiplecommand.h.
| bool execute | ( | const std::vector< std::string > & | parameters | ) | [inline, virtual] |
Executes this command with the given parameters.
- Parameters:
-
parameters The parameters needed for the execution of this command.
- Returns:
- true, if the execution was successful, false otherwise
Implements Command.
Definition at line 86 of file multiplecommand.h.