Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:22:20

0001 // Created on: 1992-02-03
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Transfer_ActorOfProcessForFinder_HeaderFile
0018 #define _Transfer_ActorOfProcessForFinder_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Transient.hxx>
0023 #include <NCollection_IndexedDataMap.hxx>
0024 #include <Transfer_Binder.hxx>
0025 #include <Transfer_Finder.hxx>
0026 #include <Transfer_FindHasher.hxx>
0027 #include <Message_ProgressRange.hxx>
0028 
0029 class Standard_DomainError;
0030 class Transfer_Finder;
0031 class Transfer_FindHasher;
0032 class Transfer_ProcessForFinder;
0033 class Transfer_IteratorOfProcessForFinder;
0034 class Transfer_Binder;
0035 class Transfer_SimpleBinderOfTransient;
0036 class Standard_Transient;
0037 
0038 class Transfer_ActorOfProcessForFinder : public Standard_Transient
0039 {
0040 
0041 public:
0042   Standard_EXPORT Transfer_ActorOfProcessForFinder();
0043 
0044   //! Prerequisite for Transfer : the method Transfer is
0045   //! called on a starting object only if Recognize has
0046   //! returned True on it
0047   //! This allows to define a list of Actors, each one
0048   //! processing a definite kind of data
0049   //! TransferProcess calls Recognize on each one before
0050   //! calling Transfer. But even if Recognize has returned
0051   //! True, Transfer can reject by returning a Null Binder
0052   //! (afterwards rejection), the next actor is then invoked
0053   //!
0054   //! The provided default returns True, can be redefined
0055   Standard_EXPORT virtual bool Recognize(const occ::handle<Transfer_Finder>& start);
0056 
0057   //! Specific action of Transfer. The Result is stored in
0058   //! the returned Binder, or a Null Handle for "No result"
0059   //! (Default defined as doing nothing; should be deferred)
0060   //! "mutable" allows the Actor to record intermediate
0061   //! information, in addition to those of TransferProcess
0062   Standard_EXPORT virtual occ::handle<Transfer_Binder> Transferring(
0063     const occ::handle<Transfer_Finder>&           start,
0064     const occ::handle<Transfer_ProcessForFinder>& TP,
0065     const Message_ProgressRange&                  theProgress = Message_ProgressRange());
0066 
0067   //! Prepares and Returns a Binder for a Transient Result
0068   //! Returns a Null Handle if <res> is itself Null
0069   Standard_EXPORT occ::handle<Transfer_SimpleBinderOfTransient> TransientResult(
0070     const occ::handle<Standard_Transient>& res) const;
0071 
0072   //! Returns a Binder for No Result, i.e. a Null Handle
0073   Standard_EXPORT occ::handle<Transfer_Binder> NullResult() const;
0074 
0075   //! If <mode> is True, commands an Actor to be set at the
0076   //! end of the list of Actors (see SetNext)
0077   //! If it is False (creation default), each add Actor is
0078   //! set at the beginning of the list
0079   //! This allows to define default Actors (which are Last)
0080   Standard_EXPORT void SetLast(const bool mode = true);
0081 
0082   //! Returns the Last status (see SetLast).
0083   Standard_EXPORT bool IsLast() const;
0084 
0085   //! Defines a Next Actor : it can then be asked to work if
0086   //! <me> produces no result for a given type of Object.
0087   //! If Next is already set and is not "Last", calls
0088   //! SetNext on it. If Next defined and "Last", the new
0089   //! actor is added before it in the list
0090   Standard_EXPORT void SetNext(const occ::handle<Transfer_ActorOfProcessForFinder>& next);
0091 
0092   //! Returns the Actor defined as Next, or a Null Handle
0093   Standard_EXPORT occ::handle<Transfer_ActorOfProcessForFinder> Next() const;
0094 
0095   DEFINE_STANDARD_RTTI_INLINE(Transfer_ActorOfProcessForFinder, Standard_Transient)
0096 
0097 private:
0098   occ::handle<Transfer_ActorOfProcessForFinder> thenext;
0099   bool                                          thelast;
0100 };
0101 
0102 #endif // _Transfer_ActorOfProcessForFinder_HeaderFile