summaryrefslogtreecommitdiff
path: root/src/StepBasic/StepBasic_Unit.cxx
blob: b0da818df5189846b2752f2ee76803b2fa77ce3d (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
// File:	StepBasic_Unit.cxx
// Created:	Wed Sep  8 14:20:46 1999
// Author:	Andrey BETENEV
//		<abv@doomox.nnov.matra-dtv.fr>

#include <StepBasic_Unit.ixx>
#include <Interface_Macros.hxx>
#include <StepBasic_NamedUnit.hxx>
#include <StepBasic_DerivedUnit.hxx>

//=======================================================================
//function : StepBasic_Unit
//purpose  : 
//=======================================================================

StepBasic_Unit::StepBasic_Unit () {  }

//=======================================================================
//function : CaseNum
//purpose  : 
//=======================================================================

Standard_Integer StepBasic_Unit::CaseNum (const Handle(Standard_Transient)& ent) const
{
  if (ent.IsNull()) return 0;
  if (ent->IsKind(STANDARD_TYPE(StepBasic_NamedUnit))) return 1;
  if (ent->IsKind(STANDARD_TYPE(StepBasic_DerivedUnit))) return 2;
  return 0;
}

//=======================================================================
//function : NamedUnit
//purpose  : 
//=======================================================================

Handle(StepBasic_NamedUnit) StepBasic_Unit::NamedUnit () const
{
  return GetCasted(StepBasic_NamedUnit,Value());
}

//=======================================================================
//function : DerivedUnit
//purpose  : 
//=======================================================================

Handle(StepBasic_DerivedUnit) StepBasic_Unit::DerivedUnit () const
{
  return GetCasted(StepBasic_DerivedUnit,Value());
}