Modules | Classes | Typedefs | Enumerations | Functions
EC Data/Metadata Persistence

The DgnECManager holds the API for applying ECObjects concepts (ECInstances and ECSchemas) to DgnFiles. More...

Modules

 ECObjects
 ECObjects is a set of abstractions for working with engineering/business data and metadata.
 
 Item Types
 Item Types provide a simplified way for users and applications to create, manage, and use EC data within DgnFiles.
 

Classes

struct  FindInstancesScopeOption
 !FindInstancesScopeOption describes how the scope should be configured when ! we are traversing the elements, models etc. More...
 
struct  FindInstancesScope
 A findinstances scope describes where to look for instances on a call to DgnECManager::FindInstances() More...
 
struct  InstanceCountIterable
 Iterable for returning the number of instances for given classes within the given scope. More...
 
struct  DgnECInstanceHost
 Represents some object which resides in a DgnFile and which can host ECInstances. More...
 
struct  SelectedProperties
 Structure used to defined the properties to populate in a DgnECInstance. More...
 
struct  DgnECInstanceCreateOptions
 Defines the set of options used when querying for DgnECInstances. More...
 
struct  DgnECInstanceCreateContext
 Defines the set of options and the properties to select when querying for DgnECInstances. More...
 
struct  DgnECInstanceEnabler
 Implemented by ECEnablers which expose properties of DgnECInstances. More...
 
struct  DgnECInstance
 DgnInstance is an abstract class that represents an ecinstance which is persisted in the DgnPlatform layer. More...
 
struct  DgnElementECInstance
 DgnElementECInstance is an abstract class DgnElementECInstance represents a DgnECInstance which is hosted on an element, often as an XAttribute. More...
 
struct  DgnECRelationshipEnabler
 DgnECRelationshipEnabler is an abstract class. More...
 
struct  IDgnECRelationshipInstance
 IDgnECRelationshipInstance is an abstract class that supports relating two DgnElementECInstances. More...
 
struct  DgnECInstanceIterable
 ! Used to return results from DgnECManager::FindInstances. More...
 
struct  DgnECManager
 DgnECManager handles persistence of ECInstances including CRUD operations for ECN::Instances and EC:RelationshipInstances and "FindElementInstances" operations. More...
 
struct  SchemaInfoExt
 A place to store additional information about the ECSchema in the future, e.g. relevant supplemental ECSchemas. More...
 
struct  SchemaInfo
 Holds descriptive information about an ECSchema, particularly so that it can be examined before the ECSchema is actually loaded. More...
 
struct  RelationshipEntry
 
struct  IDgnECRelationshipProvider
 Provides DgnECRelationships between DgnECInstances. More...
 
struct  IDgnECProvider
 Implemented for each "persistence technology" that can persist ECInstances and ECRelationships, e.g. More...
 
struct  IDgnElementECProvider
 Implemented for each "persistence technology" that can persist ECInstances and ECRelationships, e.g. More...
 
struct  DgnECIntrinsicRelationshipProvider
 Support for intrinsic relationship providers that provide relationships from DgnContentRelationshipSchema. More...
 
struct  DgnECExtendedType
 An ECSchema may define an extended type for an ECProperty. More...
 
struct  IDgnECTypeAdapterContext
 
struct  IDgnECStandaloneTypeAdapterContext
 A reusable IDgnECTypeAdapterContext. More...
 
struct  IDgnECTypeAdapter
 Provides methods for converting to and from an ECProperty's internal type to a user-friendly representation. More...
 
struct  DgnECUnit
 Describes the units associated with a Dgn-based ECProperty. More...
 
struct  ECInstanceHolderHandler
 Handler for Type 66 elements that contain a single ECInstance. More...
 
struct  SearchClass
 ! A search class represents a schema name class name pair that can be used to execute a query ! using DgnECManager ! More...
 
struct  IECPropertyValueFilter
 Accepts or rejects property values. More...
 
struct  ECSubstringPropertyValueFilter
 An IECPropertyValueFilter that accepts or rejects property values that contain a specified sub-string using a case-insensitive comparison. More...
 
struct  ECQuery
 An ECQuery is somewhat analogous to a SQL query and is used with DgnECManager::FindElementInstances to find ECInstances that satisfy the query's 'where' clause. More...
 
struct  QueryRelatedClassSpecifier
 How to specify a relationship. More...
 
struct  WhereExpression
 A WhereExpression evalutes to a value that can be used in a WhereCriterion. More...
 
