Public Member Functions | Static Public Member Functions | List of all members
DisplayRule Struct Reference

DisplayRule is an item in DisplayRuleSet that represents a single rule. More...

#include <DisplayRules.h>

Inheritance diagram for DisplayRule:
RefCountedBase RefCounted< IRefCounted > IRefCounted

Public Member Functions

bool Equals (DisplayRuleCR displayRule) const
 Returns true if this and give DisplayRule are equal. More...
 
bool IsEnabled () const
 Identifies whether DisplayRule is enabled. More...
 
void SetIsEnabled (bool enabled)
 Sets IsEnabled flag to given value. More...
 
bool StopIfTrue () const
 Returns true if rule processing should stop then this rule is met. More...
 
void SetStopIfTrue (bool stopIfTrue)
 Sets StopIfTrue value that controls whether rule processing should stop then this rule is met. More...
 
WStringCR GetCondition () const
 Returns ECExpression string condition. More...
 
void SetCondition (WStringCR condition)
 Sets given ECExpression string condition. More...
 
WStringCR GetConditionDescription () const
 Returns ECExpression string condition description. More...
 
void SetConditionDescription (WStringCR conditionDescription)
 Sets given ECExpression string condition description. More...
 
DisplayRuleActionPtrVectorGetActions ()
 Returns actions associated with this DisplayRule. More...
 
DisplayRulePtr Clone (DgnFileR dgnFile) const
 Creates exact copy of an instance. More...
 
- Public Member Functions inherited from RefCounted< IRefCounted >
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 
UInt32 AddRef () const
 
UInt32 Release () const
 
 RefCounted ()
 
 RefCounted (RefCounted const &rhs)
 
RefCountedoperator= (RefCounted const &rhs)
 
UInt32 GetRefCount () const
 

Static Public Member Functions

static DisplayRulePtr Create (WStringCR condition, bool stopIfTrue, DgnFileR dgnFile)
 Creates an instance of DisplayRule. More...
 

Additional Inherited Members

- Protected Member Functions inherited from RefCounted< IRefCounted >
virtual ~RefCounted ()
 
- Protected Member Functions inherited from IRefCounted
virtual ~IRefCounted ()
 
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 

Detailed Description

DisplayRule is an item in DisplayRuleSet that represents a single rule.

It defines a condition and list of actions that should be applied to the elements when condition is met.

Condition

DisplayRule condition is based on ECExpressions. It is a string based script that is parsed and evaluated by DisplayRules. Condition supports simple property value comparison as well as complicated conditions with AND and OR operators, grouping and property to property comparisons.

Conditions can access properties comming from different hosts:

Condition format and types:

Note:

Actions

DisplayRules actions specifies how element representation should be changed. Singe rule can specify multiple actions, but only one of the same type should exist in the list.

See also
DisplayRuleSet for set of display rules.
DisplayRulesManager for more details how to manage DisplayRuleSets in the file.
Remarks
Required library : DgnPlatform<ApiNumber>.lib i.e. DgnPlatform5.lib

Member Function Documentation

DisplayRulePtr Clone ( DgnFileR  dgnFile) const

Creates exact copy of an instance.

static DisplayRulePtr Create ( WStringCR  condition,
bool  stopIfTrue,
DgnFileR  dgnFile 
)
static

Creates an instance of DisplayRule.

Parameters
[in]conditionECExpression string condition.
[in]stopIfTruerule processing will stop if condition is met and this flag is set to true.
[in]dgnFileDgnFile that is associated with the rule.
Returns
DisplayRule instance ref counted pointer.
bool Equals ( DisplayRuleCR  displayRule) const

Returns true if this and give DisplayRule are equal.

DisplayRuleActionPtrVector& GetActions ( )

Returns actions associated with this DisplayRule.

See also
IDisplayRuleAction for more details.
WStringCR GetCondition ( ) const

Returns ECExpression string condition.

WStringCR GetConditionDescription ( ) const

Returns ECExpression string condition description.

bool IsEnabled ( ) const

Identifies whether DisplayRule is enabled.

Returns
true if DisplayRule is enabled.
void SetCondition ( WStringCR  condition)

Sets given ECExpression string condition.

void SetConditionDescription ( WStringCR  conditionDescription)

Sets given ECExpression string condition description.

void SetIsEnabled ( bool  enabled)

Sets IsEnabled flag to given value.

void SetStopIfTrue ( bool  stopIfTrue)

Sets StopIfTrue value that controls whether rule processing should stop then this rule is met.

bool StopIfTrue ( ) const

Returns true if rule processing should stop then this rule is met.


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

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