Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:17:34

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_ActorOfProcessForTransient_HeaderFile
0018 #define _Transfer_ActorOfProcessForTransient_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Transient.hxx>
0024 #include <NCollection_IndexedDataMap.hxx>
0025 #include <Transfer_Binder.hxx>
0026 #include <Message_ProgressRange.hxx>
0027 
0028 class Standard_DomainError;
0029 class Standard_Transient;
0030 class Transfer_ProcessForTransient;
0031 class Transfer_IteratorOfProcessForTransient;
0032 class Transfer_Binder;
0033 class Transfer_SimpleBinderOfTransient;
0034 
0035 class Transfer_ActorOfProcessForTransient : public Standard_Transient
0036 {
0037 
0038 public:
0039   Standard_EXPORT Transfer_ActorOfProcessForTransient();
0040 
0041   //! Prerequisite for Transfer : the method Transfer is
0042   //! called on a starting object only if Recognize has
0043   //! returned True on it
0044   //! This allows to define a list of Actors, each one
0045   //! processing a definite kind of data
0046   //! TransferProcess calls Recognize on each one before
0047   //! calling Transfer. But even if Recognize has returned
0048   //! True, Transfer can reject by returning a Null Binder
0049   //! (afterwards rejection), the next actor is then invoked
0050   //!
0051   //! The provided default returns True, can be redefined
0052   Standard_EXPORT virtual bool Recognize(const occ::handle<Standard_Transient>& start);
0053 
0054   //! Specific action of Transfer. The Result is stored in
0055   //! the returned Binder, or a Null Handle for "No result"
0056   //! (Default defined as doing nothing; should be deferred)
0057   //! "mutable" allows the Actor to record intermediate
0058   //! information, in addition to those of TransferProcess
0059   Standard_EXPORT virtual occ::handle<Transfer_Binder> Transferring(
0060     const occ::handle<Standard_Transient>&           start,
0061     const occ::handle<Transfer_ProcessForTransient>& TP,
0062     const Message_ProgressRange&                     theProgress = Message_ProgressRange());
0063 
0064   //! Prepares and Returns a Binder for a Transient Result
0065   //! Returns a Null Handle if <res> is itself Null
0066   Standard_EXPORT occ::handle<Transfer_SimpleBinderOfTransient> TransientResult(
0067     const occ::handle<Standard_Transient>& res) const;
0068 
0069   //! Returns a Binder for No Result, i.e. a Null Handle
0070   Standard_EXPORT occ::handle<Transfer_Binder> NullResult() const;
0071 
0072   //! If <mode> is True, commands an Actor to be set at the
0073   //! end of the list of Actors (see SetNext)
0074   //! If it is False (creation default), each add Actor is
0075   //! set at the beginning of the list
0076   //! This allows to define default Actors (which are Last)
0077   Standard_EXPORT void SetLast(const bool mode = true);
0078 
0079   //! Returns the Last status (see SetLast).
0080   Standard_EXPORT bool IsLast() const;
0081 
0082   //! Defines a Next Actor : it can then be asked to work if
0083   //! <me> produces no result for a given type of Object.
0084   //! If Next is already set and is not "Last", calls
0085   //! SetNext on it. If Next defined and "Last", the new
0086   //! actor is added before it in the list
0087   Standard_EXPORT void SetNext(const occ::handle<Transfer_ActorOfProcessForTransient>& next);
0088 
0089   //! Returns the Actor defined as Next, or a Null Handle
0090   Standard_EXPORT occ::handle<Transfer_ActorOfProcessForTransient> Next() const;
0091 
0092   DEFINE_STANDARD_RTTI_INLINE(Transfer_ActorOfProcessForTransient, Standard_Transient)
0093 
0094 private:
0095   occ::handle<Transfer_ActorOfProcessForTransient> thenext;
0096   bool                                             thelast;
0097 };
0098 
0099 #endif // _Transfer_ActorOfProcessForTransient_HeaderFile