DisplayFilter.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 
13 
14 /*=================================================================================**/
18  {
19  enum TestMode
20  {
21  TestMode_Equal = 1,
22  TestMode_NotEqual = 2,
23  TestMode_LessThan = 3,
24  TestMode_GreaterThan = 4,
25  };
26 
28  {
29  Orientation_Top = 1,
30  Orientation_Elevation = 2,
31  };
32 
33  enum ViewFlag
34  {
35  ViewFlag_BoundaryDisplay = 1,
36  ViewFlag_Constructions = 2,
37  ViewFlag_Dimensions = 3,
38  ViewFlag_DataFields = 4,
39  ViewFlag_Fill = 5,
40  ViewFlag_Grid = 6,
41  ViewFlag_LevelOverrides = 7,
42  ViewFlag_LineStyles = 8,
43  ViewFlag_LineWeights = 9,
44  ViewFlag_Patterns = 10,
45  ViewFlag_Tags = 11,
46  ViewFlag_Text = 12,
47  ViewFlag_Textnodes = 13,
48  ViewFlag_Transparency = 14,
49  ViewFlag_HideNamedPresentation = 15,
50  };
51 
52  enum ViewXFlag
53  {
54  ViewXFlag_ExampleCenterline = 9999,
55  };
56 
58  {
59  ViewXInteger_LevelOfDetail = 1,
60  };
61 
63  {
64  ViewContextFlag_ShowFieldBackground = 1,
65  };
66 
68  {
69  DrawingAttachmentType_None = 0,
70  DrawingAttachmentType_Plan = 1,
71  DrawingAttachmentType_Elevation = 2,
72  DrawingAttachmentType_Section = 3,
73  DrawingAttachmentType_Detail = 4,
74  DrawingAttachmentType_Markup = 5,
75  DrawingAttachmentType_Other = 0xffff,
76  };
77 
78 
80  {
81  LevelOfDetail_Fine = 0,
82  LevelOfDetail_Medium = 1,
83  LevelOfDetail_Coarse = 2,
84  };
85 
86  /*=================================================================================**/
91  {
92  protected:
93  virtual void _GetData (bvector<byte>& data) const = 0;
94  virtual enum DisplayFilterOpCode _GetOpCode () const = 0;
95  virtual size_t _GetOpSize () const = 0;
96 
97  public:
98  void Append (bvector<byte>& data) const;
99  size_t GetOpSize () const;
100  }; // Operator
101 
103 
104  DGNPLATFORM_EXPORT static OperatorPtr And (Operator& op1, Operator& op2);
105  DGNPLATFORM_EXPORT static OperatorPtr Or (Operator& op1, Operator& op2);
106  DGNPLATFORM_EXPORT static OperatorPtr Not (Operator& operand);
107 
108  DGNPLATFORM_EXPORT static OperatorPtr CreateDrawPurposeTest (DrawPurpose purpose, TestMode testMode);
109  DGNPLATFORM_EXPORT static OperatorPtr CreateRenderModeTest (MSRenderMode renderMode, TestMode testMode);
110 
111  DGNPLATFORM_EXPORT static OperatorPtr CreateViewFlagTest (ViewFlag viewFlag, bool testState);
112  DGNPLATFORM_EXPORT static OperatorPtr CreateViewXFlagTest (ViewXFlag viewFlag, bool trueIfXAttributePresent, bool testState);
113  DGNPLATFORM_EXPORT static OperatorPtr CreateViewXIntegerTest (ViewXInteger viewXInteger, Int32 testValue, TestMode testMode);
114  DGNPLATFORM_EXPORT static OperatorPtr CreateLevelOfDetailTest (LevelOfDetail lod, TestMode testMode);
115  DGNPLATFORM_EXPORT static OperatorPtr CreateViewSizeTest (DPoint3dCR origin, double pixelSize, bool largerThan);
116  DGNPLATFORM_EXPORT static OperatorPtr CreateClipVolumePassTest (ClipVolumePass pass, TestMode testMode);
117  DGNPLATFORM_EXPORT static OperatorPtr CreateLevelTest (LevelId level);
118  DGNPLATFORM_EXPORT static OperatorPtr CreateInViewletTest (bool testState);
119  DGNPLATFORM_EXPORT static OperatorPtr CreateViewOrientationTest (Orientation orientation, TestMode testMode);
120  DGNPLATFORM_EXPORT static OperatorPtr CreateDrawingAttachmentTypeTest (DrawingAttachmentType attachmentType, TestMode testMode);
121  DGNPLATFORM_EXPORT static OperatorPtr CreateViewAxisAngleTest (DVec3dCR axis, double angle, TestMode testMode);
122  DGNPLATFORM_EXPORT static OperatorPtr CreateViewContextFlagTest (ViewContextFlag flag, bool testState);
123 
126  DGNPLATFORM_EXPORT static OperatorPtr CreatePresentationFormIdTest (WCharCP formId);
127 
130  DGNPLATFORM_EXPORT static OperatorPtr CreatePresentationFormFlagTest (WCharCP formFlag);
131 
132  DGNPLATFORM_EXPORT static bool If (ViewContextR viewContext, ElementHandleCP element, Operator const& filterOperator);
133  DGNPLATFORM_EXPORT static bool ElseIf (ViewContextR viewContext, ElementHandleCP element, Operator const& filterOperator);
134  DGNPLATFORM_EXPORT static bool Else (ViewContextR viewContext);
135  DGNPLATFORM_EXPORT static void End (ViewContextR viewContext);
136 
137  DGNPLATFORM_EXPORT static void SetViewXFlag (DynamicViewSettingsR dvSettings, ViewXFlag xFlag, bool state, bool trueIfXAttributePresent);
138  DGNPLATFORM_EXPORT static bool GetViewXFlag (DynamicViewSettingsCR dvSettings, ViewXFlag xFlag, bool trueIfXAttributePresent);
139 
140  DGNPLATFORM_EXPORT static void SetViewXInteger (DynamicViewSettingsR dvSettings, ViewXInteger xInteger, Int32 value);
141  DGNPLATFORM_EXPORT static Int32 GetViewXInteger (DynamicViewSettingsCR dvSettings, ViewXInteger xInteger);
142 
143  }; // DisplayFilter
144 
146 
147 
148 
149 
150 
151 
152 
153 
154 
LevelOfDetail
Definition: DisplayFilter.h:79
Definition: ViewContext.h:358
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
Open for both read and write.
ClipVolumePass
Definition: DgnPlatform.h:1439
UInt32 LevelId
Definition: DgnPlatformBaseType.r.h:85
RefCountedPtr< Operator > OperatorPtr
Definition: DisplayFilter.h:102
DrawPurpose
Definition: DgnPlatform.h:1548
Definition: DisplayFilter.h:17
DrawingAttachmentType
Definition: DisplayFilter.h:67
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
TestMode
Definition: DisplayFilter.h:19
wchar_t const * WCharCP
Definition: Bentley.h:224
MSRenderMode
Definition: DgnPlatform.r.h:401
ViewContextFlag
Definition: DisplayFilter.h:62
int32_t Int32
Definition: Bentley.r.h:119
Definition: DisplayFilter.h:90
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
struct DgnPlatform::ElementHandle const * ElementHandleCP
Definition: DgnPlatform.h:260
ViewXFlag
Definition: DisplayFilter.h:52
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
ViewXInteger
Definition: DisplayFilter.h:57
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
Curve's end point.
ViewFlag
Definition: DisplayFilter.h:33
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
Orientation
Definition: DisplayFilter.h:27
struct DgnPlatform::DynamicViewSettings const & DynamicViewSettingsCR
Definition: DgnPlatform.h:253
struct DVec3d const & DVec3dCR
Definition: msgeomstructs_typedefs.h:89
This class has a collection of settings used by dynamic view to apply its clip volume.
Definition: ViewContext.h:155
DisplayFilterOpCode
Definition: DisplayFilterManager.h:26

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