ECQuery.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 
10 #pragma managed(push, off)
11 
12 #include <ECObjects/ECObjectsAPI.h>
13 #include <DgnPlatform/DgnFile.h>
15 #include <DgnPlatform/DgnECTypes.h>
16 #include <Bentley/bvector.h>
17 #include <string>
18 #include <string.h>
19 #include "WhereCriterion.h"
20 
21 DGNPLATFORM_TYPEDEFS(ECSubstringPropertyValueFilter);
22 DGNPLATFORM_TYPEDEFS (IECPropertyValueFilter);
24 
25 
28 
29 
30 /*---------------------------------------------------------------------------------**/
34 
36 {
37 public:
38  ECN::SchemaNameClassNamePair m_class;
41  SearchClass (WStringCR schemaName, WStringCR className, bool isPoly) : m_class (schemaName, className), m_isPolymorphic(isPoly) {}
42 };
43 
44 typedef bvector<SearchClass> SearchClassList;
45 
46 /*=================================================================================**/
54  {
55 private:
56 public:
59  DGNPLATFORM_EXPORT ECN::PrimitiveType GetRequiredPrimitiveType();
64  DGNPLATFORM_EXPORT bool ConsiderChildValues (ECN::ECPropertyValueCR parentPropertyValue);
68  DGNPLATFORM_EXPORT bool Accept (ECN::ECPropertyValueCR propertyValue);
69 
72  DGNPLATFORM_EXPORT IECPropertyValueFilter* GetChainedFilter();
76  DGNPLATFORM_EXPORT void AddChainedFilter (IECPropertyValueFilter& chainedFilter);
77  };
78 
81 
82 /*=================================================================================**/
91  {
92 
95  }; // ECSubstringPropertyValueFilter
96 
97 
98 /*=================================================================================**/
113 {
114 private:
115  virtual void MakeClassAbstract() = 0;
116 public:
117 public:
119  DGNPLATFORM_EXPORT static ECQueryPtr CreateQuery(ECQueryCR query, bool copyWhereCriteria);
120 
123 
125  DGNPLATFORM_EXPORT static ECQueryPtr CreateQuery(WCharCP schemaName, WCharCP className, bool isPolymorphic = false);
126 
128  DGNPLATFORM_EXPORT static ECQueryPtr CreateQuery(ECN::ECClassCR ecClass, bool isPolymorphic = false);
129 
132  DGNPLATFORM_EXPORT void SetSelectProperties(bool value);
133 
138  DGNPLATFORM_EXPORT void AddSearchClass (WCharCP schemaName, WCharCP className, bool isPolymorphic = false);
139 
142  DGNPLATFORM_EXPORT void SetWhereCriterion (WhereCriterion& wh);
143 
145  DGNPLATFORM_EXPORT void AddPropertyNameToSelect (WCharCP propertyName);
146 
164  DGNPLATFORM_EXPORT void SetPropertyValuePreFilter (IECPropertyValueFilter* f);
165 
166 };
169 
170 #pragma managed(pop)
struct DgnPlatform::ECQuery const & ECQueryCR
Definition: DgnPlatform.h:532
Accepts or rejects property values.
Definition: ECQuery.h:53
! A search class represents a schema name class name pair that can be used to execute a query ! using...
Definition: ECQuery.h:35
An ECQuery is somewhat analogous to a SQL query and is used with DgnECManager::FindElementInstances t...
Definition: ECQuery.h:112
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
SearchClass(WStringCR schemaName, WStringCR className, bool isPoly)
Initialize a search class to be used in the ECQuery.
Definition: ECQuery.h:41
ECN::SchemaNameClassNamePair m_class
Definition: ECQuery.h:38
struct Bentley::WString const & WStringCR
Definition: Bentley.h:239
bool m_isPolymorphic
Definition: ECQuery.h:39
ECQueryProcessFlags
Definition: WhereCriterion.h:33
bvector< SearchClass > SearchClassList
Definition: ECQuery.h:44
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
wchar_t const * WCharCP
Definition: Bentley.h:224
RefCountedPtr< ECSubstringPropertyValueFilter > ECSubstringPropertyValueFilterPtr
Definition: ECQuery.h:80
PrimitiveType
Enumeration of primitive datatypes supported by native "ECObjects" implementation.
Definition: ECObjects.h:322
ECPropertyValue const & ECPropertyValueCR
Definition: ECObjects.h:74
#define DGNPLATFORM_TYPEDEFS(_name_)
Definition: DgnPlatform.h:73
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
An IECPropertyValueFilter that accepts or rejects property values that contain a specified sub-string...
Definition: ECQuery.h:90
ECClass const & ECClassCR
Definition: ECObjects.h:63
#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
A WhereCriterion is used in the "where clause" of an ECQuery.
Definition: WhereCriterion.h:146
RefCountedPtr< IECPropertyValueFilter > IECPropertyValueFilterPtr
Definition: ECQuery.h:79

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