0031939: Coding - correction of spelling errors in comments [part 3]
[occt.git] / src / Transfer / Transfer_ActorOfProcessForTransient.hxx
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_ActorOfProcessForTransient_HeaderFile
18 #define _Transfer_ActorOfProcessForTransient_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Boolean.hxx>
24 #include <Standard_Transient.hxx>
25 #include <TColStd_MapTransientHasher.hxx>
26 #include <TColStd_HSequenceOfTransient.hxx>
27 #include <Transfer_TransferMapOfProcessForTransient.hxx>
28 #include <Message_ProgressRange.hxx>
29
30 class Standard_DomainError;
31 class Standard_Transient;
32 class Transfer_ProcessForTransient;
33 class Transfer_IteratorOfProcessForTransient;
34 class Transfer_Binder;
35 class Transfer_SimpleBinderOfTransient;
36
37 class Transfer_ActorOfProcessForTransient;
38 DEFINE_STANDARD_HANDLE(Transfer_ActorOfProcessForTransient, Standard_Transient)
39
40
41 class Transfer_ActorOfProcessForTransient : public Standard_Transient
42 {
43
44 public:
45
46   
47   Standard_EXPORT Transfer_ActorOfProcessForTransient();
48   
49   //! Prerequesite for Transfer : the method Transfer is
50   //! called on a starting object only if Recognize has
51   //! returned True on it
52   //! This allows to define a list of Actors, each one
53   //! processing a definite kind of data
54   //! TransferProcess calls Recognize on each one before
55   //! calling Transfer. But even if Recognize has returned
56   //! True, Transfer can reject by returning a Null Binder
57   //! (afterwards rejection), the next actor is then invoked
58   //!
59   //! The provided default returns True, can be redefined
60   Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Standard_Transient)& start);
61   
62   //! Specific action of Transfer. The Result is stored in
63   //! the returned Binder, or a Null Handle for "No result"
64   //! (Default defined as doing nothing; should be deferred)
65   //! "mutable" allows the Actor to record intermediate
66   //! information, in addition to those of TransferProcess
67   Standard_EXPORT virtual Handle(Transfer_Binder) Transferring
68                    (const Handle(Standard_Transient)& start,
69                     const Handle(Transfer_ProcessForTransient)& TP,
70                     const Message_ProgressRange& theProgress = Message_ProgressRange());
71   
72   //! Prepares and Returns a Binder for a Transient Result
73   //! Returns a Null Handle if <res> is itself Null
74   Standard_EXPORT Handle(Transfer_SimpleBinderOfTransient) TransientResult (const Handle(Standard_Transient)& res) const;
75   
76   //! Returns a Binder for No Result, i.e. a Null Handle
77   Standard_EXPORT Handle(Transfer_Binder) NullResult() const;
78   
79   //! If <mode> is True, commands an Actor to be set at the
80   //! end of the list of Actors (see SetNext)
81   //! If it is False (creation default), each add Actor is
82   //! set at the beginning of the list
83   //! This allows to define default Actors (which are Last)
84   Standard_EXPORT void SetLast (const Standard_Boolean mode = Standard_True);
85   
86   //! Returns the Last status (see SetLast).
87   Standard_EXPORT Standard_Boolean IsLast() const;
88   
89   //! Defines a Next Actor : it can then be asked to work if
90   //! <me> produces no result for a given type of Object.
91   //! If Next is already set and is not "Last", calls
92   //! SetNext on it. If Next defined and "Last", the new
93   //! actor is added before it in the list
94   Standard_EXPORT void SetNext (const Handle(Transfer_ActorOfProcessForTransient)& next);
95   
96   //! Returns the Actor defined as Next, or a Null Handle
97   Standard_EXPORT Handle(Transfer_ActorOfProcessForTransient) Next() const;
98
99
100
101
102   DEFINE_STANDARD_RTTI_INLINE(Transfer_ActorOfProcessForTransient,Standard_Transient)
103
104 protected:
105
106
107
108
109 private:
110
111
112   Handle(Transfer_ActorOfProcessForTransient) thenext;
113   Standard_Boolean thelast;
114
115
116 };
117
118
119
120
121
122
123
124 #endif // _Transfer_ActorOfProcessForTransient_HeaderFile