XDataTreeNode.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 #include "XInstanceContainer.h"
11 
12 DGNPLATFORM_TYPEDEFS(XDataTreeOwner);
13 DGNPLATFORM_TYPEDEFS(XDataTreeNode);
14 DGNPLATFORM_REF_COUNTED_PTR(XDataTreeNode);
15 
16 DGNPLATFORM_TYPEDEFS(NameTreeNode);
17 DGNPLATFORM_REF_COUNTED_PTR(NameTreeNode);
18 
20 
21 
22 /*=================================================================================**/
25 
29  {
30 public:
33  NameTreeNodeP ParentNode;
34  bvector<NameTreeNodePtr> Children;
35 
36 public:
39  DGNPLATFORM_EXPORT NameTreeNodePtr LocateChild (WCharCP name);
40 
45  DGNPLATFORM_EXPORT NameTreeNodePtr AddChild (WCharCP name, ElementId id=0);
46 
49  DGNPLATFORM_EXPORT static NameTreeNodePtr CreateRootNode ();
50  };
51 
52 /*=================================================================================**/
57 
61 {
62 public:
64  DGNPLATFORM_EXPORT void SortParent ();
65 
67  DGNPLATFORM_EXPORT void SortChildren ();
68 
70  DGNPLATFORM_EXPORT WString GetFullPath ()const;
71 
73  DGNPLATFORM_EXPORT WCharCP GetNameCP ()const;
74 
77  DGNPLATFORM_EXPORT void SetName (WCharCP name);
78 
80  DGNPLATFORM_EXPORT bool AllowChildNodes ()const;
81 
83  DGNPLATFORM_EXPORT DgnPlatform::ElementId GetParentId ()const;
84 
86  DGNPLATFORM_EXPORT int GetSortPriority ()const;
87 
90  DGNPLATFORM_EXPORT void SetSortPriority (int sortPriority);
91 
94 
96  DGNPLATFORM_EXPORT ElementRefP GetElementRef ()const;
97 
101 
103  DGNPLATFORM_EXPORT DgnPlatform::HandlerId GetHandlerId ()const;
104 
106  DGNPLATFORM_EXPORT XInstanceContainer* GetXInstanceContainer();
107 
109  DGNPLATFORM_EXPORT XDataTreeOwner* GetOwner() const;
110 
113  DGNPLATFORM_EXPORT void ClearCachedInstances ();
114 
118  DGNPLATFORM_EXPORT BentleyStatus ReloadXAttributeData ();
119 
124  DGNPLATFORM_EXPORT static XDataTreeNodePtr FindByElementId (DgnPlatform::ElementId elemID, DgnPlatform::HandlerId handlerId, XDataTreeOwner& owner);
125 
127  DGNPLATFORM_EXPORT WCharCP GetPathSeparatorCP () const;
128 
131  DGNPLATFORM_EXPORT ECN::IECInstancePtr GetECInstanceBySchemaName (WCharCP fullSchemaName) const;
132 
135  DGNPLATFORM_EXPORT ECN::IECInstancePtr GetECInstanceByClassName (WCharCP className) const;
136 
145  DGNPLATFORM_EXPORT static XDataTreeNodePtr Create (WStringR name, int sortPriority, bool allowChildNodes, XDataTreeNodeP parentNodeP, XDataTreeOwner& owner, DgnPlatform::HandlerId handlerId, XInstanceContainer* seedInstances);
146 
147 }; // XDataTreeNode
148 
! Class used to hold an heirarchy of names.
Definition: XDataTreeNode.h:28
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
Definition: XInstanceContainer.h:24
Open for write access.
ElementId Id
Definition: XDataTreeNode.h:32
NameTreeNodeP ParentNode
Definition: XDataTreeNode.h:33
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
wchar_t const * WCharCP
Definition: Bentley.h:224
WString Name
Definition: XDataTreeNode.h:31
! Class used to hold XAttribute data that contains the name, sort priority, and ! parent node informa...
Definition: XDataTreeNode.h:60
BentleyStatus
Definition: Bentley.h:208
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
Interface that provides direct and efficient access to element data.
Definition: ElementRefBase.h:120
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
int StatusInt
Definition: Bentley.h:222
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
UInt64 ElementId
Definition: DgnPlatformBaseType.r.h:83
Definition: XDataTreeOwner.h:23
DGNPLATFORM_TYPEDEFS(XDataTreeOwner)
bvector< NameTreeNodePtr > Children
Definition: XDataTreeNode.h:34
DGNPLATFORM_REF_COUNTED_PTR(XDataTreeNode)
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
A two-part identifier, consisting of a major ID and a minor ID.
Definition: DgnCore.h:21

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