Test for 0022778: Bug in BRepMesh
[occt.git] / src / Interface / Interface_ReportEntity.cxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
17
7fd59977 18#include <Interface_ReportEntity.ixx>
19
20
21//=======================================================================
22//function : Interface_ReportEntity
23//purpose :
24//=======================================================================
25
26Interface_ReportEntity::Interface_ReportEntity
27 (const Handle(Standard_Transient)& unknown)
28{
29 theconcerned = unknown;
30 thecontent = unknown;
31}
32
33
34//=======================================================================
35//function : Interface_ReportEntity
36//purpose :
37//=======================================================================
38
39Interface_ReportEntity::Interface_ReportEntity
40 (const Handle(Interface_Check)& acheck,
41 const Handle(Standard_Transient)& concerned)
42: thecheck(acheck)
43{
44 theconcerned = concerned;
45 thecheck->SetEntity(concerned);
46}
47
48
49//=======================================================================
50//function : SetContent
51//purpose :
52//=======================================================================
53
54void Interface_ReportEntity::SetContent(const Handle(Standard_Transient)& content)
55{
56 thecontent = content;
57}
58
59// .... CONSULTATION ....
60
61
62//=======================================================================
63//function : Check
64//purpose :
65//=======================================================================
66
67const Handle(Interface_Check)& Interface_ReportEntity::Check () const
68{
69 return thecheck;
70}
71
72
73//=======================================================================
74//function : CCheck
75//purpose :
76//=======================================================================
77
78Handle(Interface_Check)& Interface_ReportEntity::CCheck ()
79{
80 return thecheck;
81}
82
83
84//=======================================================================
85//function : Concerned
86//purpose :
87//=======================================================================
88
89Handle(Standard_Transient) Interface_ReportEntity::Concerned () const
90{
91 return theconcerned;
92}
93
94
95//=======================================================================
96//function : HasContent
97//purpose :
98//=======================================================================
99
100Standard_Boolean Interface_ReportEntity::HasContent () const
101{
102 return (!thecontent.IsNull());
103}
104
105
106//=======================================================================
107//function : HasNewContent
108//purpose :
109//=======================================================================
110
111Standard_Boolean Interface_ReportEntity::HasNewContent () const
112{
113 return (!thecontent.IsNull() && thecontent != theconcerned);
114}
115
116
117//=======================================================================
118//function : Content
119//purpose :
120//=======================================================================
121
122Handle(Standard_Transient) Interface_ReportEntity::Content () const
123{
124 return thecontent;
125}
126
127
128//=======================================================================
129//function : IsError
130//purpose :
131//=======================================================================
132
133Standard_Boolean Interface_ReportEntity::IsError () const
134{
135 return (thecheck->NbFails() > 0);
136}
137
138
139//=======================================================================
140//function : IsUnknown
141//purpose :
142//=======================================================================
143
144Standard_Boolean Interface_ReportEntity::IsUnknown () const
145{
146 return ((thecheck->NbFails() == 0) && (thecheck->NbWarnings() == 0)
147 && (theconcerned == thecontent));
148}