BaseElementTemplateExtender.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 #pragma once
10 
11 #include "MstnElementTemplate.h"
12 
14 
16  {
17  private:
18  virtual void _OnActivateElementTemplate (ElementTemplateNodeR elementTemplateNode, DgnModelRefP activeModelRef, TemplateSymbologyRemapperP remapper);
19  virtual void _OnCopyTemplateToFile (ElementTemplateNodeR copiedTemplate, ElementTemplateNodeR dgnLibTemplate);
20  virtual bool _ApplyElementTemplateParams (EditElementHandleR element, ElementTemplateNodeR templateToActivate, XInstanceContainerP modifiedECInstanceList, bool mustReferenceMatchingTemplate);
21  virtual bool _ApplyDefaultParams (EditElementHandleR element, ElementTemplateNodeR templateDataNode, TemplateSymbologyRemapperP remapper);
22  virtual bool _OnAddTemplateReference (EditElementHandleR element, ElementTemplateNodeR templateDataNode, bool scheduled);
23  virtual void _OnApplyTemplateWithoutReference (EditElementHandleR eeh, ElementTemplateNodeR node) override;
24  virtual ITemplatePropertiesCheckerP _GetAsITemplatePropertiesChecker () override;
25  virtual void _PopulateDefaultData (ElementTemplateNodeR templateDataNode, DgnFileP dgnFile);
26 
27  virtual bool _CompareElementData (ElementHandleCR element, ElementTemplateNodeCR templateNode, WStringR returnXmlErrorText, WStringCR checkTypes, bool& isFixable);
28  virtual bool _CompareInstanceData (ElementTemplateNodeCR localNode, ElementTemplateNodeCR dgnlibNode, WStringR returnXmlErrorText, WStringCR checkTypes, bool& isFixable);
29  virtual WString _GetSupportedCheckTypes ();
30 
31  public:
33  MSCORE_EXPORT static bool SetupSymbologyRemapperWithDefaults(TemplateSymbologyRemapperR remapper, ElementTemplateNodeR elementTemplateNode, DgnModelRefP modelRef);
35  MSCORE_EXPORT static void AddPatternCellDefinitionAsNeeded(ElementTemplateNodeR templateDataNode, DgnModelRefP modelRef);
37  MSCORE_EXPORT static bool GetOrCreateLevel(LevelId& levelId, WStringR levelName, DgnModelRefP modelRef, bool setUndoMark);
39  MSCORE_EXPORT static void GetPropertyValueFromStructInstance(ECN::ECValueR value, ECN::IECInstanceCR structInstance, ElementParameterType param, DgnModelRefP modelRef);
41 
42 }; // BaseElementTemplateExtender
43 
44 
46 
ElementParameterType
ElementParameterType is an enum of the built-in element parameter types that can be defined within an...
Definition: ElementTemplateParamsHelper.h:22
#define END_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:30
Definition: BaseElementTemplateExtender.h:15
UInt32 LevelId
Definition: DgnPlatformBaseType.r.h:85
struct Bentley::WString const & WStringCR
Definition: Bentley.h:239
#define BEGIN_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:29
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
A DgnFile is an in-memory representation of a physical file, regardless of its format.
Definition: DgnFile.h:308
Definition: MstnElementTemplate.h:117
struct DgnPlatform::ElementTemplateNode const & ElementTemplateNodeCR
Definition: DgnPlatform.h:299
A DgnModelRef provides access to a model in a Bentley::DgnPlatform::DgnFile.
Definition: DgnModelRef.h:172
IECInstance const & IECInstanceCR
Definition: ECObjects.h:67
Variant-like object used to set and retrieve property values in ECInstances.
Definition: ECValue.h:73
Element templates define symbology properties.
Definition: ElementTemplateNode.h:156
Definition: MstnElementTemplate.h:104
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51

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