DisplayRule is an item in DisplayRuleSet that represents a single rule. More...
#include <DisplayRules.h>
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... | |
| DisplayRuleActionPtrVector & | GetActions () |
| 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) | |
| RefCounted & | operator= (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) |
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.
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:
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.
| DisplayRulePtr Clone | ( | DgnFileR | dgnFile | ) | const |
Creates exact copy of an instance.
|
static |
Creates an instance of DisplayRule.
| [in] | condition | ECExpression string condition. |
| [in] | stopIfTrue | rule processing will stop if condition is met and this flag is set to true. |
| [in] | dgnFile | DgnFile that is associated with the rule. |
| bool Equals | ( | DisplayRuleCR | displayRule | ) | const |
Returns true if this and give DisplayRule are equal.
| DisplayRuleActionPtrVector& GetActions | ( | ) |
Returns actions associated with this DisplayRule.
| WStringCR GetCondition | ( | ) | const |
Returns ECExpression string condition.
| WStringCR GetConditionDescription | ( | ) | const |
Returns ECExpression string condition description.
| bool IsEnabled | ( | ) | const |
Identifies whether 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.