Main Page   Class Hierarchy   Compound List   Compound Members  

ArArg Class Reference

Argument class, mostly for actions, could be used for other things. More...

#include <ArArg.h>

List of all members.

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.


Detailed Description

Argument class, mostly for actions, could be used for other things.

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

See also:
newType to the documentation for ArArg::getType.


Member Enumeration Documentation

enum ArArg::Type
 

Enumeration values:
INVALID  An invalid argument, the argument wasn't created correctly.
INT  Integer argument.
DOUBLE  Double argument.
STRING  String argument.
BOOL  Boolean argument.
POSE  ArPose argument.


Member Function Documentation

ArArg::Type ArArg::getType void   
 

Gets the type of the argument.

See also:
INVALID , INT , DOUBLE , STRING , BOOL , POSE


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:43:50 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001