DesignHistoryRestore.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 "DesignHistory.h"
11 
13 namespace DgnHistory {
14 
15 enum class RestoreType
16  {
17  NotRestoring = 0,
18  EntireFile = 1,
19  SelectedElements = 2,
20  };
21 
22 /*=================================================================================**/
57 {
58 bool m_dontForceModelDelete;
59 
60 public:
61 
62 void SetDontForceModelDelete (bool); // When un-creating a model, if there are existing modelrefs on the model, should the delete should fail?
63 
66 
69 
70 // ##########################################################################
72 
73 // ##########################################################################
74 
90 StatusInt Restore
91 (
92 DgnFileR file,
93 RevisionNumber const& targetRev,
94 bool fromUndo = false
95 );
96 
127 StatusInt Restore
128 (
129 DgnFileR file,
130 RevisionNumber const& targetRev,
131 ModelsToElementChangesMap const& elements
132 );
133 
138 StatusInt Restore
139 (
140 DgnFileR file,
141 RevisionNumber const& targetRev,
142 IElementQueryResultFilter& csfilter,
143 ElementChangeRecordFilter const& ssfilter
144 );
145 
148 static
149 RestoreType IsRestoreInProgress (DgnFileR file);
150 
151 // ##########################################################################
153 // ##########################################################################
154 
158 static
159 bool CanRestore
160 (
161 DesignHistory& dh,
163 ElementChangeRecordFilter const& ssfilter
164 );
165 
175 static
176 bool IsRollback
177 (
178 RevisionNumber& targetRev,
179 DesignHistory& dh,
181 ElementChangeRecordFilter const& ssfilter
182 );
183 
184 
186 static long GetUndoPos();
187 
188 }; // DesignHistoryRestore
190 }; // namespace DgnHistory
RestoreType
Definition: DesignHistoryRestore.h:15
Provides access to the design history of a specified file.
Definition: DesignHistory.h:402
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
A set of revision numbers pertaining to the design history of a specified file.
Definition: DesignHistory.h:76
A history revision number.
Definition: DgnHistory.h:26
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
A DgnFile is an in-memory representation of a physical file, regardless of its format.
Definition: DgnFile.h:308
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
Interface to filter query results at the element level.
Definition: DesignHistory.h:166
int StatusInt
Definition: Bentley.h:222
Definition: DesignHistoryRestore.h:56

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