Public Member Functions
ArgumentHandler Class Reference

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

#include <xsi_argumenthandler.h>

Inheritance diagram for ArgumentHandler:
Inheritance graph
[legend]

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
ArgumentHandleroperator= (const ArgumentHandler &in_obj)
ArgumentHandleroperator= (const CRef &in_ref)

Constructor & Destructor Documentation

Default constructor.

Default destructor.

ArgumentHandler ( const CRef in_ref)

Constructor.

Parameters:
in_refconstant reference object.
ArgumentHandler ( const ArgumentHandler in_obj)

Copy constructor.

Parameters:
in_objconstant 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_ClassIDclass 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_objconstant 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_refconstant class object.
Returns:
The new ArgumentHandler object.

Reimplemented from SIObject.


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