0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Interface / Interface_CheckTool.hxx
1 // Created on: 1993-02-02
2 // Created by: Christian CAILLET
3 // Copyright (c) 1993-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 _Interface_CheckTool_HeaderFile
18 #define _Interface_CheckTool_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Interface_ShareTool.hxx>
25 #include <Standard_Integer.hxx>
26 class Interface_GTool;
27 class Interface_InterfaceModel;
28 class Interface_Protocol;
29 class Interface_Graph;
30 class Interface_HGraph;
31 class Standard_Transient;
32 class Interface_Check;
33 class Interface_CheckIterator;
34 class Interface_EntityIterator;
35
36
37 //! Performs Checks on Entities, using General Service Library and
38 //! Modules to work. Works on one Entity or on a complete Model
39 class Interface_CheckTool 
40 {
41 public:
42
43   DEFINE_STANDARD_ALLOC
44
45   
46   //! Creates a CheckTool, by calling the General Service Library
47   //! and Modules, selected through a Protocol, to work on a Model
48   //! Moreover, Protocol recognizes Unknown Entities
49   Standard_EXPORT Interface_CheckTool(const Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol);
50   
51   //! Creates a CheckTool, by calling the General Service Library
52   //! and Modules, selected through a Protocol, to work on a Model
53   //! Protocol and so on are taken from the Model (its GTool)
54   Standard_EXPORT Interface_CheckTool(const Handle(Interface_InterfaceModel)& model);
55   
56   //! Creates a CheckTool from a Graph. The Graph contains a Model
57   //! which designates a Protocol: they are used to create ShareTool
58   Standard_EXPORT Interface_CheckTool(const Interface_Graph& graph);
59   
60   Standard_EXPORT Interface_CheckTool(const Handle(Interface_HGraph)& hgraph);
61   
62   //! Fills as required a Check with the Error and Warning messages
63   //! produced by Checking a given Entity.
64   //! For an Erroneous or Corrected Entity : Check build at Analyse
65   //! time; else, Check computed for Entity (Verify integrity), can
66   //! use a Graph as required to control context
67   Standard_EXPORT void FillCheck (const Handle(Standard_Transient)& ent, const Interface_ShareTool& sh, Handle(Interface_Check)& ach);
68   
69   //! Utility method which Prints the content of a Check
70   Standard_EXPORT void Print (const Handle(Interface_Check)& ach, Standard_OStream& S) const;
71   
72   //! Simply Lists all the Checks and the Content (messages) and the
73   //! Entity, if there is, of each Check
74   //! (if all Checks are OK, nothing is Printed)
75   Standard_EXPORT void Print (const Interface_CheckIterator& list, Standard_OStream& S) const;
76   
77   //! Returns the Check associated to an Entity identified by
78   //! its Number in a Model.
79   Standard_EXPORT Handle(Interface_Check) Check (const Standard_Integer num);
80   
81   //! Checks if any Error has been detected (CheckList not empty)
82   //! Returns normally if none, raises exception if some exists.
83   //! It reuses the last computations from other checking methods,
84   //! unless the argument <reset> is given True
85   Standard_EXPORT void CheckSuccess (const Standard_Boolean reset = Standard_False);
86   
87   //! Returns list of all "remarkable" information, which include :
88   //! - GlobalCheck, if not empty
89   //! - Error Checks, for all Errors (Verify + Analyse)
90   //! - also Corrected Entities
91   //! - and Unknown Entities : for those, each Unknown Entity is
92   //! associated to an empty Check (it is neither an Error nor a
93   //! Correction, but a remarkable information)
94   Standard_EXPORT Interface_CheckIterator CompleteCheckList();
95   
96   //! Returns list of all Errors detected
97   //! Note that presence of Unknown Entities is not an error
98   //! Cumulates : GlobalCheck if error +
99   //! AnalyseCheckList + VerifyCheckList
100   Standard_EXPORT Interface_CheckIterator CheckList();
101   
102   //! Returns list of errors detected at Analyse time (syntactic)
103   //! (note that GlobalCheck is not in this list)
104   Standard_EXPORT Interface_CheckIterator AnalyseCheckList();
105   
106   //! Returns list of integrity constraints errors (semantic)
107   //! (note that GlobalCheck is not in this list)
108   Standard_EXPORT Interface_CheckIterator VerifyCheckList();
109   
110   //! Returns list of Corrections (includes GlobalCheck if corrected)
111   Standard_EXPORT Interface_CheckIterator WarningCheckList();
112   
113   //! Returns list of Unknown Entities
114   //! Note that Error and Erroneous Entities are not considered
115   //! as Unknown
116   Standard_EXPORT Interface_EntityIterator UnknownEntities();
117
118
119
120
121 protected:
122
123
124
125
126
127 private:
128
129
130
131   Handle(Interface_GTool) thegtool;
132   Interface_ShareTool theshare;
133   Standard_Integer thestat;
134
135
136 };
137
138
139
140
141
142
143
144 #endif // _Interface_CheckTool_HeaderFile