ConstraintHandlerBase.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
11 
16 BEGIN_CONSTRAINT2D_NAMESPACE
17 
18 typedef bmap <ElementRefP, EditElementHandleP> T_ModifiedElementMap;
19 typedef bvector <PersistentElementPath> T_PepVector;
20 
21 
22 
23 /*=================================================================================**/
28 {
30 };
31 /*=================================================================================**/
35 {
37 
38 }; // ConstraintHandlerUtils
39 
40 /*---------------------------------------------------------------------------------**/
44  {
45  virtual size_t GetCount() const = 0;
46  virtual PersistentElementPathP GetPep (size_t index) = 0;
47  virtual bool Remove (size_t index) = 0;
48 
49  struct ConstraintRootPepIterator : std::iterator<std::forward_iterator_tag, PersistentElementPath>
50  {
51  private:
52  IConstraintRootPepCollection& m_collection;
53  size_t m_index;
54  public:
55  reference operator*() const { return *m_collection.GetPep (m_index); }
56  bool operator==(ConstraintRootPepIterator const& rhs) const { return &m_collection == &rhs.m_collection && m_index == rhs.m_index; }
57  bool operator!=(ConstraintRootPepIterator const& rhs) const { return !(*this == rhs); }
58  ConstraintRootPepIterator& operator++() { ++m_index; return *this; }
59 
60  ConstraintRootPepIterator (IConstraintRootPepCollection& collection, size_t index) : m_collection (collection), m_index (index) { }
61  };
62 
64 
65  iterator begin() { return iterator (*this, 0); }
66  iterator end() { return iterator (*this, GetCount()); }
67  };
68 
70 
71 /*---------------------------------------------------------------------------------**/
75  {
76  NotSpecified = 0,
77  Aligned,
79  Unsupported = 0xff,
80  };
81 
82 /*=================================================================================**/
86 {
87  virtual Constraint2dType _GetConstraintType() const = 0;
88  virtual bool _HasElementRef (ElementRefP elementRef) const = 0;
89  virtual ConstraintOrientation _GetOrientation() const = 0;
90  virtual bool _SetOrientation (ConstraintOrientation orientation) = 0;
91  virtual WCharCP _GetIconName() const = 0;
92 
93 }; // ConstraintProxy
94 
95 /*=================================================================================**/
99 {
100  virtual Constraint2dType _GetConstraintType() const = 0;
101  virtual bool _HasElementRef (ElementRefP elementRef) const = 0;
102  virtual double _GetValue () const = 0;
103  virtual void _SetValue (double value) = 0;
104  virtual WString _GetVariableName() const = 0;
105  virtual void _SetVariableName (WCharCP name) = 0;
106  virtual UInt32 _GetDiaType() const = 0;
107  virtual void _SetDiaType (UInt32 value) = 0;
108 
109 };// DimensionProxy
110 
113 
114 
115 /*=================================================================================**/
119 {
120  bvector <ConstraintProxyPtr> m_constraints;
121  bvector <DimensionProxyPtr> m_dimensions;
122 
124  virtual void _RemoveUnresolvedData (IConstraintRootPepCollection const& rootPeps) = 0;
125  virtual size_t _RemoveInvalidConstraints (ElementRefP root, ElementHandleCR dependent) = 0;
126  virtual StatusInt _Replace (IReplaceXAttribute* tbr) = 0;
127  virtual StatusInt _UpdateDimensions (ElementRefP elRef, bvector<DimensionProxy*> const& modifiedDimensions) = 0;
128  virtual StatusInt _GetDegreesOfFreedom (int& dof, int& rigidDof, DgnModelRefR modelRef) const = 0;
129 
130  bool IsEmpty() const { return m_constraints.empty() && m_dimensions.empty(); }
131 }; // ConstraintDataProxy
132 
134 
135 /*=================================================================================**/
139 struct ConstraintXAttributeHandlerBase : IXAttributePointerContainerHandler, IDependencyHandler, XAttributeHandler, IParameterDependencyHandler
140 {
141 private:
142  StatusInt OnPreprocessCopyConstraints (IReplaceXAttribute* tbr, ElementHandleCR eh, IConstraintRootPepCollection& rootPeps, ElementCopyContextP cc);
143  StatusInt OnPreprocessCopyRemapConstraints (IReplaceXAttribute* tbr, ElementHandleCR eh, IConstraintRootPepCollection& rootPeps);
144  IConstraintRootPepCollectionPtr GetRootPeps (DataInternalizer& source, XAttributeHandleCR xa, DgnModelRefR modelRef) const;
145 protected:
146  virtual IConstraintRootPepCollectionPtr _GetRootPeps (DataInternalizer& source, XAttributeHandleCR xa, DgnModelRefR modelRef) const = 0;
147  virtual BentleyStatus _ReplaceRootPeps (DataExternalizer& sink, DataInternalizer& source, IConstraintRootPepCollection& rootPeps, DgnModelRefR modelRef) const = 0;
149  virtual bool _IsConstraintElement (ElementHandleCR eh) const = 0;
150  virtual bool _FinishRootsChanged (ElementHandleCR dependent, ConstraintSolverDataProxy& data, T_StdElementRefSet& roots, bool modified) const = 0;
152 
153  CONSTRAINT2DELEMENT_EXPORT virtual bool _IsParameterReferenced (ParameterDefinitionCR def, IParameterDefinitionsCR defs) const override;
154  CONSTRAINT2DELEMENT_EXPORT virtual void _RemapOrDrop (ParameterDefinitionCR def, IEditParameterDefinitionsR defs, ParameterDefinitionCP remapTo) const override;
155  CONSTRAINT2DELEMENT_EXPORT virtual bool _GetControllingParameterAccessString (WStringR accessString, IDgnECTypeAdapterContextCR context) const override;
156  CONSTRAINT2DELEMENT_EXPORT virtual void _ValidateDependencies (IParameterDefinitionsCR defs) const override;
157  CONSTRAINT2DELEMENT_EXPORT virtual void _RemapParameterNames (IParameterDefinitionsCR defs, IParameterNameRemapperCR remapper) const override;
158 public:
159 
162  CONSTRAINT2DELEMENT_EXPORT virtual StatusInt _OnPreprocessCopy (IReplaceXAttribute* toBeReplaced, XAttributeHandleCR xa, ElementHandleCR eh, ElementCopyContextP cc) override;
163 
164  CONSTRAINT2DELEMENT_EXPORT virtual StatusInt _OnPreprocessCopyRemapIds (IReplaceXAttribute* toBeReplaced, XAttributeHandleCR xa, ElementHandleCR eh) override;
165  CONSTRAINT2DELEMENT_EXPORT virtual IDependencyHandler* _GetIDependencyHandler () override {return this;}
166 
167  CONSTRAINT2DELEMENT_EXPORT virtual void _OnRootsChanged (ElementHandleR dependent, bvector<RootChange> const& rootsChanged, bvector<XAttributeHandle> const& xAttrsAffected) override;
168  virtual void _OnUndoRedoRootsChanged (ElementHandleR dependent, bvector<RootChange> const& rootsChanged, bvector<XAttributeHandle> const& xAttrsAffected) const override { }
169 
170 
173 
174 
175 }; // ConstraintXAttributeHandlerBase
176 
177 /*=================================================================================**/
181 struct ConstraintAgendaEventListener : public IElementAgendaEvents
182 {
184  {
186  IConstraintSolver (UInt16 handlerMinorId) : m_handlerMinorId (handlerMinorId) { }
187  virtual bool _SolveAndModifyElements (ElementHandleCR hostEh, bmap <ElementRefP, EditElementHandleP>& modifiedElements, bool addRelatedChanges) = 0;
188  };
189 
190 private:
191 
192  struct SolverAndModelRef
193  {
194  IConstraintSolver* m_solver;
195  DgnModelRefP m_modelRef;
196 
197  SolverAndModelRef () { }
198  SolverAndModelRef (IConstraintSolver* solver, DgnModelRefP modelRef) : m_solver (solver), m_modelRef (modelRef) { }
199  };
200 
201  typedef bvector <ElementRefP> T_ElementRefs;
202 
203  bmap <ElementRefP, DgnModelRefP> m_constrained;
204  bmap <ElementRefP, SolverAndModelRef> m_hostMap;
205  T_ModifiedElementMap m_modifiedElementMap;
206  ElementAgenda m_controlElmsToAdd;
207  bvector <IConstraintSolver*> m_solvers;
208 
209  bool IsConstraintElement (ElementHandleCR eh, UInt16 handlerMinorId);
210  ElementRefP FindConstraintElement (ElementRefP ref, UInt16 handlerMinorId);
211 
212 
213 protected:
215  CONSTRAINT2DELEMENT_EXPORT virtual void _OnPreModifyAgenda (ElementAgendaCP agenda, AgendaOperation opType, AgendaModify modify, bool isGroupOperation) override;
216 
217  CONSTRAINT2DELEMENT_EXPORT virtual void _OnPostModifyAgenda (ElementAgendaCP agenda, AgendaOperation opType, AgendaModify modify, bool isGroupOperation) override;
218  CONSTRAINT2DELEMENT_EXPORT virtual bool _OnRedrawGroupEvent (ElementAgendaCP agenda, AgendaOperation opType, AgendaModify modify, RedrawGroupInfo const* info) override;
219 
220 public:
221  CONSTRAINT2DELEMENT_EXPORT static void Register ();
222  CONSTRAINT2DELEMENT_EXPORT static void AddSolver (IConstraintSolver* solver);
223 
224 }; // ConstraintAgendaEventListenerBase
225 
226 /*=================================================================================**/
230 struct ConstraintECProvider : IDgnECProvider, DgnECIntrinsicRelationshipProvider
231  {
232  typedef bmap <ECN::ECClassCP, ElementECEnablerPtr> ExternalEnablersByClass;
233 private:
234 
235 
236  ECN::ECSchemaPtr m_schema;
237  ECN::ECSchemaPtr m_relationshipSchema;
238  ExternalEnablersByClass m_enablerCache;
239 
240  bool IsGeometricConstraint(WCharCP classname);
241 protected:
242  // IECProvider
244 
245  CONSTRAINT2DELEMENT_EXPORT virtual UInt16 _GetProviderId() const override = 0;
246  CONSTRAINT2DELEMENT_EXPORT virtual WCharCP _GetProviderName() const override = 0;
248 
249 
250  // IDgnECProvider
253  CONSTRAINT2DELEMENT_EXPORT virtual void _GetSchemaInfos (bvector<SchemaInfo>& infos, DgnFileR dgnfile, ECSchemaPersistence persistence) override;
254  CONSTRAINT2DELEMENT_EXPORT virtual DgnECHostType _GetHostType() const override;
255  CONSTRAINT2DELEMENT_EXPORT virtual bool _SupportsQueryFlags (ECQueryProcessFlags flags) const override;
256  CONSTRAINT2DELEMENT_EXPORT virtual bool _ExternalizeInstanceId (WStringR externalizedId, WCharCP internalId) const override;
257  CONSTRAINT2DELEMENT_EXPORT virtual bool _InternalizeInstanceId (WStringR internalizedId, WCharCP externalizedId, DgnFileP dgnfile, DgnModelRefP modelRef, ElementRefP elemRef) const override;
258  CONSTRAINT2DELEMENT_EXPORT virtual void _GetPotentialInstanceChanges (DgnECInstanceChangeRecordsR changes, DgnECTxnInfoCR txns, DgnECInstanceCreateContextCR context) const override;
259 
260  // IDgnECRelationshipProvider
261  CONSTRAINT2DELEMENT_EXPORT virtual IDgnECInstanceFinderPtr _CreateFinder (DgnFileR dgnfile, ECQueryCR ecquery, void* providerPerFileCache, DgnECInstanceCreateContextCR context) const override;
262  CONSTRAINT2DELEMENT_EXPORT virtual IDgnECInstanceFinderPtr _CreateRelatedFinder (DgnECInstanceCR source, QueryRelatedClassSpecifierCR spec, DgnECInstanceCreateContextCR context) const override;
263  CONSTRAINT2DELEMENT_EXPORT virtual void _GetSupportedRelationshipInfos (DgnECInstanceCR instance, DgnECRelationshipInfoVector& infos) const override;
264 
265  CONSTRAINT2DELEMENT_EXPORT virtual DgnECInstanceEnablerP _ObtainInstanceEnablerByName (WCharCP schemaName, WCharCP className, DgnFileR dgnfile, void* providerPerFileCache) override;
267 
269 
270  CONSTRAINT2DELEMENT_EXPORT virtual void _OnUnregistered() override;
271 
272 public:
273  ElementECEnablerPtr CreateEnabler (UInt16 providerId, WCharCP classname, ECAccessorTable & table);
274  ElementECEnablerPtr GetEnablerByName (WCharCP classname) const;
275 
278  CONSTRAINT2DELEMENT_EXPORT static bool GetControllingParameterAccessString (WStringR accessString, IDgnECTypeAdapterContextCR context, ConstraintSolverDataProxy const& solverData);
279  };
280 
281 
282 
283 
284 
285 END_CONSTRAINT2D_NAMESPACE
286 
struct DgnPlatform::ECQuery const & ECQueryCR
Definition: DgnPlatform.h:532
A "handle" that can be used to access a single XAttribute of a persistent element.
Definition: XAttributeIter.h:74
virtual bool _HasElementRef(ElementRefP elementRef) const =0
AgendaOperation
Definition: DgnPlatform.h:1472
virtual WCharCP _GetIconName() const =0
bset< ElementRefP > T_StdElementRefSet
Definition: PersistentElementPath.h:21
struct DgnPlatform::ElementAndModelIdRemapping const & ElementAndModelIdRemappingCR
Definition: DgnPlatform.h:510
virtual ConstraintSolverDataProxyPtr _GetConstraintSolverDataForRemap(ElementHandleCR eh) const
Definition: ConstraintHandlerBase.h:151
class DgnPlatform::Handler & HandlerR
Definition: Handler.h:17
virtual CONSTRAINT2DELEMENT_EXPORT IDependencyHandler * _GetIDependencyHandler() override
Definition: ConstraintHandlerBase.h:165
virtual bool _SetOrientation(ConstraintOrientation orientation)=0
ConstraintOrientation
Definition: ConstraintHandlerBase.h:74
static CONSTRAINT2DELEMENT_EXPORT bool GetControllingParameterAccessString(WStringR accessString, IDgnECTypeAdapterContextCR context, ConstraintSolverDataProxy const &solverData)
BEGIN_CONSTRAINT2D_NAMESPACE typedef bmap< ElementRefP, EditElementHandleP > T_ModifiedElementMap
Definition: ConstraintHandlerBase.h:18
A Sprite, corresponding to a native Window manager icon.
Definition: ISprite.h:53
A readonly "handle" to an element.
Definition: ElementHandle.h:113
static CONSTRAINT2DELEMENT_EXPORT void Register()
virtual UInt32 _GetDiaType() const =0
virtual bool _HasElementRef(ElementRefP elementRef) const =0
ConstraintSolverDataProxyPtr GetConstraintSolverData(ElementHandleCR eh) const
Definition: ConstraintHandlerBase.h:276
virtual IConstraintRootPepCollectionPtr _GetRootPeps(DataInternalizer &source, XAttributeHandleCR xa, DgnModelRefR modelRef) const =0
virtual CONSTRAINT2DELEMENT_EXPORT WCharCP _GetProviderName() const override=0
virtual CONSTRAINT2DELEMENT_EXPORT ConstraintSolverDataProxyPtr _GetConstraintSolverData(ElementHandleCR eh) const =0
DgnECRelationshipEnabler is an abstract class.
Definition: DgnECInstance.h:542
RefCountedPtr< ECSchema > ECSchemaPtr
Definition: ECSchema.h:569
virtual CONSTRAINT2DELEMENT_EXPORT StatusInt _OnPreprocessCopy(IReplaceXAttribute *toBeReplaced, XAttributeHandleCR xa, ElementHandleCR eh, ElementCopyContextP cc) override
virtual StatusInt _Replace(IReplaceXAttribute *tbr)=0
IConstraintSolver(UInt16 handlerMinorId)
Definition: ConstraintHandlerBase.h:186
Definition: ConstraintHandlerBase.h:49
virtual CONSTRAINT2DELEMENT_EXPORT bool _SupportsQueryFlags(ECQueryProcessFlags flags) const override
bvector< PersistentElementPath > T_PepVector
Definition: ConstraintHandlerBase.h:19
virtual CONSTRAINT2DELEMENT_EXPORT bool _GetControllingParameterAccessString(WStringR accessString, IDgnECTypeAdapterContextCR context) const override
AgendaModify
Definition: DgnPlatform.h:1464
reference operator*() const
Definition: ConstraintHandlerBase.h:55
virtual void _SetDiaType(UInt32 value)=0
bvector< ConstraintProxyPtr > m_constraints
Definition: ConstraintHandlerBase.h:120
struct DgnPlatform::ElementAgenda const * ElementAgendaCP
Definition: DgnPlatform.h:258
struct Bentley::WString const & WStringCR
Definition: Bentley.h:239
SchemaMatchType
Defines what sort of match should be used when locating a schema.
Definition: ECSchema.h:967
virtual double _GetValue() const =0
ConstraintRootPepIterator(IConstraintRootPepCollection &collection, size_t index)
Definition: ConstraintHandlerBase.h:60
Definition: ConstraintHandlerBase.h:181
virtual CONSTRAINT2DELEMENT_EXPORT void _OnPreCopyAgenda(ElementAgendaCP agenda, AgendaOperation opType, AgendaModify modify, ElementCopyContextP cc) override
struct DgnPlatform::DgnECInstanceCreateContext const & DgnECInstanceCreateContextCR
Definition: DgnPlatform.h:540
uint16_t UInt16
Definition: Bentley.r.h:118
virtual CONSTRAINT2DELEMENT_EXPORT bool _IsParameterReferenced(ParameterDefinitionCR def, IParameterDefinitionsCR defs) const override
virtual CONSTRAINT2DELEMENT_EXPORT void _OnUnregistered() override
virtual CONSTRAINT2DELEMENT_EXPORT bool _InternalizeInstanceId(WStringR internalizedId, WCharCP externalizedId, DgnFileP dgnfile, DgnModelRefP modelRef, ElementRefP elemRef) const override
struct DgnPlatform::XAttributeHandle const & XAttributeHandleCR
Definition: DgnPlatform.h:489
ElementECEnablerPtr CreateEnabler(UInt16 providerId, WCharCP classname, ECAccessorTable &table)
static CONSTRAINT2DELEMENT_EXPORT void DisplayInvalidConstraintRemovedMessage()
virtual CONSTRAINT2DELEMENT_EXPORT bool _ExternalizeInstanceId(WStringR externalizedId, WCharCP internalId) const override
ECQueryProcessFlags
Definition: WhereCriterion.h:33
virtual WString _GetVariableName() const =0
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
Definition: ConstraintHandlerBase.h:230
virtual CONSTRAINT2DELEMENT_EXPORT DgnECInstanceEnablerP _ObtainInstanceEnablerByName(WCharCP schemaName, WCharCP className, DgnFileR dgnfile, void *providerPerFileCache) override
virtual CONSTRAINT2DELEMENT_EXPORT void _OnElementIDsChanged(XAttributeHandleR xa, ElementAndModelIdRemappingCR remapTable, ElementHandleCR eh) override
virtual bool _FinishRootsChanged(ElementHandleCR dependent, ConstraintSolverDataProxy &data, T_StdElementRefSet &roots, bool modified) const =0
Definition: ConstraintHandlerBase.h:139
virtual size_t _RemoveInvalidConstraints(ElementRefP root, ElementHandleCR dependent)=0
virtual CONSTRAINT2DELEMENT_EXPORT void _DisclosePointers(T_StdElementRefSet *refs, XAttributeHandleCR xa, DgnModelRefP homeModel) override
A DgnFile is an in-memory representation of a physical file, regardless of its format.
Definition: DgnFile.h:308
bool operator==(ConstraintRootPepIterator const &rhs) const
Definition: ConstraintHandlerBase.h:56
Definition: ConstraintHandlerBase.h:98
wchar_t const * WCharCP
Definition: Bentley.h:224
iterator end()
Definition: ConstraintHandlerBase.h:66
#define CONSTRAINT2DELEMENT_EXPORT
Definition: Constraint2dElementAPI.h:16
ConstraintRootPepIterator iterator
Definition: ConstraintHandlerBase.h:63
static WString GetConstraintLabel(Constraint2dType type)
Definition: ConstraintHandlerBase.h:43
uint32_t UInt32
Definition: Bentley.r.h:128
virtual bool _SolveAndModifyElements(ElementHandleCR hostEh, bmap< ElementRefP, EditElementHandleP > &modifiedElements, bool addRelatedChanges)=0
virtual void _SetVariableName(WCharCP name)=0
virtual CONSTRAINT2DELEMENT_EXPORT DgnECInstancePtr _LocateInstance(IDgnECInstanceLocatorCR locator, DgnECInstanceCreateContextCR context) const override
virtual CONSTRAINT2DELEMENT_EXPORT void _GetSchemaInfos(bvector< SchemaInfo > &infos, DgnFileR dgnfile, ECSchemaPersistence persistence) override
bmap< ElementRefP, EditElementHandleP > T_ModifiedElementMap
Definition: Constraint2dManager.h:17
virtual bool Remove(size_t index)=0
virtual CONSTRAINT2DELEMENT_EXPORT bool _OnRedrawGroupEvent(ElementAgendaCP agenda, AgendaOperation opType, AgendaModify modify, RedrawGroupInfo const *info) override
virtual CONSTRAINT2DELEMENT_EXPORT void _GetSupportedRelationshipInfos(DgnECInstanceCR instance, DgnECRelationshipInfoVector &infos) const override
PersistentElementPath captures a reference to an element.
Definition: PersistentElementPath.h:105
Definition: ConstraintHandlerBase.h:118
virtual ConstraintSolverDataProxyPtr _GetConstraintSolverData(ElementHandleCR eh) const =0
struct DgnPlatform::IDgnECInstanceLocator const & IDgnECInstanceLocatorCR
Definition: DgnECProviders.h:18
static CONSTRAINT2DELEMENT_EXPORT void DisplayConstraintAppliedMessage()
ConstraintRootPepIterator & operator++()
Definition: ConstraintHandlerBase.h:58
BentleyStatus
Definition: Bentley.h:208
Definition: ConstraintHandlerBase.h:34
virtual void _SetValue(double value)=0
virtual CONSTRAINT2DELEMENT_EXPORT void _OnPostModifyAgenda(ElementAgendaCP agenda, AgendaOperation opType, AgendaModify modify, bool isGroupOperation) override
A DgnModelRef provides access to a model in a Bentley::DgnPlatform::DgnFile.
Definition: DgnModelRef.h:172
virtual void _RemoveUnresolvedData(IConstraintRootPepCollection const &rootPeps)=0
CONSTRAINT2DELEMENT_EXPORT ConstraintECProvider(UInt16 providerId)
virtual CONSTRAINT2DELEMENT_EXPORT ECN::ECSchemaPtr _LocateSchemaInDgnFile(SchemaInfoR schemaInfo, ECN::SchemaMatchType matchType) override
virtual Constraint2dType _GetConstraintType() const =0
bvector< DimensionProxyPtr > m_dimensions
Definition: ConstraintHandlerBase.h:121
bmap< ECN::ECClassCP, ElementECEnablerPtr > ExternalEnablersByClass
Definition: ConstraintHandlerBase.h:232
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
static CONSTRAINT2DELEMENT_EXPORT void RegisterRejectExtensions(HandlerR handler)
bool operator!=(ConstraintRootPepIterator const &rhs) const
Definition: ConstraintHandlerBase.h:57
Constraint2dType
Enumerates for constraint types.
Definition: Constraint2dCoreAPI.h:83
virtual CONSTRAINT2DELEMENT_EXPORT void _RemapOrDrop(ParameterDefinitionCR def, IEditParameterDefinitionsR defs, ParameterDefinitionCP remapTo) const override
Interface that provides direct and efficient access to element data.
Definition: ElementRefBase.h:120
Definition: ConstraintHandlerBase.h:85
UInt16 m_handlerMinorId
Definition: ConstraintHandlerBase.h:185
virtual ConstraintOrientation _GetOrientation() const =0
virtual PersistentElementPathP GetPep(size_t index)=0
virtual CONSTRAINT2DELEMENT_EXPORT IDgnECInstanceFinderPtr _CreateFinder(DgnFileR dgnfile, ECQueryCR ecquery, void *providerPerFileCache, DgnECInstanceCreateContextCR context) const override
ECSchemaPersistence
Definition: DgnECProviders.h:63
RefCountedPtr< IConstraintRootPepCollection > IConstraintRootPepCollectionPtr
Definition: ConstraintHandlerBase.h:69
virtual CONSTRAINT2DELEMENT_EXPORT StatusInt _OnPreprocessCopyRemapIds(IReplaceXAttribute *toBeReplaced, XAttributeHandleCR xa, ElementHandleCR eh) override
Use the ElementCopyContext class to copy elements.
Definition: ElementCopyContext.h:241
int StatusInt
Definition: Bentley.h:222
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
RefCountedPtr< ConstraintProxy > ConstraintProxyPtr
Definition: ConstraintHandlerBase.h:111
Holds descriptive information about an ECSchema, particularly so that it can be examined before the E...
Definition: DgnECProviders.h:85
static CONSTRAINT2DELEMENT_EXPORT void AddSolver(IConstraintSolver *solver)
virtual CONSTRAINT2DELEMENT_EXPORT BentleyStatus _LocateSchemaXmlInDgnFile(WStringR schemaXml, SchemaInfoR schemaInfo, ECN::SchemaMatchType matchType) override
static CONSTRAINT2DELEMENT_EXPORT ISpriteP GetSpriteByIconName(WStringCR iconName, size_t size)
virtual CONSTRAINT2DELEMENT_EXPORT void _RemapParameterNames(IParameterDefinitionsCR defs, IParameterNameRemapperCR remapper) const override
virtual void _OnUndoRedoRootsChanged(ElementHandleR dependent, bvector< RootChange > const &rootsChanged, bvector< XAttributeHandle > const &xAttrsAffected) const override
Definition: ConstraintHandlerBase.h:168
virtual CONSTRAINT2DELEMENT_EXPORT void _ValidateDependencies(IParameterDefinitionsCR defs) const override
virtual BentleyStatus _ReplaceRootPeps(DataExternalizer &sink, DataInternalizer &source, IConstraintRootPepCollection &rootPeps, DgnModelRefR modelRef) const =0
virtual StatusInt _EvaluateAndUpdate(EditElementHandleR eeh)=0
RefCountedPtr< DimensionProxy > DimensionProxyPtr
Definition: ConstraintHandlerBase.h:112
virtual bool _IsConstraintElement(ElementHandleCR eh) const =0
virtual CONSTRAINT2DELEMENT_EXPORT IDgnECInstanceFinderPtr _CreateRelatedFinder(DgnECInstanceCR source, QueryRelatedClassSpecifierCR spec, DgnECInstanceCreateContextCR context) const override
bool IsEmpty() const
Definition: ConstraintHandlerBase.h:130
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
RefCountedPtr< ConstraintSolverDataProxy > ConstraintSolverDataProxyPtr
Definition: ConstraintHandlerBase.h:133
struct DgnPlatform::DgnECInstance const & DgnECInstanceCR
Definition: DgnPlatform.h:199
iterator begin()
Definition: ConstraintHandlerBase.h:65
Definition: ConstraintHandlerBase.h:183
virtual CONSTRAINT2DELEMENT_EXPORT DgnECHostType _GetHostType() const override
virtual StatusInt _GetDegreesOfFreedom(int &dof, int &rigidDof, DgnModelRefR modelRef) const =0
DgnECHostType
Describes the underlying type on which an instance can be persisted.
Definition: DgnECInstance.h:78
virtual size_t GetCount() const =0
virtual CONSTRAINT2DELEMENT_EXPORT DgnECRelationshipEnablerP _ObtainDgnECRelationshipEnabler(WCharCP schemaName, WCharCP className, DgnFileR dgnfile) override
ElementECEnablerPtr GetEnablerByName(WCharCP classname) const
size_type size() const
Definition: stdcxx/bstdmap.h:214
struct DgnPlatform::QueryRelatedClassSpecifier const & QueryRelatedClassSpecifierCR
Definition: DgnPlatform.h:538
Implemented by ECEnablers which expose properties of DgnECInstances.
Definition: DgnECInstance.h:256
virtual StatusInt _UpdateDimensions(ElementRefP elRef, bvector< DimensionProxy * > const &modifiedDimensions)=0
virtual CONSTRAINT2DELEMENT_EXPORT void _GetPotentialInstanceChanges(DgnECInstanceChangeRecordsR changes, DgnECTxnInfoCR txns, DgnECInstanceCreateContextCR context) const override
virtual Constraint2dType _GetConstraintType() const =0
virtual CONSTRAINT2DELEMENT_EXPORT void _OnRootsChanged(ElementHandleR dependent, bvector< RootChange > const &rootsChanged, bvector< XAttributeHandle > const &xAttrsAffected) override
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
virtual CONSTRAINT2DELEMENT_EXPORT void _OnPreModifyAgenda(ElementAgendaCP agenda, AgendaOperation opType, AgendaModify modify, bool isGroupOperation) override
Definition: ConstraintHandlerBase.h:27
virtual CONSTRAINT2DELEMENT_EXPORT UInt16 _GetProviderId() const override=0

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