Public Member Functions
Expression Class Reference

Detailed Description

An expression string is a mathematical formula that controls any animatable parameter. It may include object and parameter names, mathematical operators, and tokens representing functions or constants.

The Expression object has an expression string (stored in the definition parameter) and can be created with the AddExpr command. If a parameter value is driven by an expression you can get this expression using Parameter::GetSource.

See also:
        using namespace XSI;
        Application app;
        Model root = app.GetActiveSceneRoot();

        Null myNull;
        root.AddNull( L"myNull", myNull );

        Parameter posx = myNull.GetParameter(L"posx");

        CValueArray args(2);
        CValue      outArg;
        args[0] = posx.GetFullName();
        args[1] = posx.GetFullName() + L" + 4.0";

        app.ExecuteCommand(L"AddExpr", args, outArg);

        Expression myPosxExpr = posx.GetSource();
        Parameter myDefinition = myPosxExpr.GetParameter(L"definition");

        app.LogMessage(L"The expression definition is " +

#include <xsi_expression.h>

Inheritance diagram for Expression:
Inheritance graph

List of all members.

Public Member Functions

  Expression ()
  ~Expression ()
  Expression (const CRef &in_ref)
  Expression (const Expression &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
Expression operator= (const Expression &in_obj)
Expression operator= (const CRef &in_ref)

Constructor & Destructor Documentation

Default constructor.

~Expression ( )

Default destructor.

Expression ( const CRef in_ref )


in_ref constant reference object.
Expression ( const Expression in_obj )

Copy constructor.

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.

in_ClassID class type.
true if the class is compatible, false otherwise.

Reimplemented from Operator.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

The class type.

Reimplemented from Operator.

Expression& operator= ( const Expression in_obj )

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.
The new Expression object.
Expression& 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.

in_ref constant class object.
The new Expression object.

Reimplemented from Operator.

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