summaryrefslogtreecommitdiff
path: root/inc/Interface_CheckTool.hxx
blob: dc9f4e19bdb4ce7b6e5a773a028bc58a9fef2267 (plain)
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// 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 _Interface_CheckTool_HeaderFile
#define _Interface_CheckTool_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Handle_Interface_GTool_HeaderFile
#include <Handle_Interface_GTool.hxx>
#endif
#ifndef _Interface_ShareTool_HeaderFile
#include <Interface_ShareTool.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Handle_Interface_InterfaceModel_HeaderFile
#include <Handle_Interface_InterfaceModel.hxx>
#endif
#ifndef _Handle_Interface_Protocol_HeaderFile
#include <Handle_Interface_Protocol.hxx>
#endif
#ifndef _Handle_Interface_HGraph_HeaderFile
#include <Handle_Interface_HGraph.hxx>
#endif
#ifndef _Handle_Standard_Transient_HeaderFile
#include <Handle_Standard_Transient.hxx>
#endif
#ifndef _Handle_Interface_Check_HeaderFile
#include <Handle_Interface_Check.hxx>
#endif
#ifndef _Handle_Message_Messenger_HeaderFile
#include <Handle_Message_Messenger.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class Interface_GTool;
class Interface_CheckFailure;
class Interface_InterfaceModel;
class Interface_Protocol;
class Interface_Graph;
class Interface_HGraph;
class Standard_Transient;
class Interface_ShareTool;
class Interface_Check;
class Message_Messenger;
class Interface_CheckIterator;
class Interface_EntityIterator;


//! Performs Checks on Entities, using General Service Library and <br>
//!           Modules to work. Works on one Entity or on a complete Model <br>
class Interface_CheckTool  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Creates a CheckTool, by calling the General Service Library <br>
//!           and Modules, selected through a Protocol, to work on a Model <br>
//!           Moreover, Protocol recognizes Unknown Entities <br>
  Standard_EXPORT   Interface_CheckTool(const Handle(Interface_InterfaceModel)& model,const Handle(Interface_Protocol)& protocol);
  //! Creates a CheckTool, by calling the General Service Library <br>
//!           and Modules, selected through a Protocol, to work on a Model <br>
//!           Protocol and so on are taken from the Model (its GTool) <br>
  Standard_EXPORT   Interface_CheckTool(const Handle(Interface_InterfaceModel)& model);
  //! Creates a CheckTool from a Graph. The Graph contains a Model <br>
//!           which designates a Protocol: they are used to create ShareTool <br>
  Standard_EXPORT   Interface_CheckTool(const Interface_Graph& graph);
  
  Standard_EXPORT   Interface_CheckTool(const Handle(Interface_HGraph)& hgraph);
  //! Fills as required a Check with the Error and Warning messages <br>
//!           produced by Checking a given Entity. <br>
//!           For an Erroneous or Corrected Entity : Check build at Analyse <br>
//!           time; else, Check computed for Entity (Verify integrity), can <br>
//!           use a Graph as required to control context <br>
  Standard_EXPORT     void FillCheck(const Handle(Standard_Transient)& ent,const Interface_ShareTool& sh,Handle(Interface_Check)& ach) ;
  //! Utility method which Prints the content of a Check <br>
  Standard_EXPORT     void Print(const Handle(Interface_Check)& ach,const Handle(Message_Messenger)& S) const;
  //! Simply Lists all the Checks and the Content (messages) and the <br>
//!           Entity, if there is, of each Check <br>
//!           (if all Checks are OK, nothing is Printed) <br>
  Standard_EXPORT     void Print(const Interface_CheckIterator& list,const Handle(Message_Messenger)& S) const;
  //! Returns the Check associated to an Entity identified by <br>
//!           its Number in a Model. <br>
  Standard_EXPORT     Handle_Interface_Check Check(const Standard_Integer num) ;
  //! Checks if any Error has been detected (CheckList not empty) <br>
//!           Returns normally if none, raises exception if some exists. <br>
//!           It reuses the last computations from other checking methods, <br>
//!           unless the argument <resest> is given True <br>
  Standard_EXPORT     void CheckSuccess(const Standard_Boolean reset = Standard_False) ;
  //! Returns list of all "remarkable" informations, which include : <br>
//!           - GlobalCheck, if not empty <br>
//!           - Error Checks, for all Errors (Verify + Analyse) <br>
//!           - also Corrected Entities <br>
//!           - and Unknown Entities : for those, each Unknown Entity is <br>
//!             associated to an empty Check (it is neither an Error nor a <br>
//!             Correction, but a remarkable information) <br>
  Standard_EXPORT     Interface_CheckIterator CompleteCheckList() ;
  //! Returns list of all Errors detected <br>
//!           Note that presence of Unknown Entities is not an error <br>
//!           Cumulates : GlobalCheck if error + <br>
//!             AnalyseCheckList + VerifyCheckList <br>
  Standard_EXPORT     Interface_CheckIterator CheckList() ;
  //! Returns list of errors dectected at Analyse time (syntactic) <br>
//!           (note that GlobalCheck is not in this list) <br>
  Standard_EXPORT     Interface_CheckIterator AnalyseCheckList() ;
  //! Returns list of integrity constraints errors (semantic) <br>
//!           (note that GlobalCheck is not in this list) <br>
  Standard_EXPORT     Interface_CheckIterator VerifyCheckList() ;
  //! Returns list of Corrections (includes GlobalCheck if corrected) <br>
  Standard_EXPORT     Interface_CheckIterator WarningCheckList() ;
  //! Returns list of Unknown Entities <br>
//!           Note that Error and Erroneous Entities are not considered <br>
//!           as Unknown <br>
  Standard_EXPORT     Interface_EntityIterator UnknownEntities() ;





protected:





private:



Handle_Interface_GTool thegtool;
Interface_ShareTool theshare;
Standard_Integer thestat;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif