DisplayRules.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
11 #include "DgnPlatform.h"
12 #include "Bentley/RefCounted.h"
13 
14 #include <ECObjects/ECObjects.h>
15 #include <ECObjects/ECValue.h>
18 #include <DgnPlatform/DgnCore.h>
21 
22 #include <Bentley/bvector.h>
23 #include <Bentley/WString.h>
24 
26 
28 typedef bvector<DisplayRulePtr> DisplayRulePtrVector;
29 
31 typedef bvector<DisplayRuleSetPtr> DisplayRuleSetPtrVector;
32 
34 typedef bvector<DisplayRuleSetCP> DisplayRuleSetCPVector;
35 
36 
37 //=======================================================================================
95 //=======================================================================================
96 struct DisplayRule : public RefCountedBase
97  {
98  /*---------------------------------------------------------------------------------**/
106  public: DGNPLATFORM_EXPORT static DisplayRulePtr Create (WStringCR condition, bool stopIfTrue, DgnFileR dgnFile);
107 
108  /*---------------------------------------------------------------------------------**/
112  public: DGNPLATFORM_EXPORT bool Equals (DisplayRuleCR displayRule) const;
113 
114  /*---------------------------------------------------------------------------------**/
119  public: DGNPLATFORM_EXPORT bool IsEnabled () const;
120 
121  /*---------------------------------------------------------------------------------**/
125  public: DGNPLATFORM_EXPORT void SetIsEnabled(bool enabled);
126 
127  /*---------------------------------------------------------------------------------**/
131  public: DGNPLATFORM_EXPORT bool StopIfTrue () const;
132 
133  /*---------------------------------------------------------------------------------**/
137  public: DGNPLATFORM_EXPORT void SetStopIfTrue (bool stopIfTrue);
138 
139  /*---------------------------------------------------------------------------------**/
143  public: DGNPLATFORM_EXPORT WStringCR GetCondition () const;
144 
145  /*---------------------------------------------------------------------------------**/
149  public: DGNPLATFORM_EXPORT void SetCondition (WStringCR condition);
150 
151  /*---------------------------------------------------------------------------------**/
155  public: DGNPLATFORM_EXPORT WStringCR GetConditionDescription () const;
156 
157  /*---------------------------------------------------------------------------------**/
161  public: DGNPLATFORM_EXPORT void SetConditionDescription (WStringCR conditionDescription);
162 
163  /*---------------------------------------------------------------------------------**/
168  public: DGNPLATFORM_EXPORT DisplayRuleActionPtrVector& GetActions ();
169 
170  /*---------------------------------------------------------------------------------**/
174  public: DGNPLATFORM_EXPORT DisplayRulePtr Clone (DgnFileR dgnFile) const;
175 
176  }; // DisplayRule
177 
178 
179 //=======================================================================================
201 //=======================================================================================
203  {
204  /*---------------------------------------------------------------------------------**/
209  public: DGNPLATFORM_EXPORT static DisplayRuleSetPtr Create (WStringCR name, DgnFileR dgnFile);
210 
211  /*---------------------------------------------------------------------------------**/
215  public: DGNPLATFORM_EXPORT bool Equals (DisplayRuleSetCR displayRuleSet) const;
216 
217  /*---------------------------------------------------------------------------------**/
221  public: DGNPLATFORM_EXPORT WStringCR GetName () const;
222 
223  /*---------------------------------------------------------------------------------**/
227  public: DGNPLATFORM_EXPORT void SetName (WStringCR name);
228 
229  /*---------------------------------------------------------------------------------**/
234  public: DGNPLATFORM_EXPORT DgnFileR GetDgnFileR () const;
235 
236  /*---------------------------------------------------------------------------------**/
240  public: DGNPLATFORM_EXPORT DisplayRulePtrVector& GetDisplayRules ();
241 
242  /*---------------------------------------------------------------------------------**/
246  public: DGNPLATFORM_EXPORT DisplayRulePtrVector const & GetDisplayRulesC () const;
247 
248  /*---------------------------------------------------------------------------------**/
252  public: DGNPLATFORM_EXPORT DisplayRuleSetPtr Clone (DgnFileR dgnFile) const;
253 
254  /*---------------------------------------------------------------------------------**/
258  public: DGNPLATFORM_EXPORT bool IsUsedByDisplayStyle (DisplayStyleCR displayStyle) const;
259 
260  }; // DisplayRuleSet
261 
262 
265 
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
struct DgnPlatform::DisplayStyle const & DisplayStyleCR
Definition: DgnPlatform.h:241
struct Bentley::WString const & WStringCR
Definition: Bentley.h:239
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
bvector< DisplayRulePtr > DisplayRulePtrVector
A collection of DisplayRulePtr.
Definition: DisplayRules.h:28
A DgnFile is an in-memory representation of a physical file, regardless of its format.
Definition: DgnFile.h:308
DisplayRule is an item in DisplayRuleSet that represents a single rule.
Definition: DisplayRules.h:96
struct DgnPlatform::DisplayRuleSet const & DisplayRuleSetCR
Definition: DgnPlatform.h:558
A DisplayRuleSet is a named collection of DisplayRules that can be associated to any available Displa...
Definition: DisplayRules.h:202
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
struct DgnPlatform::DisplayRule const & DisplayRuleCR
Definition: DgnPlatform.h:557
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
bvector< DisplayRuleSetPtr > DisplayRuleSetPtrVector
A collection of DisplayRuleSetPtr.
Definition: DisplayRules.h:31
bvector< IDisplayRuleActionPtr > DisplayRuleActionPtrVector
A collection of IDisplayRuleActionPtr.
Definition: DisplayRuleActions.h:28
bvector< DisplayRuleSetCP > DisplayRuleSetCPVector
A collection of DisplayRuleSetCP.
Definition: DisplayRules.h:34

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