42cf5bc1 |
1 | // Created on: 1992-02-03 |
2 | // Created by: Christian CAILLET |
3 | // Copyright (c) 1992-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Transfer_ProcessForTransient_HeaderFile |
18 | #define _Transfer_ProcessForTransient_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Boolean.hxx> |
24 | #include <Standard_Integer.hxx> |
25 | #include <TColStd_IndexedMapOfInteger.hxx> |
26 | #include <Transfer_TransferMapOfProcessForTransient.hxx> |
27 | #include <MMgt_TShared.hxx> |
28 | #include <TColStd_MapTransientHasher.hxx> |
29 | #include <TColStd_HSequenceOfTransient.hxx> |
30 | #include <Standard_CString.hxx> |
31 | #include <Standard_Type.hxx> |
32 | class Message_Messenger; |
33 | class Standard_Transient; |
34 | class Transfer_Binder; |
35 | class Transfer_ActorOfProcessForTransient; |
36 | class Message_ProgressIndicator; |
37 | class Interface_InterfaceError; |
38 | class Transfer_TransferFailure; |
39 | class Transfer_TransferMapOfProcessForTransient; |
40 | class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient; |
41 | class Transfer_IteratorOfProcessForTransient; |
42 | class Message_Msg; |
43 | class Interface_Check; |
44 | class Interface_CheckIterator; |
45 | |
46 | |
47 | class Transfer_ProcessForTransient; |
48 | DEFINE_STANDARD_HANDLE(Transfer_ProcessForTransient, MMgt_TShared) |
49 | |
c60ae7f6 |
50 | //! Manages Transfer of Transient Objects. Produces also |
51 | //! ActorOfTransientProcess (deferred class), |
52 | //! IteratorOfTransientProcess (for Results), |
53 | //! TransferMapOfTransientProcess (internally used) |
54 | //! Normally uses as TransientProcess, which adds some specifics |
42cf5bc1 |
55 | |
56 | class Transfer_ProcessForTransient : public MMgt_TShared |
57 | { |
58 | |
59 | public: |
60 | |
61 | |
36b9ff75 |
62 | //! Sets TransferProcess at initial state. Gives an Initial size |
63 | //! (indicative) for the Map when known (default is 10000). |
64 | //! Sets default trace file as a printer and default trace level |
65 | //! (see Message_TraceFile). |
42cf5bc1 |
66 | Standard_EXPORT Transfer_ProcessForTransient(const Standard_Integer nb = 10000); |
67 | |
36b9ff75 |
68 | //! Sets TransferProcess at initial state. Gives an Initial size |
69 | //! (indicative) for the Map when known (default is 10000). |
70 | //! Sets a specified printer. |
42cf5bc1 |
71 | Standard_EXPORT Transfer_ProcessForTransient(const Handle(Message_Messenger)& printer, const Standard_Integer nb = 10000); |
72 | |
36b9ff75 |
73 | //! Resets a TransferProcess as ready for a completely new work. |
74 | //! Clears general data (roots) and the Map |
42cf5bc1 |
75 | Standard_EXPORT void Clear(); |
76 | |
36b9ff75 |
77 | //! Rebuilds the Map and the roots to really remove Unbound items |
78 | //! Because Unbind keeps the entity in place, even if not bound |
79 | //! Hence, working by checking new items is meaningless if a |
80 | //! formerly unbound item is rebound |
42cf5bc1 |
81 | Standard_EXPORT void Clean(); |
82 | |
36b9ff75 |
83 | //! Resizes the Map as required (if a new reliable value has been |
84 | //! determined). Acts only if <nb> is greater than actual NbMapped |
42cf5bc1 |
85 | Standard_EXPORT void Resize (const Standard_Integer nb); |
86 | |
36b9ff75 |
87 | //! Defines an Actor, which is used for automatic Transfer |
88 | //! If already defined, the new Actor is cumulated |
89 | //! (see SetNext from Actor) |
42cf5bc1 |
90 | Standard_EXPORT void SetActor (const Handle(Transfer_ActorOfProcessForTransient)& actor); |
91 | |
36b9ff75 |
92 | //! Returns the defined Actor. Returns a Null Handle if |
93 | //! not set. |
42cf5bc1 |
94 | Standard_EXPORT Handle(Transfer_ActorOfProcessForTransient) Actor() const; |
95 | |
36b9ff75 |
96 | //! Returns the Binder which is linked with a starting Object |
97 | //! It can either bring a Result (Transfer done) or none (for a |
98 | //! pre-binding). |
99 | //! If no Binder is linked with <start>, returns a Null Handle |
100 | //! Considers a category number, by default 0 |
42cf5bc1 |
101 | Standard_EXPORT Handle(Transfer_Binder) Find (const Handle(Standard_Transient)& start) const; |
102 | |
36b9ff75 |
103 | //! Returns True if a Result (whatever its form) is Bound with |
104 | //! a starting Object. I.e., if a Binder with a Result set, |
105 | //! is linked with it |
106 | //! Considers a category number, by default 0 |
42cf5bc1 |
107 | Standard_EXPORT Standard_Boolean IsBound (const Handle(Standard_Transient)& start) const; |
108 | |
36b9ff75 |
109 | //! Returns True if the result of the transfer of an object is |
110 | //! already used in other ones. If it is, Rebind cannot change it. |
111 | //! Considers a category number, by default 0 |
42cf5bc1 |
112 | Standard_EXPORT Standard_Boolean IsAlreadyUsed (const Handle(Standard_Transient)& start) const; |
113 | |
36b9ff75 |
114 | //! Creates a Link a starting Object with a Binder. This Binder |
115 | //! can either bring a Result (effective Binding) or none (it can |
116 | //! be set later : pre-binding). |
117 | //! Considers a category number, by default 0 |
42cf5bc1 |
118 | Standard_EXPORT void Bind (const Handle(Standard_Transient)& start, const Handle(Transfer_Binder)& binder); |
119 | |
36b9ff75 |
120 | //! Changes the Binder linked with a starting Object for its |
121 | //! unitary transfer. This it can be useful when the exact form |
122 | //! of the result is known once the transfer is widely engaged. |
123 | //! This can be done only on first transfer. |
124 | //! Considers a category number, by default 0 |
42cf5bc1 |
125 | Standard_EXPORT void Rebind (const Handle(Standard_Transient)& start, const Handle(Transfer_Binder)& binder); |
126 | |
36b9ff75 |
127 | //! Removes the Binder linked with a starting object |
128 | //! If this Binder brings a non-empty Check, it is replaced by |
129 | //! a VoidBinder. Also removes from the list of Roots as required. |
130 | //! Returns True if done, False if <start> was not bound |
131 | //! Considers a category number, by default 0 |
42cf5bc1 |
132 | Standard_EXPORT Standard_Boolean Unbind (const Handle(Standard_Transient)& start); |
133 | |
36b9ff75 |
134 | //! Returns a Binder for a starting entity, as follows : |
135 | //! Tries to Find the already bound one |
136 | //! If none found, creates a VoidBinder and Binds it |
42cf5bc1 |
137 | Standard_EXPORT Handle(Transfer_Binder) FindElseBind (const Handle(Standard_Transient)& start); |
138 | |
36b9ff75 |
139 | //! Sets Messenger used for outputting messages. |
42cf5bc1 |
140 | Standard_EXPORT void SetMessenger (const Handle(Message_Messenger)& messenger); |
141 | |
36b9ff75 |
142 | //! Returns Messenger used for outputting messages. |
143 | //! The returned object is guaranteed to be non-null; |
144 | //! default is Message::Messenger(). |
42cf5bc1 |
145 | Standard_EXPORT Handle(Message_Messenger) Messenger() const; |
146 | |
36b9ff75 |
147 | //! Sets trace level used for outputting messages: |
148 | //! <trace> = 0 : no trace at all |
149 | //! <trace> = 1 : handled exceptions and calls to AddError |
150 | //! <trace> = 2 : also calls to AddWarning |
151 | //! <trace> = 3 : also traces new Roots |
152 | //! (uses method ErrorTrace). |
153 | //! Default is 1 : Errors traced |
42cf5bc1 |
154 | Standard_EXPORT void SetTraceLevel (const Standard_Integer tracelev); |
155 | |
36b9ff75 |
156 | //! Returns trace level used for outputting messages. |
42cf5bc1 |
157 | Standard_EXPORT Standard_Integer TraceLevel() const; |
158 | |
36b9ff75 |
159 | //! New name for AddFail (Msg) |
42cf5bc1 |
160 | Standard_EXPORT void SendFail (const Handle(Standard_Transient)& start, const Message_Msg& amsg); |
161 | |
36b9ff75 |
162 | //! New name for AddWarning (Msg) |
42cf5bc1 |
163 | Standard_EXPORT void SendWarning (const Handle(Standard_Transient)& start, const Message_Msg& amsg); |
164 | |
36b9ff75 |
165 | //! Adds an information message |
166 | //! Trace is filled if trace level is at least 3 |
42cf5bc1 |
167 | Standard_EXPORT void SendMsg (const Handle(Standard_Transient)& start, const Message_Msg& amsg); |
168 | |
36b9ff75 |
169 | //! Adds an Error message to a starting entity (to the check of |
170 | //! its Binder of category 0, as a Fail) |
42cf5bc1 |
171 | Standard_EXPORT void AddFail (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = ""); |
172 | |
36b9ff75 |
173 | //! (other name of AddFail, maintained for compatibility) |
42cf5bc1 |
174 | Standard_EXPORT void AddError (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = ""); |
175 | |
36b9ff75 |
176 | //! Adds an Error Message to a starting entity from the definition |
177 | //! of a Msg (Original+Value) |
42cf5bc1 |
178 | Standard_EXPORT void AddFail (const Handle(Standard_Transient)& start, const Message_Msg& amsg); |
179 | |
36b9ff75 |
180 | //! Adds a Warning message to a starting entity (to the check of |
181 | //! its Binder of category 0) |
42cf5bc1 |
182 | Standard_EXPORT void AddWarning (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = ""); |
183 | |
36b9ff75 |
184 | //! Adds a Warning Message to a starting entity from the definition |
185 | //! of a Msg (Original+Value) |
42cf5bc1 |
186 | Standard_EXPORT void AddWarning (const Handle(Standard_Transient)& start, const Message_Msg& amsg); |
187 | |
188 | Standard_EXPORT void Mend (const Handle(Standard_Transient)& start, const Standard_CString pref = ""); |
189 | |
36b9ff75 |
190 | //! Returns the Check attached to a starting entity. If <start> |
191 | //! is unknown, returns an empty Check |
192 | //! Adds a case name to a starting entity |
193 | //! Adds a case value to a starting entity |
194 | //! Returns the complete case list for an entity. Null Handle if empty |
195 | //! In the list of mapped items (between 1 and NbMapped), |
196 | //! searches for the first item which follows <num0>(not included) |
197 | //! and which has an attribute named <name> |
198 | //! Attributes are brought by Binders |
199 | //! Hence, allows such an iteration |
200 | //! |
201 | //! for (num = TP->NextItemWithAttribute(name,0); |
202 | //! num > 0; |
203 | //! num = TP->NextItemWithAttribute(name,num) { |
204 | //! .. process mapped item <num> |
205 | //! } |
206 | //! Returns the type of an Attribute attached to binders |
207 | //! If this name gives no Attribute, returns ParamVoid |
208 | //! If this name gives several different types, returns ParamMisc |
209 | //! Else, returns the effective type (ParamInteger, ParamReal, |
210 | //! ParamIdent, or ParamText) |
211 | //! Returns the list of recorded Attribute Names, as a Dictionary |
212 | //! of Integer : each value gives the count of items which bring |
213 | //! this attribute name |
214 | //! By default, considers all the attribute names |
215 | //! If <rootname> is given, considers only the attribute names |
216 | //! which begin by <rootname> |
42cf5bc1 |
217 | Standard_EXPORT Handle(Interface_Check) Check (const Handle(Standard_Transient)& start) const; |
218 | |
36b9ff75 |
219 | //! Binds a starting object with a Transient Result. |
220 | //! Uses a SimpleBinderOfTransient to work. If there is already |
221 | //! one but with no Result set, sets its Result. |
222 | //! Considers a category number, by default 0 |
42cf5bc1 |
223 | Standard_EXPORT void BindTransient (const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& res); |
224 | |
36b9ff75 |
225 | //! Returns the Result of the Transfer of an object <start> as a |
226 | //! Transient Result. |
227 | //! Returns a Null Handle if there is no Transient Result |
228 | //! Considers a category number, by default 0 |
229 | //! Warning : Supposes that Binding is done with a SimpleBinderOfTransient |
42cf5bc1 |
230 | Standard_EXPORT const Handle(Standard_Transient)& FindTransient (const Handle(Standard_Transient)& start) const; |
231 | |
36b9ff75 |
232 | //! Prepares an object <start> to be bound with several results. |
233 | //! If no Binder is yet attached to <obj>, a MultipleBinder |
234 | //! is created, empty. If a Binder is already set, it must |
235 | //! accept Multiple Binding. |
236 | //! Considers a category number, by default 0 |
42cf5bc1 |
237 | Standard_EXPORT void BindMultiple (const Handle(Standard_Transient)& start); |
238 | |
36b9ff75 |
239 | //! Adds an item to a list of results bound to a starting object. |
240 | //! Considers a category number, by default 0, for all results |
42cf5bc1 |
241 | Standard_EXPORT void AddMultiple (const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& res); |
242 | |
36b9ff75 |
243 | //! Searches for a transient result attached to a starting object, |
244 | //! according to its type, by criterium IsKind(atype) |
245 | //! |
246 | //! In case of multiple result, explores the list and gives in |
247 | //! <val> the first transient result IsKind(atype) |
248 | //! Returns True and fills <val> if found |
249 | //! Else, returns False (<val> is not touched, not even nullified) |
250 | //! |
251 | //! This syntactic form avoids to do DownCast : if a result is |
252 | //! found with the good type, it is loaded in <val> and can be |
253 | //! immediately used, well initialised |
42cf5bc1 |
254 | Standard_EXPORT Standard_Boolean FindTypedTransient (const Handle(Standard_Transient)& start, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const; |
255 | |
36b9ff75 |
256 | //! Searches for a transient result recorded in a Binder, whatever |
257 | //! this Binder is recorded or not in <me> |
258 | //! |
259 | //! This is strictly equivalent to the class method GetTypedResult |
260 | //! from class SimpleBinderOfTransient, but is just lighter to call |
261 | //! |
262 | //! Apart from this, works as FindTypedTransient |
42cf5bc1 |
263 | Standard_EXPORT Standard_Boolean GetTypedTransient (const Handle(Transfer_Binder)& binder, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const; |
264 | |
36b9ff75 |
265 | //! Returns the maximum possible value for Map Index |
266 | //! (no result can be bound with a value greater than it) |
42cf5bc1 |
267 | Standard_EXPORT Standard_Integer NbMapped() const; |
268 | |
36b9ff75 |
269 | //! Returns the Starting Object bound to an Index, |
42cf5bc1 |
270 | Standard_EXPORT const Handle(Standard_Transient)& Mapped (const Standard_Integer num) const; |
271 | |
36b9ff75 |
272 | //! Returns the Index value bound to a Starting Object, 0 if none |
42cf5bc1 |
273 | Standard_EXPORT Standard_Integer MapIndex (const Handle(Standard_Transient)& start) const; |
274 | |
36b9ff75 |
275 | //! Returns the Binder bound to an Index |
276 | //! Considers a category number, by default 0 |
42cf5bc1 |
277 | Standard_EXPORT Handle(Transfer_Binder) MapItem (const Standard_Integer num) const; |
278 | |
36b9ff75 |
279 | //! Declares <obj> (and its Result) as Root. This status will be |
280 | //! later exploited by RootResult, see below (Result can be |
281 | //! produced at any time) |
42cf5bc1 |
282 | Standard_EXPORT void SetRoot (const Handle(Standard_Transient)& start); |
283 | |
36b9ff75 |
284 | //! Enable (if <stat> True) or Disables (if <stat> False) Root |
285 | //! Management. If it is set, Transfers are considered as stacked |
286 | //! (a first Transfer commands other Transfers, and so on) and |
287 | //! the Transfers commanded by an external caller are "Root". |
288 | //! Remark : SetRoot can be called whatever this status, on every |
289 | //! object. |
290 | //! Default is set to True. |
42cf5bc1 |
291 | Standard_EXPORT void SetRootManagement (const Standard_Boolean stat); |
292 | |
36b9ff75 |
293 | //! Returns the count of recorded Roots |
42cf5bc1 |
294 | Standard_EXPORT Standard_Integer NbRoots() const; |
295 | |
36b9ff75 |
296 | //! Returns a Root Entity given its number in the list (1-NbRoots) |
42cf5bc1 |
297 | Standard_EXPORT const Handle(Standard_Transient)& Root (const Standard_Integer num) const; |
298 | |
36b9ff75 |
299 | //! Returns the Binder bound with a Root Entity given its number |
300 | //! Considers a category number, by default 0 |
42cf5bc1 |
301 | Standard_EXPORT Handle(Transfer_Binder) RootItem (const Standard_Integer num) const; |
302 | |
36b9ff75 |
303 | //! Returns the index in the list of roots for a starting item, |
304 | //! or 0 if it is not recorded as a root |
42cf5bc1 |
305 | Standard_EXPORT Standard_Integer RootIndex (const Handle(Standard_Transient)& start) const; |
306 | |
36b9ff75 |
307 | //! Returns Nesting Level of Transfers (managed by methods |
308 | //! TranscriptWith & Co). Starts to zero. If no automatic Transfer |
309 | //! is used, it remains to zero. Zero means Root Level. |
42cf5bc1 |
310 | Standard_EXPORT Standard_Integer NestingLevel() const; |
311 | |
36b9ff75 |
312 | //! Resets Nesting Level of Transfers to Zero (Root Level), |
313 | //! whatever its current value. |
42cf5bc1 |
314 | Standard_EXPORT void ResetNestingLevel(); |
315 | |
36b9ff75 |
316 | //! Tells if <start> has been recognized as good candidate for |
317 | //! Transfer. i.e. queries the Actor and its Nexts |
42cf5bc1 |
318 | Standard_EXPORT Standard_Boolean Recognize (const Handle(Standard_Transient)& start) const; |
319 | |
36b9ff75 |
320 | //! Performs the Transfer of a Starting Object, by calling |
321 | //! the method TransferProduct (see below). |
322 | //! Mapping and Roots are managed : nothing is done if a Result is |
323 | //! already Bound, an exception is raised in case of error. |
42cf5bc1 |
324 | Standard_EXPORT Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start); |
325 | |
36b9ff75 |
326 | //! Same as Transferring but does not return the Binder. |
327 | //! Simply returns True in case of success (for user call) |
42cf5bc1 |
328 | Standard_EXPORT Standard_Boolean Transfer (const Handle(Standard_Transient)& start); |
329 | |
36b9ff75 |
330 | //! Allows controls if exceptions will be handled |
331 | //! Transfer Operations |
332 | //! <err> False : they are not handled with try {} catch {} |
333 | //! <err> True : they are |
334 | //! Default is False: no handling performed |
42cf5bc1 |
335 | Standard_EXPORT void SetErrorHandle (const Standard_Boolean err); |
336 | |
36b9ff75 |
337 | //! Returns error handling flag |
42cf5bc1 |
338 | Standard_EXPORT Standard_Boolean ErrorHandle() const; |
339 | |
36b9ff75 |
340 | //! Method called when trace is asked |
341 | //! Calls PrintTrace to display information relevant for starting |
342 | //! objects (which can be redefined) |
343 | //! <level> is Nesting Level of Transfer (0 = root) |
344 | //! <mode> controls the way the trace is done : |
345 | //! 0 neutral, 1 for Error, 2 for Warning message, 3 for new Root |
42cf5bc1 |
346 | Standard_EXPORT void StartTrace (const Handle(Transfer_Binder)& binder, const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Integer mode) const; |
347 | |
36b9ff75 |
348 | //! Prints a short information on a starting object. By default |
349 | //! prints its Dynamic Type. Can be redefined |
42cf5bc1 |
350 | Standard_EXPORT virtual void PrintTrace (const Handle(Standard_Transient)& start, const Handle(Message_Messenger)& S) const; |
351 | |
36b9ff75 |
352 | //! Returns True if we are surely in a DeadLoop. Evaluation is not |
353 | //! exact, it is a "majorant" which must be computed fast. |
354 | //! This "majorant" is : <alevel> greater than NbMapped. |
42cf5bc1 |
355 | Standard_EXPORT Standard_Boolean IsLooping (const Standard_Integer alevel) const; |
356 | |
36b9ff75 |
357 | //! Returns, as an iterator, the log of root transfer, i.e. the |
358 | //! created objects and Binders bound to starting roots |
359 | //! If withstart is given True, Starting Objets are also returned |
42cf5bc1 |
360 | Standard_EXPORT Transfer_IteratorOfProcessForTransient RootResult (const Standard_Boolean withstart = Standard_False) const; |
361 | |
36b9ff75 |
362 | //! Returns, as an Iterator, the entire log of transfer (list of |
363 | //! created objects and Binders which can bring errors) |
364 | //! If withstart is given True, Starting Objets are also returned |
42cf5bc1 |
365 | Standard_EXPORT Transfer_IteratorOfProcessForTransient CompleteResult (const Standard_Boolean withstart = Standard_False) const; |
366 | |
36b9ff75 |
367 | //! Returns Binders which are neither "Done" nor "Initial", |
368 | //! that is Error,Loop or Run (abnormal states at end of Transfer) |
369 | //! Starting Objects are given in correspondance in the iterator |
42cf5bc1 |
370 | Standard_EXPORT Transfer_IteratorOfProcessForTransient AbnormalResult() const; |
371 | |
36b9ff75 |
372 | //! Returns a CheckList as a list of Check : each one is for a |
373 | //! starting entity which have either check (warning or fail) |
374 | //! messages are attached, or are in abnormal state : that case |
375 | //! gives a specific message |
376 | //! If <erronly> is True, checks with Warnings only are ignored |
42cf5bc1 |
377 | Standard_EXPORT Interface_CheckIterator CheckList (const Standard_Boolean erronly) const; |
378 | |
36b9ff75 |
379 | //! Returns, as an Iterator, the log of transfer for one object |
380 | //! <level> = 0 : this object only |
381 | //! and if <start> is a scope owner (else, <level> is ignored) : |
382 | //! <level> = 1 : object plus its immediate scoped ones |
383 | //! <level> = 2 : object plus all its scoped ones |
42cf5bc1 |
384 | Standard_EXPORT Transfer_IteratorOfProcessForTransient ResultOne (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean withstart = Standard_False) const; |
385 | |
36b9ff75 |
386 | //! Returns a CheckList for one starting object |
387 | //! <level> interpreted as by ResultOne |
388 | //! If <erronly> is True, checks with Warnings only are ignored |
42cf5bc1 |
389 | Standard_EXPORT Interface_CheckIterator CheckListOne (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean erronly) const; |
390 | |
36b9ff75 |
391 | //! Returns True if no check message is attached to a starting |
392 | //! object. <level> interpreted as by ResultOne |
393 | //! If <erronly> is True, checks with Warnings only are ignored |
42cf5bc1 |
394 | Standard_EXPORT Standard_Boolean IsCheckListEmpty (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean erronly) const; |
395 | |
36b9ff75 |
396 | //! Removes Results attached to (== Unbinds) a given object and, |
397 | //! according <level> : |
398 | //! <level> = 0 : only it |
399 | //! <level> = 1 : it plus its immediately owned sub-results(scope) |
400 | //! <level> = 2 : it plus all its owned sub-results(scope) |
42cf5bc1 |
401 | Standard_EXPORT void RemoveResult (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean compute = Standard_True); |
402 | |
36b9ff75 |
403 | //! Computes a number to be associated to a starting object in |
404 | //! a check or a check-list |
405 | //! By default, returns 0; can be redefined |
42cf5bc1 |
406 | Standard_EXPORT virtual Standard_Integer CheckNum (const Handle(Standard_Transient)& start) const; |
407 | |
36b9ff75 |
408 | //! Sets Progress indicator |
42cf5bc1 |
409 | Standard_EXPORT void SetProgress (const Handle(Message_ProgressIndicator)& theProgress); |
410 | |
36b9ff75 |
411 | //! Gets Progress indicator |
42cf5bc1 |
412 | Standard_EXPORT Handle(Message_ProgressIndicator) GetProgress() const; |
413 | |
414 | |
415 | |
416 | |
417 | DEFINE_STANDARD_RTTI(Transfer_ProcessForTransient,MMgt_TShared) |
418 | |
419 | protected: |
420 | |
421 | |
422 | |
423 | |
424 | private: |
425 | |
426 | |
36b9ff75 |
427 | //! Same as Find but stores the last access to the map, for a |
428 | //! faster access on next calls (as Bind does too) |
429 | //! Considers a category number, by default 0 |
430 | //! C++ : return const & |
42cf5bc1 |
431 | Standard_EXPORT Handle(Transfer_Binder) FindAndMask (const Handle(Standard_Transient)& start); |
432 | |
36b9ff75 |
433 | //! Internal action of Transfer, called by Transferring, with or |
434 | //! without ErrorHandle. It invokes the Actor to work (set by |
435 | //! SetActor), and tries its Nexts if no result is produced, |
436 | //! until a Non Null Binder is produced. |
437 | //! But keep in mind that a Null Binder can allways be returned |
438 | //! if a Starting Entity has not been recognized at all. |
42cf5bc1 |
439 | Standard_EXPORT Handle(Transfer_Binder) TransferProduct (const Handle(Standard_Transient)& start); |
440 | |
441 | Standard_Boolean theerrh; |
442 | Standard_Integer thetrace; |
443 | Handle(Message_Messenger) themessenger; |
444 | Standard_Integer thelevel; |
445 | Standard_Integer therootl; |
446 | Standard_Boolean therootm; |
447 | TColStd_IndexedMapOfInteger theroots; |
448 | Handle(Standard_Transient) thelastobj; |
449 | Handle(Transfer_Binder) thelastbnd; |
450 | Standard_Integer theindex; |
451 | Handle(Transfer_ActorOfProcessForTransient) theactor; |
452 | Transfer_TransferMapOfProcessForTransient themap; |
453 | Handle(Message_ProgressIndicator) myProgress; |
454 | |
455 | |
456 | }; |
457 | |
458 | |
459 | |
460 | |
461 | |
462 | |
463 | |
464 | #endif // _Transfer_ProcessForTransient_HeaderFile |