#include <xsi_argument.h>
The
Argument object represents an argument (or parameter)
of a Softimage
Command. For example, the DeleteObj command takes 1 argument
(InputObj
).
Argument objects are used in three circumstances in Softimage:
For more information and an example see the documentation for the Command object.
Public Member Functions |
|
Argument () | |
~Argument () | |
Argument (const CRef &in_ref) | |
Argument (const Argument &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
Argument & | operator= (const Argument &in_obj) |
Argument & | operator= (const CRef &in_ref) |
CValue | GetValue () const |
CStatus | PutValue (const CValue &) |
siArgumentFlags | GetFlags () const |
ArgumentHandler | GetHandler () const |
CStatus | PutHandler (const CString &in_strHandler) |
CStatus | PutHandler (ArgumentHandler &in_Handler) |
Argument | ( | ) |
Default constructor.
~Argument | ( | ) |
Default destructor.
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from SIObject.
siClassID GetClassID | ( | ) | const [virtual] |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
CValue GetValue | ( | ) | const |
Returns the value of the argument. This would be the default value from the command definition unless some alternative value has been set by calling Argument::PutValue.
Sets the value of an argument. If called while the command is being defined, (for example in the commandname_Init callback of a self-installed plug-in) then this establishes the default value of the argument which is persisted as part of the command definition.
When you use Command::Execute to invoke a command, you can provide an actual value for this argument, which overrides the default value, but does not affect the persisted command definition.
siArgumentFlags GetFlags | ( | ) | const |
Returns the argument flags. These flags indicate how the argument values are passed to or from the Command. Arguments for custom commands always use siArgumentInput.
ArgumentHandler GetHandler | ( | ) | const |
Returns the ArgumentHandler, if any, of the Argument. Call ArgumentHandler::IsValid on the returned object to test whether there really is an ArgumentHandler.
Sets the ArgumentHandler of the argument based on the desired type.
in_strHandler | String from the ::siArgumentHandler enum, for example
Frame , SingleObj or
Collection . |
CStatus PutHandler | ( | ArgumentHandler & | in_Handler | ) |
Sets the ArgumentHandler of the argument by using an existing ArgumentHandler object.
in_Handler | An instance of an ArgumentHandler. Pass an uninitialized ArgumentHandler object to remove any existing ArgumentHandler. |