0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / Interface / Interface_ReportEntity.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <Interface_Check.hxx>
16 #include <Interface_ReportEntity.hxx>
17 #include <Standard_Transient.hxx>
18 #include <Standard_Type.hxx>
19
20 IMPLEMENT_STANDARD_RTTIEXT(Interface_ReportEntity,MMgt_TShared)
21
22 //=======================================================================
23 //function : Interface_ReportEntity
24 //purpose  : 
25 //=======================================================================
26 Interface_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
39 Interface_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
54 void 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
67 const Handle(Interface_Check)& Interface_ReportEntity::Check () const
68 {
69   return thecheck;
70 }
71
72
73 //=======================================================================
74 //function : CCheck
75 //purpose  : 
76 //=======================================================================
77
78 Handle(Interface_Check)& Interface_ReportEntity::CCheck ()
79 {
80   return thecheck;
81 }
82
83
84 //=======================================================================
85 //function : Concerned
86 //purpose  : 
87 //=======================================================================
88
89 Handle(Standard_Transient) Interface_ReportEntity::Concerned  () const
90 {
91   return theconcerned;
92 }
93
94
95 //=======================================================================
96 //function : HasContent
97 //purpose  : 
98 //=======================================================================
99
100 Standard_Boolean Interface_ReportEntity::HasContent () const 
101 {
102   return (!thecontent.IsNull());
103 }
104
105
106 //=======================================================================
107 //function : HasNewContent
108 //purpose  : 
109 //=======================================================================
110
111 Standard_Boolean Interface_ReportEntity::HasNewContent () const 
112 {
113   return (!thecontent.IsNull() && thecontent != theconcerned);
114 }
115
116
117 //=======================================================================
118 //function : Content
119 //purpose  : 
120 //=======================================================================
121
122 Handle(Standard_Transient) Interface_ReportEntity::Content () const
123 {
124   return thecontent;
125 }
126
127
128 //=======================================================================
129 //function : IsError
130 //purpose  : 
131 //=======================================================================
132
133 Standard_Boolean Interface_ReportEntity::IsError () const
134 {
135   return (thecheck->NbFails() > 0);
136 }
137
138
139 //=======================================================================
140 //function : IsUnknown
141 //purpose  : 
142 //=======================================================================
143
144 Standard_Boolean Interface_ReportEntity::IsUnknown () const
145 {
146   return ((thecheck->NbFails() == 0) && (thecheck->NbWarnings() == 0)
147           && (theconcerned == thecontent));
148 }