Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ParameterDefinition Struct Reference

Defines the metadata describing a parameter. More...

#include <ParametricModeling.h>

Public Member Functions

DGNPLATFORM_EXPORT ParameterDefinition ()
 Default-constructor. Produces a ParameterDefinition of type "Unknown". More...
 
DGNPLATFORM_EXPORT ParameterDefinition (ParameterDefinitionCR other)
 Copy-constructor. More...
 
WCharCP GetDisplayLabel () const
 Returns the user-visible parameter name. More...
 
WCharCP GetAccessString () const
 Returns the internal access string which is used to refer to the parameter in code. More...
 
ParameterType GetType () const
 Returns the parameter type. More...
 
bool IsDefinitionScope () const
 If true, when the parametric model is placed as a cell, the value of this parameter cannot be overridden per-cell. More...
 
bool IsHidden () const
 If true, when the parametric model is placed as a cell, this parameter will not be shown as a property of the cell. More...
 
bool IsDomainParameter () const
 If true, this parameter originates from a pre-defined ECClass supplied by the creator of the component. More...
 
bool IsCalculated () const
 If true, this parameter's value is calculated using an expression, and otherwise treated as read-only. More...
 
void SetDisplayLabel (WCharCP label)
 Sets the user-visible parameter name. More...
 
void SetIsHidden (bool hidden)
 Sets whether this parameter will be hidden when the parametric model is placed as a cell. More...
 
void SetDefinitionScope (bool isDefinitionScope)
 Sets whether this parameter's value is not allowed to be overridden when the parametric model is placed as a cell. More...
 
DGNPLATFORM_EXPORT ParameterStatus SetType (ParameterType type)
 Changes the type of this parameter. More...
 

Protected Types

enum  Flags {
  kFlag_None = 0, kFlag_DefinitionScope = 1 << 0, kFlag_Hidden = 1 << 1, kFlag_DomainParameter = 1 << 2,
  kFlag_Calculated = 1 << 3
}
 

Protected Member Functions

bool GetFlag (Flags flag) const
 
void SetFlag (Flags flag, bool on)
 

Protected Attributes

WString m_displayLabel
 
WString m_accessString
 
ParameterType m_type
 
Flags m_flags
 

Detailed Description

Defines the metadata describing a parameter.

There are two broad types of parameters: "domain" parameters and "working" parameters. Domain parameters are defined by an ECClass supplied by the creator of the component. For example, if the component represents a door and the user already has an ECClass containing common "door" properties, those properties can be used as inputs to the parametric model. Additionally, the creator can create any number of additional "working" parameters.

Remarks
Required library : DgnPlatform<ApiNumber>.lib i.e. DgnPlatform5.lib

Member Enumeration Documentation

enum Flags
protected
Enumerator
kFlag_None 
kFlag_DefinitionScope 
kFlag_Hidden 
kFlag_DomainParameter 
kFlag_Calculated 

Constructor & Destructor Documentation

Default-constructor. Produces a ParameterDefinition of type "Unknown".

DGNPLATFORM_EXPORT ParameterDefinition ( ParameterDefinitionCR  other)

Copy-constructor.

Member Function Documentation

WCharCP GetAccessString ( ) const

Returns the internal access string which is used to refer to the parameter in code.

WCharCP GetDisplayLabel ( ) const

Returns the user-visible parameter name.

bool GetFlag ( Flags  flag) const
protected
ParameterType GetType ( ) const

Returns the parameter type.

bool IsCalculated ( ) const

If true, this parameter's value is calculated using an expression, and otherwise treated as read-only.

bool IsDefinitionScope ( ) const

If true, when the parametric model is placed as a cell, the value of this parameter cannot be overridden per-cell.

bool IsDomainParameter ( ) const

If true, this parameter originates from a pre-defined ECClass supplied by the creator of the component.

bool IsHidden ( ) const

If true, when the parametric model is placed as a cell, this parameter will not be shown as a property of the cell.

void SetDefinitionScope ( bool  isDefinitionScope)

Sets whether this parameter's value is not allowed to be overridden when the parametric model is placed as a cell.

void SetDisplayLabel ( WCharCP  label)

Sets the user-visible parameter name.

void SetFlag ( Flags  flag,
bool  on 
)
protected
void SetIsHidden ( bool  hidden)

Sets whether this parameter will be hidden when the parametric model is placed as a cell.

Changes the type of this parameter.

Member Data Documentation

WString m_accessString
protected
WString m_displayLabel
protected
Flags m_flags
protected
ParameterType m_type
protected

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

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.