Public Member Functions

IParamArray Class Reference

This reference page is linked to from the following overview topics: Deriving from IParamArray, Adding the Roll-up to the Command Panel.


Search for all occurrences

Detailed Description

See also:
Class IParamBlock, Class IParamMap.

Description:
This class represents a virtual array of parameters. Parameter are accessed using an integer index and GetValue() and SetValue() methods. Parameter blocks are one such implementation of this class, but it can also be useful to implement a class that abstracts non-parameter block variables. The ParamMap class uses this base class so that a ParamMap can be used to control UI for not only parameter blocks but also variables stored outside of parameter blocks. The Advanced Topics section on Parameter Maps discusses how this is done.
Default implementation of these methods are provided which simply return FALSE.

#include <iparamb.h>

Inheritance diagram for IParamArray:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual BOOL  SetValue (int i, TimeValue t, float v)
virtual BOOL  SetValue (int i, TimeValue t, int v)
virtual BOOL  SetValue (int i, TimeValue t, Point3 &v)
virtual BOOL  GetValue (int i, TimeValue t, float &v, Interval &ivalid)
virtual BOOL  GetValue (int i, TimeValue t, int &v, Interval &ivalid)
virtual BOOL  GetValue (int i, TimeValue t, Point3 &v, Interval &ivalid)
virtual IParamBlock GetParamBlock ()
virtual BOOL  KeyFrameAtTime (int i, TimeValue t)

Member Function Documentation

virtual BOOL SetValue ( int  i,
TimeValue  t,
float  v 
) [inline, virtual]
Remarks:
This method is called when the system needs to store a value into a variable. There are overloaded functions for each type of value to set (int, float, and Point3). Each method has three parameters. Below is the float version - the others are similar.
Parameters:
int i

This is the index into the virtual array of the value to set.

TimeValue t

This is the time at which to set the value.

float v

This is the value to set.
Returns:
This is not currently used.

Reimplemented in IParamBlock.

{return FALSE;}
virtual BOOL SetValue ( int  i,
TimeValue  t,
int  v 
) [inline, virtual]
Remarks:
This is the integer version of above.

Reimplemented in IParamBlock.

{return FALSE;}
virtual BOOL SetValue ( int  i,
TimeValue  t,
Point3 v 
) [inline, virtual]
Remarks:
This is the Point3 version of above.

Reimplemented in IParamBlock.

{return FALSE;}
virtual BOOL GetValue ( int  i,
TimeValue  t,
float &  v,
Interval ivalid 
) [inline, virtual]
Remarks:
Whenever the developer needs to retrieve a value from the parameter block, the GetValue() method is used. There are overloaded functions for each type of value to retrieve (int, float, Point3, and Color). Each method has four parameters:
Parameters:
int i

This is the index into the virtual array of the value to retrieve.

TimeValue t

This is the time at which to retrieve the value. For constants pass 0.

float &v

This is the value to retrieve.

Interval &ivalid

This is the validity interval to update to reflect the validity of this parameter.
Returns:
If the value was retrieved TRUE is returned; otherwise FALSE is returned.

Reimplemented in IParamBlock.

{return FALSE;}
virtual BOOL GetValue ( int  i,
TimeValue  t,
int &  v,
Interval ivalid 
) [inline, virtual]
Remarks:
This is the integer version of above.

Reimplemented in IParamBlock.

{return FALSE;}
virtual BOOL GetValue ( int  i,
TimeValue  t,
Point3 v,
Interval ivalid 
) [inline, virtual]
Remarks:
This is the Point3 version of above.

Reimplemented in IParamBlock.

{return FALSE;}
virtual IParamBlock* GetParamBlock ( ) [inline, virtual]
Remarks:
Implemented by the System.

If the array uses a parameter block, this method will return a pointer to it, otherwise it will return NULL. Note that casting won't work because of multiple inheritance.
Returns:
Returns a pointer to the parameter block if one is used; NULL otherwise.

Reimplemented in IParamBlock.

{return NULL;}
virtual BOOL KeyFrameAtTime ( int  i,
TimeValue  t 
) [inline, virtual]
Remarks:
This method is available in release 2.0 and later only.

Checks to see if a keyframe exists for the given parameter at the given time. Returns TRUE if a keyframe exists at the specified time; otherwise FALSE.
Parameters:
int i

Zero based index of the parameter to check.

TimeValue t

The time to check.
Default Implementation:
{return FALSE;}
{return FALSE;}

IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray
IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray IParamArray