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