Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:29

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