blob: 1d535c3d6c401fe32dabe65f7ec015aa18d18070 (
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
|
#include <Transfer_SimpleBinderOfTransient.ixx>
// "Handle(Standard_Transient)" : la classe de base pour le Resultat
Transfer_SimpleBinderOfTransient::Transfer_SimpleBinderOfTransient () { }
// Standard_Boolean Transfer_SimpleBinderOfTransient::IsMultiple() const
// { return Standard_False; }
Handle(Standard_Type) Transfer_SimpleBinderOfTransient::ResultType () const
{
if (!HasResult() || theres.IsNull()) return STANDARD_TYPE(Standard_Transient);
return Result()->DynamicType();
}
Standard_CString Transfer_SimpleBinderOfTransient::ResultTypeName () const
{
if (!HasResult() || theres.IsNull()) return "(void)";
return Result()->DynamicType()->Name();
}
void Transfer_SimpleBinderOfTransient::SetResult
(const Handle(Standard_Transient)& res)
{
SetResultPresent();
theres = res;
}
const Handle(Standard_Transient)& Transfer_SimpleBinderOfTransient::Result () const
{ return theres; }
Standard_Boolean Transfer_SimpleBinderOfTransient::GetTypedResult
(const Handle(Transfer_Binder)& bnd, const Handle(Standard_Type)& atype,
Handle(Standard_Transient)& res)
{
if (atype.IsNull()) return Standard_False;
Handle(Transfer_Binder) bn = bnd;
while (!bn.IsNull()) {
Handle(Transfer_SimpleBinderOfTransient) trb =
Handle(Transfer_SimpleBinderOfTransient)::DownCast(bn);
bn = bn->NextResult();
if (trb.IsNull()) continue;
Handle(Standard_Transient) rs = trb->Result();
if (rs.IsNull()) continue;
if (!rs->IsKind(atype)) continue;
res = rs;
return Standard_True;
}
return Standard_False;
}
|