struct  WhereCriterion
 A WhereCriterion is used in the "where clause" of an ECQuery. More...
 
struct  ECExpressionCriterion
 

Typedefs

typedef RefCountedPtr
< DgnECInstanceEnabler > 
DgnECInstanceEnablerPtr
 
typedef RefCountedPtr
< DgnElementECInstance > 
DgnElementECInstancePtr
 
typedef RefCountedPtr
< IDgnECRelationshipInstance > 
IDgnECRelationshipInstancePtr
 
typedef bvector
< DgnElementECInstancePtr > 
DgnElementECInstanceVector
 
typedef bvector< DgnECInstancePtrDgnECInstanceVector
 
typedef bvector
< IDgnECRelationshipInstancePtr > 
IDgnECRelationshipInstanceVector
 
typedef bvector< WStringT_PropertyNameVector
 
typedef RefCountedPtr
< SelectedProperties > 
SelectedPropertiesPtr
 
typedef RefCountedPtr
< SchemaInfoExt > 
SchemaInfoExtPtr
 
typedef bmap
< ECN::SchemaNameClassNamePair,
bool > 
ElementECClassInfo
 
typedef bvector
< RelationshipEntry > 
RelationshipEntryVector
 
typedef bmap
< ECN::SchemaNameClassNamePair,
DgnECInstanceEnablerP
InstanceEnablersByName
 
typedef bmap< ECN::ECClassCP,
DgnECInstanceEnablerP
InstanceEnablersByClass
 
typedef RefCountedPtr
< IDgnECTypeAdapterContext > 
IDgnECTypeAdapterContextPtr
 Supplies the context in which an IDgnECTypeAdapter operates. More...
 
typedef RefCountedPtr
< IDgnECStandaloneTypeAdapterContext > 
IDgnECStandaloneTypeAdapterContextPtr
 
typedef bvector< SearchClass > SearchClassList
 
typedef RefCountedPtr
< IECPropertyValueFilter > 
IECPropertyValueFilterPtr
 
typedef RefCountedPtr
< ECSubstringPropertyValueFilter > 
ECSubstringPropertyValueFilterPtr
 
typedef RefCountedPtr
< QueryRelatedClassSpecifier > 
QueryRelatedClassSpecifierPtr
 
typedef RefCountedPtr
< WhereCriterion > 
WhereCriterionPtr
 
typedef RefCountedPtr
< WhereExpression > 
WhereExpressionPtr
 
typedef RefCountedPtr
< WhereCriterion::RelatedInstanceFinder > 
WhereCriterionRelatedInstanceFinderPtr
 

Enumerations

enum  DgnECInstanceStatus {
  DGNECINSTANCESTATUS_Success = SUCCESS, DGNECINSTANCESTATUS_InstanceIsStale = 1, DGNECINSTANCESTATUS_InstanceIsDeletedOrUndone = 2, DGNECINSTANCESTATUS_InvalidElementRef = 3,
  DGNECINSTANCESTATUS_InstanceIsAlreadyAsleep = 4, DGNECINSTANCESTATUS_IncompatibleWipInstance = 5, DGNECINSTANCESTATUS_UnableToAddInstance = 6, DGNECINSTANCESTATUS_NoInstanceFound = 7,
  DGNECINSTANCESTATUS_InvalidInstance = 8, DGNECINSTANCESTATUS_UnableToUpdateInstance = 9, DGNECINSTANCESTATUS_XAttributeHasBeenRemoved = 10, DGNECINSTANCESTATUS_ClassLayoutNotStored = 11,
  DGNECINSTANCESTATUS_RelationshipInstanceNotCreated = 12, DGNECINSTANCESTATUS_EnablerNotValidForFile = 13, DGNECINSTANCESTATUS_DuplicateRelationshipFound = 14, DGNECINSTANCESTATUS_RequiresSingleEndedRelationshipClass = 15,
  DGNECINSTANCESTATUS_PropertyNotFound = 16, DGNECINSTANCESTATUS_Error = ERROR
}
 Return status for DgnEC operations. More...
 
enum  DgnECHostType : uint32_t {
  Unknown = 0, Element = 1 << 0, Model = 1 << 2, File = 1 << 3,
  DesignLink = 1 << 4, View = 1 << 5, Attachment = 1 << 6, Level = 1 << 7,
  All = 0xffffffff
}
 Describes the underlying type on which an instance can be persisted. More...
 
