#include <MArgDatabase.h>
Command argument list parser.
This class extends MArgParser by providing the ability to retrieve flag parameters, command arguments and command objects as selection lists.
See MArgParser for more details on how command argument parsing works in general.
Public Member Functions | |
MArgDatabase () | |
Default Constructor. | |
MArgDatabase (const MSyntax &syntax, const MArgList &argList, MStatus *ReturnStatus=NULL) | |
Creates an MArgDatabase object by using the data in syntax to parse the arguments provided in argList. More... | |
virtual | ~MArgDatabase () |
The class destructor. | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MSelectionList &result) const |
Gets the value of the 'index'th parameter of the given flag as an MSelectionList. More... | |
MStatus | getCommandArgument (unsigned int index, MSelectionList &result) const |
Gets the value of the requested command argument and appends it to the end of the MSelectionList that is passed in. More... | |
MStatus | getObjects (MSelectionList &result) const |
Gets the list of objects passed to the command as an MSelectionList. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, bool &result) const |
This method is not available in Python. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, int &result) const |
This method is not available in Python. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, double &result) const |
This method is not available in Python. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MString &result) const |
This method is not available in Python. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, unsigned int &result) const |
This method is not available in Python. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MDistance &result) const |
This method is not available in Python. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MAngle &result) const |
This method is not available in Python. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MTime &result) const |
This method is not available in Python. More... | |
MStatus | getCommandArgument (unsigned int index, bool &result) const |
This method is not available in Python. More... | |
MStatus | getCommandArgument (unsigned int index, int &result) const |
This method is not available in Python. More... | |
MStatus | getCommandArgument (unsigned int index, double &result) const |
This method is not available in Python. More... | |
MStatus | getCommandArgument (unsigned int index, MString &result) const |
This method is not available in Python. More... | |
MStatus | getCommandArgument (unsigned int index, MDistance &result) const |
This method is not available in Python. More... | |
MStatus | getCommandArgument (unsigned int index, MAngle &result) const |
This method is not available in Python. More... | |
MStatus | getCommandArgument (unsigned int index, MTime &result) const |
This method is not available in Python. More... | |
MStatus | getObjects (MStringArray &result) const |
Gets the list of objects passed to the command as an array of strings. More... | |
Public Member Functions inherited from MArgParser | |
MArgParser () | |
The default class constructor. | |
MArgParser (const MSyntax &syntax, const MArgList &argList, MStatus *ReturnStatus=NULL) | |
Creates an MArgParser object by using the data in 'syntax' to parse the argList. More... | |
virtual | ~MArgParser () |
The class destructor. | |
bool | isFlagSet (const char *flag, MStatus *ReturnStatus=NULL) const |
Queries the arguments to the command to determine if the given flag is set. More... | |
bool | isEdit (MStatus *ReturnStatus=NULL) const |
Determines if the edit flag was one of the arguments to the command. More... | |
bool | isQuery (MStatus *ReturnStatus=NULL) const |
Determines if the query flag was one of the arguments to the command. More... | |
unsigned int | numberOfFlagsUsed () const |
Returns the number of flags given on the command line. More... | |
unsigned int | numberOfFlagUses (const char *flag) const |
Returns the number of times the given flag was used on the command line. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, bool &result) const |
Gets the value of the 'index'th parameter of the given flag as a boolean. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, int &result) const |
Gets the value of the 'index'th parameter of the given flag as an int. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, double &result) const |
Gets the value of the 'index'th parameter of the given flag as a double. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MString &result) const |
Gets the value of the 'index'th parameter of the given flag as an MString. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, unsigned int &result) const |
Gets the value of the 'index'th parameter of the given flag as an unsigned int. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MDistance &result) const |
Gets the value of the 'index'th parameter of the given flag as an MDistance. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MAngle &result) const |
Gets the value of the 'index'th parameter of the given flag as an MAngle. More... | |
MStatus | getFlagArgument (const char *flag, unsigned int index, MTime &result) const |
Gets the value of the 'index'th parameter of the given flag as an MTime. More... | |
bool | flagArgumentBool (const char *flag, unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the 'index'th parameter of the given flag as a boolean. More... | |
int | flagArgumentInt (const char *flag, unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the 'index'th parameter of the given flag as an int. More... | |
double | flagArgumentDouble (const char *flag, unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the 'index'th parameter of the given flag as a double. More... | |
MString | flagArgumentString (const char *flag, unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the 'index'th parameter of the given flag as an MString. More... | |
MDistance | flagArgumentMDistance (const char *flag, unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the 'index'th parameter of the given flag as an MDistance. More... | |
MAngle | flagArgumentMAngle (const char *flag, unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the 'index'th parameter of the given flag as an MAngle. More... | |
MTime | flagArgumentMTime (const char *flag, unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the 'index'th parameter of the given flag as an MTime. More... | |
MStatus | getFlagArgumentPosition (const char *flag, unsigned int i, unsigned int &position) const |
Returns the position in the command line of the i'th usage of the specified flag. More... | |
MStatus | getFlagArgumentList (const char *flag, unsigned int i, MArgList &args) const |
Returns an MArgList containing the parameters to the i'th usage of the specified flag. More... | |
MStatus | getCommandArgument (unsigned int index, bool &result) const |
Gets the value of the requested command argument to the command as a boolean. More... | |
MStatus | getCommandArgument (unsigned int index, int &result) const |
Gets the value of the requested command argument to the command as an int. More... | |
MStatus | getCommandArgument (unsigned int index, double &result) const |
Gets the value of the requested command argument to the command as a double. More... | |
MStatus | getCommandArgument (unsigned int index, MString &result) const |
Gets the value of the requested command argument to the command as an MString. More... | |
MStatus | getCommandArgument (unsigned int index, MDistance &result) const |
Gets the value of the requested command argument to the command as an MDistance. More... | |
MStatus | getCommandArgument (unsigned int index, MAngle &result) const |
Gets the value of the requested command argument to the command as an MAngle. More... | |
MStatus | getCommandArgument (unsigned int index, MTime &result) const |
Gets the value of the requested command argument to the command as an MTime. More... | |
bool | commandArgumentBool (unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the requested command argument as a boolean. More... | |
int | commandArgumentInt (unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the requested command argument as an int. More... | |
double | commandArgumentDouble (unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the requested command argument as a double. More... | |
MString | commandArgumentString (unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the requested command argument as a string. More... | |
MDistance | commandArgumentMDistance (unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the requested command argument as a MDistance. More... | |
MAngle | commandArgumentMAngle (unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the requested command argument as a MAngle. More... | |
MTime | commandArgumentMTime (unsigned int index, MStatus *ReturnStatus=NULL) const |
Gets the value of the requested command argument as a MTime. More... | |
MStatus | getObjects (MStringArray &result) const |
Gets the list of objects passed to the command as an array of strings. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
Static Public Member Functions inherited from MArgParser | |
static const char * | className () |
Returns the name of this class. More... | |
MArgDatabase | ( | const MSyntax & | syntax, |
const MArgList & | argList, | ||
MStatus * | ReturnStatus = NULL |
||
) |
Creates an MArgDatabase object by using the data in syntax to parse the arguments provided in argList.
[in] | syntax | the syntax object |
[in] | argList | the argument list |
[out] | ReturnStatus | return status |
MStatus getFlagArgument | ( | const char * | flag, |
unsigned int | index, | ||
MSelectionList & | result | ||
) | const |
Gets the value of the 'index'th parameter of the given flag as an MSelectionList.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter |
[out] | result | value of the parameter as an MSelectionList |
MStatus getCommandArgument | ( | unsigned int | index, |
MSelectionList & | result | ||
) | const |
Gets the value of the requested command argument and appends it to the end of the MSelectionList that is passed in.
[in] | index | index of the command argument |
[out] | result | value of the argument as an MSelectionList |
MStatus getObjects | ( | MSelectionList & | result | ) | const |
Gets the list of objects passed to the command as an MSelectionList.
[out] | result | list of objects passed to the command |
MStatus getFlagArgument | ( | const char * | flag, |
unsigned int | index, | ||
bool & | result | ||
) | const |
This method is not available in Python.
Gets the value of the 'index'th parameter of the given flag as a boolean.
Python Notes
Use flagArgumentBool() instead.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter to retrieve |
[out] | result | value of the parameter as a boolean |
MStatus getFlagArgument | ( | const char * | flag, |
unsigned int | index, | ||
int & | result | ||
) | const |
This method is not available in Python.
Gets the value of the 'index'th parameter of the given flag as an int.
Python Notes
Use flagArgumentInt() instead.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter to retrieve |
[out] | result | value of the parameter as an int |
MStatus getFlagArgument | ( | const char * | flag, |
unsigned int | index, | ||
double & | result | ||
) | const |
This method is not available in Python.
Gets the value of the 'index'th parameter of the given flag as a double.
Python Notes
Use flagArgumentDouble() instead.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter to retrieve |
[out] | result | value of the parameter as a double |
This method is not available in Python.
Gets the value of the 'index'th parameter of the given flag as an MString.
Python Notes
Use flagArgumentString() instead.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter to retrieve |
[out] | result | value of the parameter as an MString |
MStatus getFlagArgument | ( | const char * | flag, |
unsigned int | index, | ||
unsigned int & | result | ||
) | const |
This method is not available in Python.
Gets the value of the 'index'th parameter of the given flag as an unsigned int.
Python Notes
Use flagArgumentInt() instead.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter to retrieve |
[out] | result | value of the parameter as an unsigned int |
This method is not available in Python.
Gets the value of the 'index'th parameter of the given flag as an MDistance.
Python Notes
Use flagArgumentMDistance() instead.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter to retrieve |
[out] | result | value of the parameter as an MDistance |
This method is not available in Python.
Gets the value of the 'index'th parameter of the given flag as an MAngle.
Python Notes
Use flagArgumentMAngle() instead.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter to retrieve |
[out] | result | value of the parameter as an MAngle |
This method is not available in Python.
Gets the value of the 'index'th parameter of the given flag as an MTime.
Python Notes
Use flagArgumentMTime() instead.
[in] | flag | flag whose parameter is being requested |
[in] | index | index of the parameter to retrieve |
[out] | result | value of the parameter as an MTime |
MStatus getCommandArgument | ( | unsigned int | index, |
bool & | result | ||
) | const |
This method is not available in Python.
Gets the value of the requested command argument to the command as a boolean.
Python Notes
Use commandArgumentBool() instead.
[in] | index | the index of the argument of the command |
[out] | result | the value of the argument as a boolean |
MStatus getCommandArgument | ( | unsigned int | index, |
int & | result | ||
) | const |
This method is not available in Python.
Gets the value of the requested command argument to the command as an int.
Python Notes
Use commandArgumentInt() instead.
[in] | index | the index of the argument of the command |
[out] | result | the value of the argument as a int |
MStatus getCommandArgument | ( | unsigned int | index, |
double & | result | ||
) | const |
This method is not available in Python.
Gets the value of the requested command argument to the command as a double.
Python Notes
Use commandArgumentDouble() instead.
[in] | index | the index of the argument of the command |
[out] | result | the value of the argument as a double |
This method is not available in Python.
Gets the value of the requested command argument to the command as an MString.
Python Notes
Use commandArgumentString() instead.
[in] | index | the index of the argument of the command |
[out] | result | the value of the argument as an MString |
This method is not available in Python.
Gets the value of the requested command argument to the command as an MDistance.
Python Notes
Use commandArgumentMDistance() instead.
[in] | index | the index of the argument of the command |
[out] | result | the value of the argument as an MDistance |
This method is not available in Python.
Gets the value of the requested command argument to the command as an MAngle.
Python Notes
Use commandArgumentMAngle() instead.
[in] | index | the index of the argument of the command |
[out] | result | the value of the argument as an MAngle |
This method is not available in Python.
Gets the value of the requested command argument to the command as an MTime.
Python Notes
Use commandArgumentMTime() instead.
[in] | index | the index of the argument of the command |
[out] | result | the value of the argument as an MTime |
MStatus getObjects | ( | MStringArray & | result | ) | const |
Gets the list of objects passed to the command as an array of strings.
[out] | result | the list of objects passed to the command as an MStringArray |
|
static |
Returns the name of this class.