0022807: Loading of STEP entities in model during reading of STEP file requires redun...
[occt.git] / src / Interface / Interface_ReportEntity.cxx
1 #include <Interface_ReportEntity.ixx>
2
3
4 //=======================================================================
5 //function : Interface_ReportEntity
6 //purpose  : 
7 //=======================================================================
8
9 Interface_ReportEntity::Interface_ReportEntity
10   (const Handle(Standard_Transient)& unknown)
11 {
12   theconcerned = unknown;
13   thecontent = unknown;
14 }
15
16
17 //=======================================================================
18 //function : Interface_ReportEntity
19 //purpose  : 
20 //=======================================================================
21
22 Interface_ReportEntity::Interface_ReportEntity
23   (const Handle(Interface_Check)& acheck,
24    const Handle(Standard_Transient)& concerned)
25 :  thecheck(acheck)
26 {
27   theconcerned = concerned;
28   thecheck->SetEntity(concerned);
29 }
30
31
32 //=======================================================================
33 //function : SetContent
34 //purpose  : 
35 //=======================================================================
36
37 void Interface_ReportEntity::SetContent(const Handle(Standard_Transient)& content)
38 {
39   thecontent = content;
40 }
41
42 //  ....                        CONSULTATION                        ....
43
44
45 //=======================================================================
46 //function : Check
47 //purpose  : 
48 //=======================================================================
49
50 const Handle(Interface_Check)& Interface_ReportEntity::Check () const
51 {
52   return thecheck;
53 }
54
55
56 //=======================================================================
57 //function : CCheck
58 //purpose  : 
59 //=======================================================================
60
61 Handle(Interface_Check)& Interface_ReportEntity::CCheck ()
62 {
63   return thecheck;
64 }
65
66
67 //=======================================================================
68 //function : Concerned
69 //purpose  : 
70 //=======================================================================
71
72 Handle(Standard_Transient) Interface_ReportEntity::Concerned  () const
73 {
74   return theconcerned;
75 }
76
77
78 //=======================================================================
79 //function : HasContent
80 //purpose  : 
81 //=======================================================================
82
83 Standard_Boolean Interface_ReportEntity::HasContent () const 
84 {
85   return (!thecontent.IsNull());
86 }
87
88
89 //=======================================================================
90 //function : HasNewContent
91 //purpose  : 
92 //=======================================================================
93
94 Standard_Boolean Interface_ReportEntity::HasNewContent () const 
95 {
96   return (!thecontent.IsNull() && thecontent != theconcerned);
97 }
98
99
100 //=======================================================================
101 //function : Content
102 //purpose  : 
103 //=======================================================================
104
105 Handle(Standard_Transient) Interface_ReportEntity::Content () const
106 {
107   return thecontent;
108 }
109
110
111 //=======================================================================
112 //function : IsError
113 //purpose  : 
114 //=======================================================================
115
116 Standard_Boolean Interface_ReportEntity::IsError () const
117 {
118   return (thecheck->NbFails() > 0);
119 }
120
121
122 //=======================================================================
123 //function : IsUnknown
124 //purpose  : 
125 //=======================================================================
126
127 Standard_Boolean Interface_ReportEntity::IsUnknown () const
128 {
129   return ((thecheck->NbFails() == 0) && (thecheck->NbWarnings() == 0)
130           && (theconcerned == thecontent));
131 }