1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <Interface_Check.hxx>
16 #include <Interface_ReportEntity.hxx>
17 #include <Standard_Transient.hxx>
18 #include <Standard_Type.hxx>
20 IMPLEMENT_STANDARD_RTTIEXT(Interface_ReportEntity,MMgt_TShared)
22 //=======================================================================
23 //function : Interface_ReportEntity
25 //=======================================================================
26 Interface_ReportEntity::Interface_ReportEntity
27 (const Handle(Standard_Transient)& unknown)
29 theconcerned = unknown;
34 //=======================================================================
35 //function : Interface_ReportEntity
37 //=======================================================================
39 Interface_ReportEntity::Interface_ReportEntity
40 (const Handle(Interface_Check)& acheck,
41 const Handle(Standard_Transient)& concerned)
44 theconcerned = concerned;
45 thecheck->SetEntity(concerned);
49 //=======================================================================
50 //function : SetContent
52 //=======================================================================
54 void Interface_ReportEntity::SetContent(const Handle(Standard_Transient)& content)
59 // .... CONSULTATION ....
62 //=======================================================================
65 //=======================================================================
67 const Handle(Interface_Check)& Interface_ReportEntity::Check () const
73 //=======================================================================
76 //=======================================================================
78 Handle(Interface_Check)& Interface_ReportEntity::CCheck ()
84 //=======================================================================
85 //function : Concerned
87 //=======================================================================
89 Handle(Standard_Transient) Interface_ReportEntity::Concerned () const
95 //=======================================================================
96 //function : HasContent
98 //=======================================================================
100 Standard_Boolean Interface_ReportEntity::HasContent () const
102 return (!thecontent.IsNull());
106 //=======================================================================
107 //function : HasNewContent
109 //=======================================================================
111 Standard_Boolean Interface_ReportEntity::HasNewContent () const
113 return (!thecontent.IsNull() && thecontent != theconcerned);
117 //=======================================================================
120 //=======================================================================
122 Handle(Standard_Transient) Interface_ReportEntity::Content () const
128 //=======================================================================
131 //=======================================================================
133 Standard_Boolean Interface_ReportEntity::IsError () const
135 return (thecheck->NbFails() > 0);
139 //=======================================================================
140 //function : IsUnknown
142 //=======================================================================
144 Standard_Boolean Interface_ReportEntity::IsUnknown () const
146 return ((thecheck->NbFails() == 0) && (thecheck->NbWarnings() == 0)
147 && (theconcerned == thecontent));