# ArgumentHandler Class Reference

Related Scripting Object: ArgumentHandler

An argument handler is an object that helps determine the value that is passed to a Command. More...

`#include <xsi_argumenthandler.h>`

Inheritance diagram for ArgumentHandler:

List of all members.

## Public Member Functions
| ArgumentHandler ()
| ~ArgumentHandler ()
| ArgumentHandler (const CRef &in_ref)
| ArgumentHandler (const ArgumentHandler &in_obj)
bool | IsA (siClassID in_ClassID) const
siClassID | GetClassID () const
ArgumentHandler & | operator= (const ArgumentHandler &in_obj)
ArgumentHandler & | operator= (const CRef &in_ref)

## Detailed Description

An argument handler is an object that helps determine the value that is passed to a Command.

Argument handlers come into play when a command is invoked without providing a explicit value for an argument, or when the argument that was provided requires some processing before it can be sent to the command. For example the `Collection` argument handler can turn a string-based list of objects into a CValueArray representing those objects.

Argument handlers are widely used on built-in commands, and can be specified for custom commands (see ArgumentArray::AddWithHandler). They make it easier to implement flexible custom commands, and reduce the amount of error handling necessary inside the command implementation.

Once specified as part of the command definition they act behind the scenes during the process of the command invocation. Neither the caller nor the implementation need to explicitly manipulate ArgumentHandler objects.

Note:
  Internally the state of an argument handler is stored in the value of the argument.

See also:
  ArgumentArray::AddWithHandler, ArgumentArray::AddObjectArgument

Since:
  4.0

## Constructor & Destructor Documentation

ArgumentHandler | ( |  | ) |

Default constructor.

~ArgumentHandler | ( |  | ) |

Default destructor.

ArgumentHandler | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  | in_ref | constant reference object.

ArgumentHandler | ( | const ArgumentHandler & | in_obj | ) |

Copy constructor.

Parameters:

  | in_obj | constant class object.

## Member Function Documentation

bool IsA | ( | siClassID | in_ClassID | ) | const`[virtual]`

Returns true if a given class type is compatible with this API class.

Parameters:

  | in_ClassID | class type.

Returns:
  True if the class is compatible, false otherwise.

Reimplemented from SIObject.

siClassID GetClassID | ( |  | ) | const`[virtual]`

Returns the type of the API class.

Returns:
  The class type.

Reimplemented from SIObject.

ArgumentHandler& operator= | ( | const ArgumentHandler & | in_obj | ) |

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:

  | in_obj | constant class object.

Returns:
  The new ArgumentHandler object.

ArgumentHandler& operator= | ( | const CRef & | in_ref | ) |

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:

  | in_ref | constant class object.

Returns:
  The new ArgumentHandler object.

Reimplemented from SIObject.

The documentation for this class was generated from the following file:

- xsi_argumenthandler.h