enum  ReferencedModelScopeOption : byte { REFERENCED_MODEL_SCOPE_All = 0, REFERENCED_MODEL_SCOPE_DirectOnly = 1, REFERENCED_MODEL_SCOPE_None = 2 }
 
enum  ECSchemaPersistence : byte { ECSCHEMAPERSISTENCE_Unknown = 0x00, ECSCHEMAPERSISTENCE_Stored = 0x01, ECSCHEMAPERSISTENCE_External = 0x02, ECSCHEMAPERSISTENCE_All = 0xff }
 
enum  SchemaImportStatus {
  SCHEMAIMPORT_Success = SUCCESS, SCHEMAIMPORT_SchemaAlreadyStoredInFile = 1, SCHEMAIMPORT_NotValidECSchemaXml = 2, SCHEMAIMPORT_FailedToWriteElement = 3,
  SCHEMAIMPORT_FailedToSerializeAsXml = 4, SCHEMAIMPORT_ProviderDoesNotSupportImport = 5, SCHEMAIMPORT_ProviderNotFound = 6, SCHEMAIMPORT_FailedToDeserializeXmlFile = 7,
  SCHEMAIMPORT_InvalidUserDefinedSchema = 8
}
 
enum  SchemaUpdateStatus {
  SCHEMAUPDATE_Success = SUCCESS, SCHEMAUPDATE_SchemaNotFound = 1, SCHEMAUPDATE_NotValidECSchemaXml = 2, SCHEMAUPDATE_FailedToWriteElement = 3,
  SCHEMAUPDATE_FailedToSerializeAsXml = 4, SCHEMAUPDATE_ProviderDoesNotSupportUpdate = 5, SCHEMAUPDATE_ProviderNotFound = 6, SCHEMAUPDATE_FailedToDeserializeXmlFile = 7,
  SCHEMAUPDATE_SchemaVersionMismatch = 8, SCHEMAUPDATE_ProviderDoesNotSupportInstanceUpdate = 9, SCHEMAUPDATE_FailedToUpdateInstances = 10, SCHEMAUPDATE_FailedToUpdateReferencingSchemas = 11
}
 
enum  SchemaDeleteStatus {
  SCHEMADELETE_Success = SUCCESS, SCHEMADELETE_SchemaNotFound = 1, SCHEMADELETE_ProviderNotFound = 2, SCHEMADELETE_ProviderDoesNotSupportDelete = 3,
  SCHEMADELETE_SchemaHasStoredInstances = 4, SCHEMADELETE_SchemaIsReferenced = 5, SCHEMADELETE_FailedToDeleteSchemaElement = 6
}
 
enum  DeleteDgnECInstanceStatus {
  DELETEDGNECINSTANCE_Success = SUCCESS, DELETEDGNECINSTANCE_FileReadOnly = 1, DELETEDGNECINSTANCE_ProviderDoesNotSupportDelete = 2, DELETEDGNECINSTANCE_UnableToParseInstanceId = 3,
  DELETEDGNECINSTANCE_InvalidProviderId = 4, DELETEDGNECINSTANCE_InvalidOrDeletedElement = 5, DELETEDGNECINSTANCE_UnableToLocateInstance = 6, DELETEDGNECINSTANCE_SchedulingDeleteNotSupportedByProvider = 7,
  DELETEDGNECINSTANCE_Error = ERROR
}
 
enum  ECQueryProcessFlags : unsigned int {
  ECQUERY_PROCESS_Empty = 0, ECQUERY_PROCESS_SearchAllIntrinsic = 1 << 1, ECQUERY_PROCESS_SearchAllExtrinsic = 1 << 2, ECQUERY_PROCESS_SearchSpecifiedClasses = 1 << 3,
  ECQUERY_PROCESS_SearchAllClasses = (ECQUERY_PROCESS_SearchAllIntrinsic | ECQUERY_PROCESS_SearchAllExtrinsic)
}
 

Functions

DgnECHostType operator| (DgnECHostType a, DgnECHostType b)
 
DgnECHostType operator& (DgnECHostType a, DgnECHostType b)
 
DgnECHostType operator~ (DgnECHostType a)
 
bool operator! (DgnECHostType a)
 

Detailed Description

The DgnECManager holds the API for applying ECObjects concepts (ECInstances and ECSchemas) to DgnFiles.

DgnECInstances are associated with DgnFiles, DgnModels, or DgnElements. They may represent "intrinsic" data such as the geometry of a line element, or "extrinsic" (application- or user-defined) data such as the serial number of an element representing a piece of equipment. The primary (and default) persistence format for extrinsic ECInstances is ECXAttributes (an XAttribute holding a binary-serialized ECInstance).

