42cf5bc1 |
1 | // Created on: 1996-09-04 |
2 | // Created by: Christian CAILLET |
3 | // Copyright (c) 1996-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Transfer_FinderProcess_HeaderFile |
18 | #define _Transfer_FinderProcess_HeaderFile |
19 | |
42cf5bc1 |
20 | #include <Transfer_ProcessForFinder.hxx> |
9e3ca93a |
21 | #include <Interface_InterfaceModel.hxx> |
22 | |
42cf5bc1 |
23 | class Interface_InterfaceModel; |
24 | class Transfer_TransientMapper; |
42cf5bc1 |
25 | class Transfer_Finder; |
26 | class Message_Messenger; |
27 | |
42cf5bc1 |
28 | class Transfer_FinderProcess; |
29 | DEFINE_STANDARD_HANDLE(Transfer_FinderProcess, Transfer_ProcessForFinder) |
30 | |
31 | //! Adds specific features to the generic definition : |
32 | //! PrintTrace is adapted |
33 | class Transfer_FinderProcess : public Transfer_ProcessForFinder |
34 | { |
35 | |
36 | public: |
37 | |
38 | |
39 | //! Sets FinderProcess at initial state, with an initial size |
40 | Standard_EXPORT Transfer_FinderProcess(const Standard_Integer nb = 10000); |
41 | |
42 | //! Sets an InterfaceModel, which can be used during transfer |
43 | //! for instance if a context must be managed, it is in the Model |
44 | Standard_EXPORT void SetModel (const Handle(Interface_InterfaceModel)& model); |
45 | |
46 | //! Returns the Model which can be used for context |
47 | Standard_EXPORT Handle(Interface_InterfaceModel) Model() const; |
48 | |
49 | //! In the list of mapped items (between 1 and NbMapped), |
50 | //! searches for the first mapped item which follows <num0> |
51 | //! (not included) and which has an attribute named <name> |
52 | //! The considered Attributes are those brought by Finders,i.e. |
53 | //! by Input data. |
54 | //! While NextItemWithAttribute works on Result data (Binders) |
55 | //! |
56 | //! Hence, allows such an iteration |
57 | //! |
58 | //! for (num = FP->NextMappedWithAttribute(name,0); |
59 | //! num > 0; |
60 | //! num = FP->NextMappedWithAttribute(name,num) { |
61 | //! .. process mapped item <num> |
62 | //! } |
63 | Standard_EXPORT Standard_Integer NextMappedWithAttribute (const Standard_CString name, const Standard_Integer num0) const; |
64 | |
65 | //! Returns a TransientMapper for a given Transient Object |
66 | //! Either <obj> is already mapped, then its Mapper is returned |
67 | //! Or it is not, then a new one is created then returned, BUT |
68 | //! it is not mapped here (use Bind or FindElseBind to do this) |
69 | Standard_EXPORT Handle(Transfer_TransientMapper) TransientMapper (const Handle(Standard_Transient)& obj) const; |
70 | |
71 | //! Specific printing to trace a Finder (by its method ValueType) |
72 | Standard_EXPORT virtual void PrintTrace (const Handle(Transfer_Finder)& start, const Handle(Message_Messenger)& S) const Standard_OVERRIDE; |
73 | |
74 | //! Prints statistics on a given output, according mode |
75 | Standard_EXPORT void PrintStats (const Standard_Integer mode, const Handle(Message_Messenger)& S) const; |
76 | |
42cf5bc1 |
77 | DEFINE_STANDARD_RTTI(Transfer_FinderProcess,Transfer_ProcessForFinder) |
78 | |
42cf5bc1 |
79 | private: |
42cf5bc1 |
80 | Handle(Interface_InterfaceModel) themodel; |
42cf5bc1 |
81 | }; |
82 | |
42cf5bc1 |
83 | #endif // _Transfer_FinderProcess_HeaderFile |