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.
cgfxShaderCmd.cpp, closestPointOnCurveCmd.cpp, clusterWeightFunction.cpp, conditionTest.cpp, dagMessageCmd.cpp, deletedMsgCmd.cpp, eventTest.cpp, filteredAsciiFile.cpp, flipUVCmd.cpp, flipUVCmd.h, fxManagerCmd.cpp, geometryCacheConverter.cpp, geometrySurfaceConstraint.cpp, helixTool.cpp, lockEvent.cpp, nodeCreatedCBCmd.cpp, nodeInfoCmd.cpp, particlePathsCmd.cpp, peltOverlapCmd.cpp, renderViewInteractiveRenderCmd.cpp, renderViewRenderCmd.cpp, renderViewRenderRegionCmd.cpp, scanDagSyntax.cpp, userMsgCmd.cpp, and viewCallbackTest.cpp.
#include <MArgDatabase.h>
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. |
|
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. |
|
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.
|
|
MStatus | getObjects (MSelectionList &result) const |
Gets the list of objects passed to the
command as an MSelectionList. |
|
MStatus | getFlagArgument (const char *flag, unsigned int index, bool &result) const |
This method is not available in
Python. |
|
MStatus | getFlagArgument (const char *flag, unsigned int index, int &result) const |
This method is not available in
Python. |
|
MStatus | getFlagArgument (const char *flag, unsigned int index, double &result) const |
This method is not available in
Python. |
|
MStatus | getFlagArgument (const char *flag, unsigned int index, MString &result) const |
This method is not available in
Python. |
|
MStatus | getFlagArgument (const char *flag, unsigned int index, unsigned int &result) const |
This method is not available in
Python. |
|
MStatus | getFlagArgument (const char *flag, unsigned int index, MDistance &result) const |
This method is not available in
Python. |
|
MStatus | getFlagArgument (const char *flag, unsigned int index, MAngle &result) const |
This method is not available in
Python. |
|
MStatus | getFlagArgument (const char *flag, unsigned int index, MTime &result) const |
This method is not available in
Python. |
|
MStatus | getCommandArgument (unsigned int index, bool &result) const |
This method is not available in
Python. |
|
MStatus | getCommandArgument (unsigned int index, int &result) const |
This method is not available in
Python. |
|
MStatus | getCommandArgument (unsigned int index, double &result) const |
This method is not available in
Python. |
|
MStatus | getCommandArgument (unsigned int index, MString &result) const |
This method is not available in
Python. |
|
MStatus | getCommandArgument (unsigned int index, MDistance &result) const |
This method is not available in
Python. |
|
MStatus | getCommandArgument (unsigned int index, MAngle &result) const |
This method is not available in
Python. |
|
MStatus | getCommandArgument (unsigned int index, MTime &result) const |
This method is not available in
Python. |
|
MStatus | getObjects (MStringArray &result) const |
Gets the list of objects passed to the
command as an array of strings. |
|
Static Public Member Functions |
|
static const char * | className () |
Returns the name of this class. |
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
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 |
Reimplemented from MArgParser.
const char * className | ( | ) | [static] |