Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-25 09:21:46

0001 // Created on: 1996-09-04
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1996-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_FinderProcess_HeaderFile
0018 #define _Transfer_FinderProcess_HeaderFile
0019 
0020 #include <Transfer_ProcessForFinder.hxx>
0021 #include <Interface_InterfaceModel.hxx>
0022 
0023 class Interface_InterfaceModel;
0024 class Transfer_TransientMapper;
0025 class Transfer_Finder;
0026 
0027 //! Adds specific features to the generic definition :
0028 //! PrintTrace is adapted
0029 class Transfer_FinderProcess : public Transfer_ProcessForFinder
0030 {
0031 
0032 public:
0033   //! Sets FinderProcess at initial state, with an initial size
0034   Standard_EXPORT Transfer_FinderProcess(const int nb = 10000);
0035 
0036   //! Sets an InterfaceModel, which can be used during transfer
0037   //! for instance if a context must be managed, it is in the Model
0038   Standard_EXPORT void SetModel(const occ::handle<Interface_InterfaceModel>& model);
0039 
0040   //! Returns the Model which can be used for context
0041   Standard_EXPORT occ::handle<Interface_InterfaceModel> Model() const;
0042 
0043   //! In the list of mapped items (between 1 and NbMapped),
0044   //! searches for the first mapped item which follows <num0>
0045   //! (not included) and which has an attribute named <name>
0046   //! The considered Attributes are those brought by Finders,i.e.
0047   //! by Input data.
0048   //! While NextItemWithAttribute works on Result data (Binders)
0049   //!
0050   //! Hence, allows such an iteration
0051   //!
0052   //! for (num = FP->NextMappedWithAttribute(name,0);
0053   //! num > 0;
0054   //! num = FP->NextMappedWithAttribute(name,num) {
0055   //! .. process mapped item <num>
0056   //! }
0057   Standard_EXPORT int NextMappedWithAttribute(const char* const name, const int num0) const;
0058 
0059   //! Returns a TransientMapper for a given Transient Object
0060   //! Either <obj> is already mapped, then its Mapper is returned
0061   //! Or it is not, then a new one is created then returned, BUT
0062   //! it is not mapped here (use Bind or FindElseBind to do this)
0063   Standard_EXPORT occ::handle<Transfer_TransientMapper> TransientMapper(
0064     const occ::handle<Standard_Transient>& obj) const;
0065 
0066   //! Specific printing to trace a Finder (by its method ValueType)
0067   Standard_EXPORT void PrintTrace(const occ::handle<Transfer_Finder>& start,
0068                                   Standard_OStream&                   S) const override;
0069 
0070   //! Prints statistics on a given output, according mode
0071   Standard_EXPORT void PrintStats(const int mode, Standard_OStream& S) const;
0072 
0073   DEFINE_STANDARD_RTTIEXT(Transfer_FinderProcess, Transfer_ProcessForFinder)
0074 
0075 private:
0076   occ::handle<Interface_InterfaceModel> themodel;
0077 };
0078 
0079 #endif // _Transfer_FinderProcess_HeaderFile