dgnitemindex.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 
14 //=======================================================================================
17 //=======================================================================================
19 {
20 public:
21  DGNPLATFORM_EXPORT ModelId GetModelId () const;
22  DGNPLATFORM_EXPORT WCharCP GetName () const;
23  DGNPLATFORM_EXPORT WCharCP GetDescription () const;
24  DGNPLATFORM_EXPORT bool Is3D () const;
25  DGNPLATFORM_EXPORT bool IsDeleted () const;
26  DGNPLATFORM_EXPORT bool IsCell () const;
27  DGNPLATFORM_EXPORT bool IsAnnotationCell () const;
28  DGNPLATFORM_EXPORT CellLibraryType GetCellType () const;
29  DGNPLATFORM_EXPORT bool IsHidden () const;
30  DGNPLATFORM_EXPORT bool IsMarkup () const;
31  DGNPLATFORM_EXPORT DgnModelType GetModelType () const;
32  DGNPLATFORM_EXPORT double GetLastSavedTime () const;
33 };
34 
35 typedef bvector<ModelIndexItem> ModelItemVector;
36 
37 //=======================================================================================
40 //===============+===============+===============+===============+===============+=======
41 struct ModelIndexIterator : RefCountedBase, std::iterator<std::forward_iterator_tag, const ModelIndexItem>
42 {
43 private:
44  virtual void MakeClassAbstract() = 0;
45 public:
46 public:
47  DGNPLATFORM_EXPORT bool IsDifferent(ModelIndexIterator const& rhs) const;
48  DGNPLATFORM_EXPORT void MoveToNext ();
49  DGNPLATFORM_EXPORT ModelIndexItemCR GetCurrent () const;
50 };
51 
52 //=======================================================================================
59 //=======================================================================================
60 struct ModelIndex
61 {
62 public:
64 
67 
69  DGNPLATFORM_EXPORT ModelIndexItemCP GetItemByName (WCharCP name) const;
70 
72  DGNPLATFORM_EXPORT ModelIndexItemCP GetItemByID (ModelId id, const bool getIfDeleted) const;
73 
75  DGNPLATFORM_EXPORT void CopyItems(ModelItemVector&, bool includeDeletedModels = false) const;
76 };
77 
79 
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
ModelIndex - Provides access to basic information about all the models in a DgnFile.
Definition: dgnitemindex.h:60
iterator begin()
Definition: stdcxx/bstdmap.h:178
Definition: dgnitemindex.h:41
bvector< ModelIndexItem > ModelItemVector
Definition: dgnitemindex.h:35
iterator end()
Definition: stdcxx/bstdmap.h:186
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
wchar_t const * WCharCP
Definition: Bentley.h:224
VirtualCollectionIterator< ModelIndexIterator > const_iterator
Definition: dgnitemindex.h:63
DgnModelType
Identifies the type or purpose of a model.
Definition: DgnPlatform.r.h:367
Definition: dgnitemindex.h:18
struct DgnPlatform::ModelIndexItem const & ModelIndexItemCR
Definition: DgnPlatform.h:219
Int32 ModelId
Definition: DgnPlatformBaseType.r.h:84
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
This template is used by iterators that hide their implementation from the published API...
Definition: VirtualCollectionIterator.h:33
CellLibraryType
Definition: DgnPlatform.r.h:376
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
struct DgnPlatform::ModelIndexItem const * ModelIndexItemCP
Definition: DgnPlatform.h:219

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