|
||||
File indexing completed on 2025-01-18 10:04:08
0001 // Created on: 1993-02-05 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_ReportEntity_HeaderFile 0018 #define _Interface_ReportEntity_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Transient.hxx> 0024 class Interface_Check; 0025 0026 0027 class Interface_ReportEntity; 0028 DEFINE_STANDARD_HANDLE(Interface_ReportEntity, Standard_Transient) 0029 0030 //! A ReportEntity is produced to aknowledge and memorize the 0031 //! binding between a Check and an Entity. The Check can bring 0032 //! Fails (+ Warnings if any), or only Warnings. If it is empty, 0033 //! the Report Entity is for an Unknown Entity. 0034 //! 0035 //! The ReportEntity brings : the Concerned Entity, the 0036 //! Check, and if the Entity is empty (Fails due to Read 0037 //! Errors, hence the Entity could not be loaded), a Content. 0038 //! The Content is itself an Transient Object, but remains in a 0039 //! literal form : it is an "Unknown Entity". If the Concerned 0040 //! Entity is itself Unknown, Concerned and Content are equal. 0041 //! 0042 //! According to the Check, if it brings Fail messages, 0043 //! the ReportEntity is an "Error Entity", the Concerned Entity is 0044 //! an "Erroneous Entity". Else it is a "Correction Entity", the 0045 //! Concerned Entity is a "Corrected Entity". With no Check 0046 //! message and if Concerned and Content are equal, it reports 0047 //! for an "Unknown Entity". 0048 //! 0049 //! Each norm must produce its own type of Unknown Entity, but can 0050 //! use the class UndefinedContent to brings parameters : it is 0051 //! enough for most of information and avoids to redefine them, 0052 //! only the specific part remains to be defined for each norm. 0053 class Interface_ReportEntity : public Standard_Transient 0054 { 0055 0056 public: 0057 0058 0059 //! Creates a ReportEntity for an Unknown Entity : Check is empty, 0060 //! and Concerned equates Content (i.e. the Unknown Entity) 0061 Standard_EXPORT Interface_ReportEntity(const Handle(Standard_Transient)& unknown); 0062 0063 //! Creates a ReportEntity with its features : 0064 //! - <acheck> is the Check to be memorised 0065 //! - <concerned> is the Entity to which the Check is bound 0066 //! Later, a Content can be set : it is required for an Error 0067 Standard_EXPORT Interface_ReportEntity(const Handle(Interface_Check)& acheck, const Handle(Standard_Transient)& concerned); 0068 0069 //! Sets a Content : it brings non interpreted data which belong 0070 //! to the Concerned Entity. It can be empty then loaded later. 0071 //! Remark that for an Unknown Entity, Content is set by Create. 0072 Standard_EXPORT void SetContent (const Handle(Standard_Transient)& content); 0073 0074 //! Returns the stored Check 0075 Standard_EXPORT const Handle(Interface_Check)& Check() const; 0076 0077 //! Returns the stored Check in order to change it 0078 Standard_EXPORT Handle(Interface_Check)& CCheck(); 0079 0080 //! Returns the stored Concerned Entity. It equates the Content 0081 //! in the case of an Unknown Entity 0082 Standard_EXPORT Handle(Standard_Transient) Concerned() const; 0083 0084 //! Returns True if a Content is stored (it can equate Concerned) 0085 Standard_EXPORT Standard_Boolean HasContent() const; 0086 0087 //! Returns True if a Content is stored AND differs from Concerned 0088 //! (i.e. redefines content) : used when Concerned could not be 0089 //! loaded 0090 Standard_EXPORT Standard_Boolean HasNewContent() const; 0091 0092 //! Returns the stored Content, or a Null Handle 0093 //! Remark that it must be an "Unknown Entity" suitable for 0094 //! the norm of the containing Model 0095 Standard_EXPORT Handle(Standard_Transient) Content() const; 0096 0097 //! Returns True for an Error Entity, i.e. if the Check 0098 //! brings at least one Fail message 0099 Standard_EXPORT Standard_Boolean IsError() const; 0100 0101 //! Returns True for an Unknown Entity, i,e. if the Check 0102 //! is empty and Concerned equates Content 0103 Standard_EXPORT Standard_Boolean IsUnknown() const; 0104 0105 0106 0107 0108 DEFINE_STANDARD_RTTIEXT(Interface_ReportEntity,Standard_Transient) 0109 0110 protected: 0111 0112 0113 0114 0115 private: 0116 0117 0118 Handle(Interface_Check) thecheck; 0119 Handle(Standard_Transient) theconcerned; 0120 Handle(Standard_Transient) thecontent; 0121 0122 0123 }; 0124 0125 0126 0127 0128 0129 0130 0131 #endif // _Interface_ReportEntity_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |