Public Member Functions
ProxyParameter Class Reference

Detailed Description

A ProxyParameter is a kind of Parameter that can be created on a CustomProperty which is "linked" with the value of another Parameter somewhere else in the Scene.

Both the "Master Parameter" and the ProxyParameter always have the same value and changing the value of the proxy parameter is equivalent to changing the value of the master parameter.

See also:
CustomProperty::AddProxyParameter
Example:
        using namespace XSI;

        Application app;
        Model root = app.GetActiveSceneRoot();

        CustomProperty cpset;
        root.AddCustomProperty(L"MyCustomPSet", false, cpset );

        // For demonstration purposes,
        // get reference to rotx on the default scene camera

        CRef crefProxiedParam;
        crefProxiedParam.Set(L"Camera_Root.kine.local.rotx");

        // Create proxy parameter to this camera parameter
        ProxyParameter returnedProxyParam = cpset.AddProxyParameter(Parameter(crefProxiedParam)) ;

        // Changing the proxy parameter will update the value on the camera object
        returnedProxyParam.PutValue( 47.0 ) ;

        CString strRotX = Parameter( crefProxiedParam ).GetValue().GetAsText() ;
        app.LogMessage( L"After changing proxy param value the rot X is " + strRotX ) ;

        // You can remove a proxy parameter like this
        cpset.RemoveParameter( returnedProxyParam ) ;

#include <xsi_proxyparameter.h>

Inheritance diagram for ProxyParameter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  ProxyParameter ()
  ~ProxyParameter ()
  ProxyParameter (const CRef &in_ref)
  ProxyParameter (const ProxyParameter &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
ProxyParameter operator= (const ProxyParameter &in_obj)
ProxyParameter operator= (const CRef &in_ref)
Parameter  GetMasterParameter () const

Constructor & Destructor Documentation

Default constructor.

Default destructor.

ProxyParameter ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.
ProxyParameter ( const ProxyParameter 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 Parameter.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from Parameter.

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

Reimplemented from Parameter.

Parameter GetMasterParameter ( ) const

Returns the parameter that is referenced by a proxy parameter. If this parameter is not a proxy parameter then an empty object is returned.

Returns:
The real Parameter that the ProxyParameter clones.

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