See the DgnECDemo example in the SDK for more complete information on typical use of the DgnEC APIs

The DgnEC system is extensible via IDgnECProvider implementations. Multiple providers exist, each handling a different type of ECInstance persistence. The DgnECManager API is designed to hide this multiplicity, so that users need never interact directly with the providers. Instead, ECInstances can be found by telling the DgnECManager:

See also
ECObjects

Typedef Documentation

typedef RefCountedPtr<DgnECInstanceEnabler> DgnECInstanceEnablerPtr
typedef bvector<DgnECInstancePtr> DgnECInstanceVector
typedef RefCountedPtr<DgnElementECInstance> DgnElementECInstancePtr
typedef bvector<DgnElementECInstancePtr> DgnElementECInstanceVector
typedef RefCountedPtr<ECSubstringPropertyValueFilter> ECSubstringPropertyValueFilterPtr
typedef bmap<ECN::SchemaNameClassNamePair, bool> ElementECClassInfo
typedef RefCountedPtr<IDgnECRelationshipInstance> IDgnECRelationshipInstancePtr
typedef bvector<IDgnECRelationshipInstancePtr> IDgnECRelationshipInstanceVector
typedef RefCountedPtr<IDgnECStandaloneTypeAdapterContext> IDgnECStandaloneTypeAdapterContextPtr
typedef RefCountedPtr<IDgnECTypeAdapterContext> IDgnECTypeAdapterContextPtr

Supplies the context in which an IDgnECTypeAdapter operates.

See also
IDgnECTypeAdapter
DgnECExtendedType
Remarks
Required library : DgnPlatform<ApiNumber>.lib i.e. DgnPlatform5.lib
typedef RefCountedPtr<IECPropertyValueFilter> IECPropertyValueFilterPtr
typedef bmap<ECN::ECClassCP, DgnECInstanceEnablerP> InstanceEnablersByClass
typedef bmap<ECN::SchemaNameClassNamePair, DgnECInstanceEnablerP> InstanceEnablersByName
typedef RefCountedPtr<QueryRelatedClassSpecifier> QueryRelatedClassSpecifierPtr
typedef bvector<RelationshipEntry> RelationshipEntryVector
typedef RefCountedPtr<SchemaInfoExt> SchemaInfoExtPtr
typedef bvector<SearchClass> SearchClassList
typedef RefCountedPtr<SelectedProperties> SelectedPropertiesPtr
typedef bvector<WString> T_PropertyNameVector
typedef RefCountedPtr<WhereCriterion> WhereCriterionPtr
typedef RefCountedPtr<WhereCriterion::RelatedInstanceFinder> WhereCriterionRelatedInstanceFinderPtr
typedef RefCountedPtr<WhereExpression> WhereExpressionPtr

Enumeration Type Documentation

enum DeleteDgnECInstanceStatus
See also
DgnECManager::DeleteDgnECInstance
Enumerator
DELETEDGNECINSTANCE_Success 
DELETEDGNECINSTANCE_FileReadOnly 
DELETEDGNECINSTANCE_ProviderDoesNotSupportDelete 
DELETEDGNECINSTANCE_UnableToParseInstanceId 
DELETEDGNECINSTANCE_InvalidProviderId 
DELETEDGNECINSTANCE_InvalidOrDeletedElement 
DELETEDGNECINSTANCE_UnableToLocateInstance 
DELETEDGNECINSTANCE_SchedulingDeleteNotSupportedByProvider 
DELETEDGNECINSTANCE_Error 
enum DgnECHostType : uint32_t
strong

Describes the underlying type on which an instance can be persisted.

Remarks
One can use the different OR'd enum to restrict the search scope when executing a query.
Enumerator
Unknown 

Unknown host type.

Element 

Hosted on an element.

Model 

Hosted on a DgnModel.

File 

Hosted on a DgnFile.

DesignLink 

Hosted on a DgnLinkTree or DgnLinkTreeNode.

View 

Hosted on an indexed View.

Attachment 

Hosted on a DgnAttachment.

Level 

Hosted on a level.

All 

Hosted on any host type.

enum DgnECInstanceStatus

Return status for DgnEC operations.

