DgnECProviders.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 "DgnECInstance.h"
14 #include "DgnECFinders.h"
15 
16 #include <Bentley/bvector.h>
17 
18 DGNPLATFORM_TYPEDEFS(IDgnECInstanceLocator);
19 DGNPLATFORM_TYPEDEFS(DgnECRelationshipInfo);
20 DGNPLATFORM_TYPEDEFS(IDgnECRelationshipProvider);
21 DGNPLATFORM_TYPEDEFS(SchemaUpdateOptions);
22 
24 
27 
28 
30 static const UInt16 DgnECProviderId_ECXAttributes = 0x56FF;
31 
33 static const UInt16 DgnECProviderId_ECXData = 0xECDA;
34 
36 static const UInt16 DgnECProviderId_Element = 0xECDB;
37 
39 static const UInt16 DgnECProviderId_Model = 0xEC01;
40 
42 static const UInt16 DgnECProviderId_File = 0xEC02;
43 
45 static const UInt16 DgnECProviderId_FileExtrinsic = 0xEC03;
46 
48 static const UInt16 DgnECProviderId_ModelExtrinsic = 0xEC0C;
49 
51 static const UInt16 DgnECProviderId_Link = 0xEC04;
52 
54 static const UInt16 DgnECProviderId_View = 0xEC05;
55 
57 static const UInt16 DgnECProviderId_Attachment = 0x5971;
58 
60 static const UInt16 DgnECProviderId_Level = 0x5972;
62 static const UInt16 DgnECProviderId_Invalid = 0;
64  {
69  };
70 
73 {
74 private:
75  virtual void MakeClassAbstract() = 0;
76 public:
77 };
78 
80 
85 struct SchemaInfo
86 {
87 private:
88  ECN::SchemaKey m_key;
89  WString m_providerName;
90  DgnFileP m_dgnFile;
91  UInt32 m_elementcheckSum;
92  bool m_storedSchema;
93  WString m_location;
94  SchemaInfoExtPtr m_extendedInfo;
95 
96 public:
97 
105  DGNPLATFORM_EXPORT SchemaInfo (ECN::SchemaKeyCR schemaKey, DgnFileR file, WCharCP providerName=L"", WCharCP location=L"", UInt32 checkSum=0, bool storedSchema=false);
106 
109 
114  DGNPLATFORM_EXPORT void SetSchemaName (WCharCP schemaName);
115 
118  DGNPLATFORM_EXPORT void SetVersionMajor (UInt32 versionMajor);
119 
122  DGNPLATFORM_EXPORT void SetVersionMinor (UInt32 versionMinor);
123 
126  DGNPLATFORM_EXPORT void SetProviderName (WCharCP providerName);
127 
130  DGNPLATFORM_EXPORT void SetLocation (WCharCP location);
133  DGNPLATFORM_EXPORT void SetElementCheckSum (UInt32 checkSum);
134 
137  DGNPLATFORM_EXPORT void SetStoredSchema (bool isStoredSchema);
138 
141  void SetDgnFile (DgnFileR dgnFile);
142 
144  DGNPLATFORM_EXPORT WCharCP GetSchemaName () const;
146  DGNPLATFORM_EXPORT ECN::SchemaKeyCR GetSchemaKey () const;
148  DGNPLATFORM_EXPORT ECN::SchemaKeyR GetSchemaKeyR ();
150  DGNPLATFORM_EXPORT WCharCP GetProviderName() const;
152  DGNPLATFORM_EXPORT WCharCP GetLocation() const;
154  DGNPLATFORM_EXPORT UInt32 GetElementCheckSum() const;
156  DGNPLATFORM_EXPORT bool IsStoredSchema() const;
158  DGNPLATFORM_EXPORT DgnFileR GetDgnFile() const;
159 };
160 
163  {
173  };
174 
177  {
187 
188  // When updating instances referencing the updated schema
191 
193  };
194 
197  {
205  };
206 
209  {
219  };
220 
221 typedef bmap<ECN::SchemaNameClassNamePair, bool> ElementECClassInfo;
222 
223 
224 //---------------------------------------------------------------------------------------
225 // @bsimethod Bentley Systems
226 //---------------+---------------+---------------+---------------+---------------+-------
228  {
229  // private:
240  };
241 typedef bvector<RelationshipEntry> RelationshipEntryVector;
242 
243 /*---------------------------------------------------------------------------------**/
256  {
257  };
258 
270  {
271 
275  DGNPLATFORM_EXPORT void FindECClassesOnElement(ElementRefP rootElement, ElementECClassInfo& classes) const;
276  };
277 
289  {
290  };
291 
292 typedef bmap<ECN::SchemaNameClassNamePair, DgnECInstanceEnablerP> InstanceEnablersByName;
293 typedef bmap<ECN::ECClassCP, DgnECInstanceEnablerP> InstanceEnablersByClass;
294 
295 
296 /*---------------------------------------------------------------------------------**/
304  {
305  };
308 
309 #pragma managed(pop)
bmap< ECN::ECClassCP, DgnECInstanceEnablerP > InstanceEnablersByClass
Definition: DgnECProviders.h:293
bmap< ECN::SchemaNameClassNamePair, bool > ElementECClassInfo
Definition: DgnECProviders.h:221
Definition: DgnECProviders.h:178
bvector< RelationshipEntry > RelationshipEntryVector
Definition: DgnECProviders.h:241
Definition: Bentley.h:212
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
struct DgnPlatform::SchemaInfo const & SchemaInfoCR
Definition: DgnPlatform.h:443
SchemaKey const & SchemaKeyCR
Definition: ECObjects.h:54
Definition: ecprovider.h:17
SchemaUpdateStatus
Definition: DgnECProviders.h:176
Provides DgnECRelationships between DgnECInstances.
Definition: DgnECProviders.h:255
uint16_t UInt16
Definition: Bentley.r.h:118
ECSchemas stored in a dgn file.
Definition: DgnECProviders.h:67
ECSchemas not stored in a dgn file. Usually provider by an application or found from file sytem...
Definition: DgnECProviders.h:68
Definition: DgnECProviders.h:164
StrengthType
The various strengths supported on a relationship class.
Definition: ECSchema.h:784
Implemented for each "persistence technology" that can persist ECInstances and ECRelationships, e.g.
Definition: DgnECProviders.h:288
ECN::StrengthType RelatedInstanceStrength
Definition: DgnECProviders.h:233
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
A DgnFile is an in-memory representation of a physical file, regardless of its format.
Definition: DgnFile.h:308
Fully defines a schema with its name, major and minor versions, and a checksum.
Definition: ECSchema.h:983
wchar_t const * WCharCP
Definition: Bentley.h:224
uint32_t UInt32
Definition: Bentley.r.h:128
bool operator<(const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
Definition: basic_string.h:1326
WString RelationshipClassName
Definition: DgnECProviders.h:230
DeleteDgnECInstanceStatus
Definition: DgnECProviders.h:208
WString RelationshipSchemaName
Definition: DgnECProviders.h:231
Definition: DgnECProviders.h:218
WString TargetClassName
Definition: DgnECProviders.h:236
Definition: DgnECProviders.h:227
bmap< ECN::SchemaNameClassNamePair, DgnECInstanceEnablerP > InstanceEnablersByName
Definition: DgnECProviders.h:292
WString TargetSchemaName
Definition: DgnECProviders.h:237
#define DGNPLATFORM_TYPEDEFS(_name_)
Definition: DgnPlatform.h:73
Interface that provides direct and efficient access to element data.
Definition: ElementRefBase.h:120
unsigned char byte
Definition: Bentley.r.h:144
ECRelatedInstanceDirection
Used to describe the direction of a related instance within the context of an IECRelationshipInstance...
Definition: ECSchema.h:775
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
ECSchemaPersistence
Definition: DgnECProviders.h:63
SchemaImportStatus
Definition: DgnECProviders.h:162
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
A place to store additional information about the ECSchema in the future, e.g. relevant supplemental ...
Definition: DgnECProviders.h:72
WString SourceClassName
Definition: DgnECProviders.h:234
Holds descriptive information about an ECSchema, particularly so that it can be examined before the E...
Definition: DgnECProviders.h:85
WString SourceSchemaName
Definition: DgnECProviders.h:235
WString TargetInstanceId
Definition: DgnECProviders.h:239
Definition: Bentley.h:210
SchemaDeleteStatus
Definition: DgnECProviders.h:196
Support for intrinsic relationship providers that provide relationships from DgnContentRelationshipSc...
Definition: DgnECProviders.h:303
When we have not yet determined how an ECSchema is persisted.
Definition: DgnECProviders.h:66
Definition: DgnECProviders.h:198
RefCountedPtr< SchemaInfoExt > SchemaInfoExtPtr
Definition: DgnECProviders.h:79
#define ENUM_UNDERLYING_TYPE(T)
Definition: Bentley.h:70
ECN::ECRelatedInstanceDirection RelatedInstanceDirection
Definition: DgnECProviders.h:232
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
Implemented for each "persistence technology" that can persist ECInstances and ECRelationships, e.g.
Definition: DgnECProviders.h:269
WString SourceInstanceId
Definition: DgnECProviders.h:238
bool operator==(const BentleyAllocator< _Ty > &, const BentleyAllocator< _Other > &)
Definition: BentleyAllocator.h:146

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