Rogue Wave Views
Prototypes Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvAccessorParameter Class Reference

Provides information for a single parameter of an IlvUserAccessor. More...

#include <ilviews/protos/useracc.h>

Public Member Functions

 IlvAccessorParameter (IlUInt count,...)
 Constructor. More...
 
virtual const char ** getChoices (IlvAccessorHolder *object, const char **params, IlUInt paramIndex, IlBoolean matchType, const IlvValueTypeClass *&type, IlUInt &count)
 Returns the possible choices for this accessor parameter. More...
 
virtual const IlvValueTypeClassgetType (IlvAccessorHolder *object, const char **params, IlUInt paramIndex, const IlvValueTypeClass *myType)
 Returns the "preferred" type of this accessor parameter. More...
 

Detailed Description

Provides information for a single parameter of an IlvUserAccessor.

Library: ilvproto

This class is used with the IlvAccessorDescriptor class. For every parameter of an IlvUserAccessor subclass, you must provide the address of a pointer to an instance of an IlvAccessorParameter subclass. The class has a constructor that lets you directly specify the possible values of an enumerated parameter. You can also use predefined instances of subclasses of IlvAccessorParameter for various types of parameters (for more information, see IlvAccessorDescriptor).

See also
IlvAccessorDescriptor, IlvRegisterUserAccessorClass(), IlvUserAccessor, IlvUnknownAccessorParameterType, IlvStringParameterType, IlvNodeNameParameterType, IlvNodeNameOrAllParameterType, IlvOutputAccessorParameterType, IlvNodeAccessorParameterType, IlvSubAccessorParameterType, IlvValueParameterType.

Constructor & Destructor Documentation

IlvAccessorParameter::IlvAccessorParameter ( IlUInt  count,
  ... 
)

Constructor.

Initializes an accessor parameter type for a parameter that can have a number of fixed values.

Parameters
countThe number of possible values. It is followed by arguments of type const char*, which represent possible parameter values.

Member Function Documentation

virtual const char** IlvAccessorParameter::getChoices ( IlvAccessorHolder object,
const char **  params,
IlUInt  paramIndex,
IlBoolean  matchType,
const IlvValueTypeClass *&  type,
IlUInt count 
)
virtual

Returns the possible choices for this accessor parameter.

The object parameter is the object to which the accessor is attached (usually an object of the type IlvPrototype). The params parameter represents the current values of the parameters given the contextual information provided in the object and params parameters. paramIndex specifies the parameter number. If matchType is IlTrue, this method should only return the choices that match the preferred type of this parameter (the preferred type is determined by the getType() method). The type argument is initialized with the type of the accessor (as specified in the "Type" field of the Prototype Inspector), and it can be changed by the method. In this case, the new type will be used as the preferred type by Studio (see the getType() method). The number of strings returned is stored in count. The returned array is allocated using the new[] operator and it will be released when it is no longer needed, by using the delete[] operator.

virtual const IlvValueTypeClass* IlvAccessorParameter::getType ( IlvAccessorHolder object,
const char **  params,
IlUInt  paramIndex,
const IlvValueTypeClass myType 
)
virtual

Returns the "preferred" type of this accessor parameter.

The preferred type is used for two purposes:

  1. To present the user with the choices that are the most pertinent for this parameter (that is, only the accessors of type Color).
  2. To let Studio set up special editing fields for this type (that is, a color selector).

The preferred type can be fixed for this parameter, or it can vary at run-time depending on the values of other parameters. object is the object to which the accessor is attached (usually an object of the type IlvPrototype). params are the parameter values that have already been entered by the user in the matrix. paramIndex specifies the row of the parameter in the matrix. type is the accessor type (as specified in the "Type" field of the Prototype Inspector).


© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.