|
||||
File indexing completed on 2025-01-18 10:04:07
0001 // Created on: 1993-02-02 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1993-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 _Interface_CheckTool_HeaderFile 0018 #define _Interface_CheckTool_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Interface_ShareTool.hxx> 0025 #include <Standard_Integer.hxx> 0026 class Interface_GTool; 0027 class Interface_InterfaceModel; 0028 class Interface_Protocol; 0029 class Interface_Graph; 0030 class Interface_HGraph; 0031 class Standard_Transient; 0032 class Interface_Check; 0033 class Interface_CheckIterator; 0034 class Interface_EntityIterator; 0035 0036 0037 //! Performs Checks on Entities, using General Service Library and 0038 //! Modules to work. Works on one Entity or on a complete Model 0039 class Interface_CheckTool 0040 { 0041 public: 0042 0043 DEFINE_STANDARD_ALLOC 0044 0045 0046 //! Creates a CheckTool, by calling the General Service Library 0047 //! and Modules, selected through a Protocol, to work on a Model 0048 //! Moreover, Protocol recognizes Unknown Entities 0049 Standard_EXPORT Interface_CheckTool(const Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol); 0050 0051 //! Creates a CheckTool, by calling the General Service Library 0052 //! and Modules, selected through a Protocol, to work on a Model 0053 //! Protocol and so on are taken from the Model (its GTool) 0054 Standard_EXPORT Interface_CheckTool(const Handle(Interface_InterfaceModel)& model); 0055 0056 //! Creates a CheckTool from a Graph. The Graph contains a Model 0057 //! which designates a Protocol: they are used to create ShareTool 0058 Standard_EXPORT Interface_CheckTool(const Interface_Graph& graph); 0059 0060 Standard_EXPORT Interface_CheckTool(const Handle(Interface_HGraph)& hgraph); 0061 0062 //! Fills as required a Check with the Error and Warning messages 0063 //! produced by Checking a given Entity. 0064 //! For an Erroneous or Corrected Entity : Check build at Analyse 0065 //! time; else, Check computed for Entity (Verify integrity), can 0066 //! use a Graph as required to control context 0067 Standard_EXPORT void FillCheck (const Handle(Standard_Transient)& ent, const Interface_ShareTool& sh, Handle(Interface_Check)& ach); 0068 0069 //! Utility method which Prints the content of a Check 0070 Standard_EXPORT void Print (const Handle(Interface_Check)& ach, Standard_OStream& S) const; 0071 0072 //! Simply Lists all the Checks and the Content (messages) and the 0073 //! Entity, if there is, of each Check 0074 //! (if all Checks are OK, nothing is Printed) 0075 Standard_EXPORT void Print (const Interface_CheckIterator& list, Standard_OStream& S) const; 0076 0077 //! Returns the Check associated to an Entity identified by 0078 //! its Number in a Model. 0079 Standard_EXPORT Handle(Interface_Check) Check (const Standard_Integer num); 0080 0081 //! Checks if any Error has been detected (CheckList not empty) 0082 //! Returns normally if none, raises exception if some exists. 0083 //! It reuses the last computations from other checking methods, 0084 //! unless the argument <reset> is given True 0085 Standard_EXPORT void CheckSuccess (const Standard_Boolean reset = Standard_False); 0086 0087 //! Returns list of all "remarkable" information, which include : 0088 //! - GlobalCheck, if not empty 0089 //! - Error Checks, for all Errors (Verify + Analyse) 0090 //! - also Corrected Entities 0091 //! - and Unknown Entities : for those, each Unknown Entity is 0092 //! associated to an empty Check (it is neither an Error nor a 0093 //! Correction, but a remarkable information) 0094 Standard_EXPORT Interface_CheckIterator CompleteCheckList(); 0095 0096 //! Returns list of all Errors detected 0097 //! Note that presence of Unknown Entities is not an error 0098 //! Cumulates : GlobalCheck if error + 0099 //! AnalyseCheckList + VerifyCheckList 0100 Standard_EXPORT Interface_CheckIterator CheckList(); 0101 0102 //! Returns list of errors detected at Analyse time (syntactic) 0103 //! (note that GlobalCheck is not in this list) 0104 Standard_EXPORT Interface_CheckIterator AnalyseCheckList(); 0105 0106 //! Returns list of integrity constraints errors (semantic) 0107 //! (note that GlobalCheck is not in this list) 0108 Standard_EXPORT Interface_CheckIterator VerifyCheckList(); 0109 0110 //! Returns list of Corrections (includes GlobalCheck if corrected) 0111 Standard_EXPORT Interface_CheckIterator WarningCheckList(); 0112 0113 //! Returns list of Unknown Entities 0114 //! Note that Error and Erroneous Entities are not considered 0115 //! as Unknown 0116 Standard_EXPORT Interface_EntityIterator UnknownEntities(); 0117 0118 0119 0120 0121 protected: 0122 0123 0124 0125 0126 0127 private: 0128 0129 0130 0131 Handle(Interface_GTool) thegtool; 0132 Interface_ShareTool theshare; 0133 Standard_Integer thestat; 0134 0135 0136 }; 0137 0138 0139 0140 0141 0142 0143 0144 #endif // _Interface_CheckTool_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |