Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:14:25

0001 // Created on: 1994-05-24
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1994-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_ActorDispatch_HeaderFile
0018 #define _Transfer_ActorDispatch_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Transfer_TransferDispatch.hxx>
0024 #include <Transfer_ActorOfTransientProcess.hxx>
0025 class Interface_InterfaceModel;
0026 class Interface_GeneralLib;
0027 class Interface_Protocol;
0028 class Transfer_Binder;
0029 class Standard_Transient;
0030 class Transfer_TransientProcess;
0031 
0032 //! This class allows to work with a TransferDispatch, i.e. to
0033 //! transfer entities from a data set to another one defined by
0034 //! the same interface norm, with the following features :
0035 //! - ActorDispatch itself acts as a default actor, i.e. it copies
0036 //! entities with the general service Copy, as CopyTool does
0037 //! - it allows to add other actors for specific ways of transfer,
0038 //! which may include data modifications, conversions ...
0039 //! - and other features from TransferDispatch (such as mapping
0040 //! other than one-one)
0041 class Transfer_ActorDispatch : public Transfer_ActorOfTransientProcess
0042 {
0043 
0044 public:
0045   //! Creates an ActorDispatch from a Model. Works with a General
0046   //! Service Library, given as an Argument
0047   //! This causes TransferDispatch and its TransientProcess to be
0048   //! created, with default actor <me>
0049   Standard_EXPORT Transfer_ActorDispatch(const occ::handle<Interface_InterfaceModel>& amodel,
0050                                          const Interface_GeneralLib&                  lib);
0051 
0052   //! Same as above, but Library is defined through a Protocol
0053   Standard_EXPORT Transfer_ActorDispatch(const occ::handle<Interface_InterfaceModel>& amodel,
0054                                          const occ::handle<Interface_Protocol>&       protocol);
0055 
0056   //! Same as above, but works with the Active Protocol
0057   Standard_EXPORT Transfer_ActorDispatch(const occ::handle<Interface_InterfaceModel>& amodel);
0058 
0059   //! Utility which adds an actor to the default <me> (it calls
0060   //! SetActor from the TransientProcess)
0061   Standard_EXPORT void AddActor(const occ::handle<Transfer_ActorOfTransientProcess>& actor);
0062 
0063   //! Returns the TransferDispatch, which does the work, records
0064   //! the intermediate data, etc...
0065   //! See TransferDispatch & CopyTool, to see the available methods
0066   Standard_EXPORT Transfer_TransferDispatch& TransferDispatch();
0067 
0068   //! Specific action : it calls the method Transfer from CopyTool
0069   //! i.e. the general service Copy, then returns the Binder
0070   //! produced by the TransientProcess
0071   Standard_EXPORT occ::handle<Transfer_Binder> Transfer(
0072     const occ::handle<Standard_Transient>&        start,
0073     const occ::handle<Transfer_TransientProcess>& TP,
0074     const Message_ProgressRange&                  theProgress = Message_ProgressRange()) override;
0075 
0076   DEFINE_STANDARD_RTTIEXT(Transfer_ActorDispatch, Transfer_ActorOfTransientProcess)
0077 
0078 private:
0079   Transfer_TransferDispatch thetool;
0080 };
0081 
0082 #endif // _Transfer_ActorDispatch_HeaderFile