1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _IFSelect_Transformer_HeaderFile
#define _IFSelect_Transformer_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_IFSelect_Transformer_HeaderFile
#include <Handle_IFSelect_Transformer.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Interface_Protocol_HeaderFile
#include <Handle_Interface_Protocol.hxx>
#endif
#ifndef _Handle_Interface_InterfaceModel_HeaderFile
#include <Handle_Interface_InterfaceModel.hxx>
#endif
#ifndef _Handle_Standard_Transient_HeaderFile
#include <Handle_Standard_Transient.hxx>
#endif
class Interface_Graph;
class Interface_Protocol;
class Interface_CheckIterator;
class Interface_InterfaceModel;
class Standard_Transient;
class TCollection_AsciiString;
//! A Transformer defines the way an InterfaceModel is transformed <br>
//! (without sending it to a file). <br>
//! In order to work, each type of Transformer defines it method <br>
//! Perform, it can be parametred as needed. <br>
//! <br>
//! It receives a Model (the data set) as input. It then can : <br>
//! - edit this Model on the spot (i.e. alter its content : by <br>
//! editing entities, or adding/replacing some ...) <br>
//! - produce a copied Model, which detains the needed changes <br>
//! (typically on the same type, but some or all entities beeing <br>
//! rebuilt or converted; or converted from a protocol to <br>
//! another one) <br>
class IFSelect_Transformer : public MMgt_TShared {
public:
//! Performs a Transformation (defined by each sub-class) : <br>
//! <G> gives the input data (especially the starting model) and <br>
//! can be used for queries (by Selections, etc...) <br>
//! <protocol> allows to work with General Services as necessary <br>
//! (it applies to input data) <br>
//! If the change corresponds to a conversion to a new protocol, <br>
//! see also the method ChangeProtocol <br>
//! <checks> stores produced checks messages if any <br>
//! <newmod> gives the result of the transformation : <br>
//! - if it is Null (i.e. has not been affected), the transformation <br>
//! has been made on the spot, it is assumed to cause no change <br>
//! to the graph of dependances <br>
//! - if it equates the starting Model, it has been transformed on <br>
//! the spot (possibiliy some entities were replaced inside it) <br>
//! - if it is new, it corresponds to a new data set which replaces <br>
//! the starting one <br>
//! <br>
//! <me> is mutable to allow results for ChangeProtocol to be <br>
//! memorized if needed, and to store informations useful for <br>
//! the method Updated <br>
//! <br>
//! Returns True if Done, False if an Error occured : in this case, <br>
//! if a new data set has been produced, the transformation <br>
//! is ignored, else data may be corrupted. <br>
Standard_EXPORT virtual Standard_Boolean Perform(const Interface_Graph& G,const Handle(Interface_Protocol)& protocol,Interface_CheckIterator& checks,Handle(Interface_InterfaceModel)& newmod) = 0;
//! This methods allows to declare that the Protocol applied to <br>
//! the new Model has changed. It applies to the last call to <br>
//! Perform. <br>
//! <br>
//! Returns True if the Protocol has changed, False else. <br>
//! The provided default keeps the starting Protocol. This method <br>
//! should be redefined as required by the effect of Perform. <br>
Standard_EXPORT virtual Standard_Boolean ChangeProtocol(Handle(Interface_Protocol)& newproto) const;
//! This method allows to know what happened to a starting <br>
//! entity after the last Perform. If <entfrom> (from starting <br>
//! model) has one and only one known item which corresponds in <br>
//! the new produced model, this method must return True and <br>
//! fill the argument <entto>. Else, it returns False. <br>
Standard_EXPORT virtual Standard_Boolean Updated(const Handle(Standard_Transient)& entfrom,Handle(Standard_Transient)& entto) const = 0;
//! Returns a text which defines the way a Transformer works <br>
//! (to identify the transformation it performs) <br>
Standard_EXPORT virtual TCollection_AsciiString Label() const = 0;
DEFINE_STANDARD_RTTI(IFSelect_Transformer)
protected:
private:
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|