# UpdateContext Class Reference

Related Scripting Object: UpdateContext

This object represents the operator update context. It gives access to the operator and the evaluation time. The UpdateContext is only valid within the context of the Update() function for operators that are based on a Preset and SPDL. Self-Installed CustomOperators use the OperatorContext object instead. More...

`#include <xsi_updatecontext.h>`

Inheritance diagram for UpdateContext:

List of all members.

## Public Member Functions
| UpdateContext ()
| ~UpdateContext ()
| UpdateContext (const CRef &in_ref)
| UpdateContext (const UpdateContext &in_obj)
bool | IsA (siClassID in_ClassID) const
siClassID | GetClassID () const
UpdateContext & | operator= (const UpdateContext &in_obj)
UpdateContext & | operator= (const CRef &in_ref)
Operator | GetOperator ()
double | GetCurrentFrame ()
CValue | GetUserData ()
CStatus | PutUserData (const CValue &in_val)

## Detailed Description

This object represents the operator update context. It gives access to the operator and the evaluation time. The UpdateContext is only valid within the context of the Update() function for operators that are based on a Preset and SPDL. Self-Installed CustomOperators use the OperatorContext object instead.

See also:
  Operator, OperatorContext

## Constructor & Destructor Documentation

UpdateContext | ( |  | ) |

Default constructor.

~UpdateContext | ( |  | ) |

Default destructor.

UpdateContext | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  | in_ref | constant reference object.

UpdateContext | ( | const UpdateContext & | 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.

UpdateContext& operator= | ( | const UpdateContext & | 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 UpdateContext object.

UpdateContext& 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 UpdateContext object.

Reimplemented from SIObject.

Operator GetOperator | ( |  | ) |

Returns the Operator object for the update context.

Returns:
  The current Operator.

double GetCurrentFrame | ( |  | ) |

Returns the time in frames at which the Operator is being evaluated.

Returns:
  Time (frame) at which the Operator is being evaluated.

CValue GetUserData | ( |  | ) |

Returns the user data stored in the UpdateContext.

Returns:
  The user data.

CStatus PutUserData | ( | const CValue & | in_val | ) |

Sets user data which is passed to the compiled scripted operator from evaluation to evaluation.

Parameters:

  | in_val | user data to be set for the operator instance.

Returns:
  CStatus::OK success

  CStatus::Fail failure.

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

- xsi_updatecontext.h