#include <ArArg.h>
Public Types | |
enum | Type { INVALID, INT, DOUBLE, STRING, BOOL, POSE } |
Public Methods | |
ArArg (void) | |
Default empty contructor. | |
ArArg (std::string name, int *pointer, std::string description="") | |
Constructor for making an integer argument. | |
ArArg (std::string name, double *pointer, std::string description="") | |
Constructor for making a double argument. | |
ArArg (std::string name, std::string *pointer, std::string description="") | |
Constructor for making a string argument. | |
ArArg (std::string name, bool *pointer, std::string description="") | |
Constructor for making a boolean argument. | |
ArArg (std::string name, ArPose *pointer, std::string description="") | |
Constructor for making a position argument. | |
ArArg (const ArArg &arg) | |
Copy constructor. | |
virtual | ~ArArg (void) |
Destructor. | |
Type | getType (void) |
Gets the type of the argument. More... | |
std::string | getName (void) |
Gets the name of the argument. | |
std::string | getDescription (void) |
Gets the long description of the argument. | |
void | setInt (int val) |
Sets the argument value, for int arguments. | |
void | setDouble (double val) |
Sets the argument value, for double arguments. | |
void | setString (std::string str) |
Sets the argument value, for string arguments. | |
void | setBool (bool val) |
Sets the argument value, for bool arguments. | |
void | setPose (ArPose pose) |
Sets the argument value, for ArPose arguments. | |
int | getInt (void) |
Gets the argument value, for int arguments. | |
double | getDouble (void) |
Gets the argument value, for double arguments. | |
std::string | getString (void) |
Gets the argument value, for string arguments. | |
bool | getBool (void) |
Gets the argument value, for bool arguments. | |
ArPose | getPose (void) |
Gets the argument value, for pose arguments. | |
void | print (void) |
Logs the type, name, and value of this argument. | |
void | clearPointers (void) |
Internal helper function. |
This is designed to be easy to add another type to the arguments... All you have to do to do so, is add an enum to the Type enum, add a newType getNewType(void), add a void setNewType(newType nt), and add a case statement for the newType to ArArg::print. You should probably also add an
|
|
|
Gets the type of the argument.
|