summaryrefslogtreecommitdiff
path: root/src/Interface/Interface_ReportEntity.cxx
blob: eac8b9763a6b9dc3917641d210791de0504db659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#include <Interface_ReportEntity.ixx>


//=======================================================================
//function : Interface_ReportEntity
//purpose  : 
//=======================================================================

Interface_ReportEntity::Interface_ReportEntity
  (const Handle(Standard_Transient)& unknown)
{
  theconcerned = unknown;
  thecontent = unknown;
}


//=======================================================================
//function : Interface_ReportEntity
//purpose  : 
//=======================================================================

Interface_ReportEntity::Interface_ReportEntity
  (const Handle(Interface_Check)& acheck,
   const Handle(Standard_Transient)& concerned)
:  thecheck(acheck)
{
  theconcerned = concerned;
  thecheck->SetEntity(concerned);
}


//=======================================================================
//function : SetContent
//purpose  : 
//=======================================================================

void Interface_ReportEntity::SetContent(const Handle(Standard_Transient)& content)
{
  thecontent = content;
}

//  ....                        CONSULTATION                        ....


//=======================================================================
//function : Check
//purpose  : 
//=======================================================================

const Handle(Interface_Check)& Interface_ReportEntity::Check () const
{
  return thecheck;
}


//=======================================================================
//function : CCheck
//purpose  : 
//=======================================================================

Handle(Interface_Check)& Interface_ReportEntity::CCheck ()
{
  return thecheck;
}


//=======================================================================
//function : Concerned
//purpose  : 
//=======================================================================

Handle(Standard_Transient) Interface_ReportEntity::Concerned  () const
{
  return theconcerned;
}


//=======================================================================
//function : HasContent
//purpose  : 
//=======================================================================

Standard_Boolean Interface_ReportEntity::HasContent () const 
{
  return (!thecontent.IsNull());
}


//=======================================================================
//function : HasNewContent
//purpose  : 
//=======================================================================

Standard_Boolean Interface_ReportEntity::HasNewContent () const 
{
  return (!thecontent.IsNull() && thecontent != theconcerned);
}


//=======================================================================
//function : Content
//purpose  : 
//=======================================================================

Handle(Standard_Transient) Interface_ReportEntity::Content () const
{
  return thecontent;
}


//=======================================================================
//function : IsError
//purpose  : 
//=======================================================================

Standard_Boolean Interface_ReportEntity::IsError () const
{
  return (thecheck->NbFails() > 0);
}


//=======================================================================
//function : IsUnknown
//purpose  : 
//=======================================================================

Standard_Boolean Interface_ReportEntity::IsUnknown () const
{
  return ((thecheck->NbFails() == 0) && (thecheck->NbWarnings() == 0)
	  && (theconcerned == thecontent));
}