Enumerator
DGNECINSTANCESTATUS_Success 
DGNECINSTANCESTATUS_InstanceIsStale 
DGNECINSTANCESTATUS_InstanceIsDeletedOrUndone 
DGNECINSTANCESTATUS_InvalidElementRef 
DGNECINSTANCESTATUS_InstanceIsAlreadyAsleep 
DGNECINSTANCESTATUS_IncompatibleWipInstance 
DGNECINSTANCESTATUS_UnableToAddInstance 
DGNECINSTANCESTATUS_NoInstanceFound 
DGNECINSTANCESTATUS_InvalidInstance 
DGNECINSTANCESTATUS_UnableToUpdateInstance 
DGNECINSTANCESTATUS_XAttributeHasBeenRemoved 
DGNECINSTANCESTATUS_ClassLayoutNotStored 
DGNECINSTANCESTATUS_RelationshipInstanceNotCreated 
DGNECINSTANCESTATUS_EnablerNotValidForFile 
DGNECINSTANCESTATUS_DuplicateRelationshipFound 
DGNECINSTANCESTATUS_RequiresSingleEndedRelationshipClass 
DGNECINSTANCESTATUS_PropertyNotFound 
DGNECINSTANCESTATUS_Error 
enum ECQueryProcessFlags : unsigned int
Enumerator
ECQUERY_PROCESS_Empty 
ECQUERY_PROCESS_SearchAllIntrinsic 
ECQUERY_PROCESS_SearchAllExtrinsic 
ECQUERY_PROCESS_SearchSpecifiedClasses 
ECQUERY_PROCESS_SearchAllClasses 
enum ECSchemaPersistence : byte
Enumerator
ECSCHEMAPERSISTENCE_Unknown 
ECSCHEMAPERSISTENCE_Stored 

When we have not yet determined how an ECSchema is persisted.

ECSCHEMAPERSISTENCE_External 

ECSchemas stored in a dgn file.

ECSCHEMAPERSISTENCE_All 

ECSchemas not stored in a dgn file. Usually provider by an application or found from file sytem.

enum ReferencedModelScopeOption : byte
Enumerator
REFERENCED_MODEL_SCOPE_All 
REFERENCED_MODEL_SCOPE_DirectOnly 

Include all attachments.

REFERENCED_MODEL_SCOPE_None 

Include only direct attachments.

enum SchemaDeleteStatus
See also
DgnECManager::DeleteSchema
Enumerator
SCHEMADELETE_Success 
SCHEMADELETE_SchemaNotFound 
SCHEMADELETE_ProviderNotFound 
SCHEMADELETE_ProviderDoesNotSupportDelete 
SCHEMADELETE_SchemaHasStoredInstances 
SCHEMADELETE_SchemaIsReferenced 
SCHEMADELETE_FailedToDeleteSchemaElement 
enum SchemaImportStatus
See also
DgnECManager::ImportSchema
Enumerator
SCHEMAIMPORT_Success 
SCHEMAIMPORT_SchemaAlreadyStoredInFile 
SCHEMAIMPORT_NotValidECSchemaXml 
SCHEMAIMPORT_FailedToWriteElement 
SCHEMAIMPORT_FailedToSerializeAsXml 
SCHEMAIMPORT_ProviderDoesNotSupportImport 
SCHEMAIMPORT_ProviderNotFound 
SCHEMAIMPORT_FailedToDeserializeXmlFile 
SCHEMAIMPORT_InvalidUserDefinedSchema 
enum SchemaUpdateStatus
See also
DgnECManager::UpdateSchema
Enumerator
SCHEMAUPDATE_Success 
SCHEMAUPDATE_SchemaNotFound 
SCHEMAUPDATE_NotValidECSchemaXml 
SCHEMAUPDATE_FailedToWriteElement 
SCHEMAUPDATE_FailedToSerializeAsXml 
SCHEMAUPDATE_ProviderDoesNotSupportUpdate 
SCHEMAUPDATE_ProviderNotFound 
SCHEMAUPDATE_FailedToDeserializeXmlFile 
SCHEMAUPDATE_SchemaVersionMismatch 
SCHEMAUPDATE_ProviderDoesNotSupportInstanceUpdate 
SCHEMAUPDATE_FailedToUpdateInstances 
SCHEMAUPDATE_FailedToUpdateReferencingSchemas 

Function Documentation

bool Bentley::DgnPlatform::operator! ( DgnECHostType  a)
DgnECHostType Bentley::DgnPlatform::operator& ( DgnECHostType  a,
DgnECHostType  b 
)
DgnECHostType Bentley::DgnPlatform::operator| ( DgnECHostType  a,
DgnECHostType  b 
)
DgnECHostType Bentley::DgnPlatform::operator~ ( DgnECHostType  a)

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