DetailSymbolStyleUtils.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 
11 
13 enum class DSStyleStatus
14  {
15  Success = BSISUCCESS, // 0
16  BadArg = 1,
17  NoReferencedDetailSymbolStyle = 2,
18  ElementNotADetailingSymbol = 3,
19  ElementNotValid = 4,
20  InvalidSymbolType = 5,
21  InvalidDataTreeOwner = 6,
22  UnableToCreateNewStyleNode = 7,
23  Error = BSIERROR, // 0x8000
24  };
25 
26 /*=================================================================================**/
31 struct DetailSymbolStyleUtils
32 {
33 public:
34 
38  DGNPLATFORM_EXPORT static DSStyleStatus RemoveStyleReferenceFromElement (ElementRefP elemRef);
39 
43  DGNPLATFORM_EXPORT static DSStyleStatus ScheduleStyleReferenceRemoval (EditElementHandleR graphicElemHandle);
44 
50  DGNPLATFORM_EXPORT static DSStyleStatus GetPathForReferencedStyle (WChar* pathBuf, size_t bufChars, ElementRefP elemRef);
51 
58  DGNPLATFORM_EXPORT static DSStyleStatus GetPathForStyle (WChar* pathBuf, size_t bufChars, DgnPlatform::ElementId detailSymbolStyleID, DgnModelRefP modelRef);
59 
65  DGNPLATFORM_EXPORT static DSStyleStatus GetStyleIDFromPath (DgnPlatform::ElementId* pDetailSymbolStyleID, WCharCP wPath, DgnFileP dgnFileP);
66 
73  DGNPLATFORM_EXPORT static DSStyleStatus GetReferencedStyle (WChar* detailSymbolStylePath, size_t numPathChars, DgnPlatform::ElementId* pElementID, ElementRefP elementRef);
74 
79  DGNPLATFORM_EXPORT static DSStyleStatus GetReferencedStyleID (DgnPlatform::ElementId* pDetailSymbolStyleID, ElementRefP elemRef);
80 
84  DGNPLATFORM_EXPORT static ElementId GetReferencedStyleIDFromHandle (ElementHandleCR graphicElemHandle);
85 
90  DGNPLATFORM_EXPORT static DSStyleStatus SetReferencedStyleID (ElementRefP elementRef, DgnPlatform::ElementId detailSymbolStyleID);
91 
97  DGNPLATFORM_EXPORT static DSStyleStatus ScheduleStyleReferenceAttachment (EditElementHandleR graphicElemHandle, bool& detailSymbolStyleAddedToFile, DetailingSymbolStyle& detailSymbolStyleNode);
98 
103  DGNPLATFORM_EXPORT static BentleyStatus CreateXAttributeDataForStyle (DataExternalizer& , DetailingSymbolStyle& detailSymbolStyle, DgnFileP dgnFileP);
104 
111  DGNPLATFORM_EXPORT static BentleyStatus GetStyleNameFromXAttributeData (WStringR styleName, void const* data, int size, DgnFileP dgnFileP);
112 
118  DGNPLATFORM_EXPORT static BentleyStatus CreateXAttributeDataForStyle (DataExternalizer& sink, WCharCP styleName, DgnFileP dgnFileP);
119 
124  DGNPLATFORM_EXPORT static DSStyleStatus GetReferencedStylePath (WString& templatePath, ElementRefP elementRef);
125 
132  DGNPLATFORM_EXPORT static DSStyleStatus GetReferencedStyleInfo (ElementHandleCR ehandle, DetailingSymbolType& symbolType, WStringR stylePath, WStringR styleClassName);
133 
137  DGNPLATFORM_EXPORT static WString GetStyleClassName (DetailingSymbolType symbolType);
138 };
139 
140 
142 
wchar_t WChar
Definition: Bentley.h:223
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
wchar_t const * WCharCP
Definition: Bentley.h:224
DetailingSymbolType
Detailing Symbol Types.
Definition: DetailingSymbolCore.r.h:16
struct Bentley::WString & WStringR
Definition: Bentley.h:239
struct DgnPlatform::EditElementHandle & EditElementHandleR
Definition: DgnPlatform.h:254
BentleyStatus
Definition: Bentley.h:208
struct DgnPlatform::DgnFile * DgnFileP
Definition: DgnPlatform.h:206
Definition: Bentley.h:211
#define END_BENTLEY_ECOBJECT_NAMESPACE
Definition: DgnPlatform.h:41
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
UInt64 ElementId
Definition: DgnPlatformBaseType.r.h:83
struct DgnPlatform::ElementRefBase * ElementRefP
Definition: DgnPlatform.h:166
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
size_type size() const
Definition: stdcxx/bstdmap.h:214
struct DgnPlatform::DgnModelRef * DgnModelRefP
Definition: DgnPlatform.h:223
Definition: Bentley.h:213

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