summaryrefslogtreecommitdiff
path: root/src/StepVisual/StepVisual_StyleContextSelect.cxx
blob: 79429d9f0e6db9b2a4fb0d74f031272989aea47c (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

#include <StepVisual_StyleContextSelect.ixx>
#include <Interface_Macros.hxx>

StepVisual_StyleContextSelect::StepVisual_StyleContextSelect () {  }

Standard_Integer StepVisual_StyleContextSelect::CaseNum(const Handle(Standard_Transient)& ent) const
{
	if (ent.IsNull()) return 0;
	if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 1;
	if (ent->IsKind(STANDARD_TYPE(StepRepr_RepresentationItem))) return 2;
	if (ent->IsKind(STANDARD_TYPE(StepVisual_PresentationSet))) return 3;
	return 0;
}

Handle(StepRepr_Representation) StepVisual_StyleContextSelect::Representation () const
{
	return GetCasted(StepRepr_Representation,Value());
}

Handle(StepRepr_RepresentationItem) StepVisual_StyleContextSelect::RepresentationItem () const
{
	return GetCasted(StepRepr_RepresentationItem,Value());
}

Handle(StepVisual_PresentationSet) StepVisual_StyleContextSelect::PresentationSet () const
{
	return GetCasted(StepVisual_PresentationSet,Value());
}