0024947: Redesign OCCT legacy type system -- automatic
[occt.git] / src / StepRepr / StepRepr_RepresentedDefinition.cxx
1 // Created on: 2002-12-12
2 // Created by: data exchange team
3 // Copyright (c) 2002-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
17
18 #include <StepRepr_RepresentedDefinition.ixx>
19 #include <StepBasic_GeneralProperty.hxx>
20 #include <StepRepr_PropertyDefinition.hxx>
21 #include <StepRepr_PropertyDefinitionRelationship.hxx>
22 #include <StepRepr_ShapeAspect.hxx>
23 #include <StepRepr_ShapeAspectRelationship.hxx>
24
25 //=======================================================================
26 //function : StepRepr_RepresentedDefinition
27 //purpose  : 
28 //=======================================================================
29
30 StepRepr_RepresentedDefinition::StepRepr_RepresentedDefinition ()
31 {
32 }
33
34 //=======================================================================
35 //function : CaseNum
36 //purpose  : 
37 //=======================================================================
38
39 Standard_Integer StepRepr_RepresentedDefinition::CaseNum (const Handle(Standard_Transient)& ent) const
40 {
41   if (ent.IsNull()) return 0;
42   if (ent->IsKind(STANDARD_TYPE(StepBasic_GeneralProperty))) return 1;
43   if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 2;
44   if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinitionRelationship))) return 3;
45   if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect))) return 4;
46   if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))) return 5;
47   return 0;
48 }
49
50 //=======================================================================
51 //function : GeneralProperty
52 //purpose  : 
53 //=======================================================================
54
55 Handle(StepBasic_GeneralProperty) StepRepr_RepresentedDefinition::GeneralProperty () const
56 {
57   return Handle(StepBasic_GeneralProperty)::DownCast(Value());
58 }
59
60 //=======================================================================
61 //function : PropertyDefinition
62 //purpose  : 
63 //=======================================================================
64
65 Handle(StepRepr_PropertyDefinition) StepRepr_RepresentedDefinition::PropertyDefinition () const
66 {
67   return Handle(StepRepr_PropertyDefinition)::DownCast(Value());
68 }
69
70 //=======================================================================
71 //function : PropertyDefinitionRelationship
72 //purpose  : 
73 //=======================================================================
74
75 Handle(StepRepr_PropertyDefinitionRelationship) StepRepr_RepresentedDefinition::PropertyDefinitionRelationship () const
76 {
77   return Handle(StepRepr_PropertyDefinitionRelationship)::DownCast(Value());
78 }
79
80 //=======================================================================
81 //function : ShapeAspect
82 //purpose  : 
83 //=======================================================================
84
85 Handle(StepRepr_ShapeAspect) StepRepr_RepresentedDefinition::ShapeAspect () const
86 {
87   return Handle(StepRepr_ShapeAspect)::DownCast(Value());
88 }
89
90 //=======================================================================
91 //function : ShapeAspectRelationship
92 //purpose  : 
93 //=======================================================================
94
95 Handle(StepRepr_ShapeAspectRelationship) StepRepr_RepresentedDefinition::ShapeAspectRelationship () const
96 {
97   return Handle(StepRepr_ShapeAspectRelationship)::DownCast(Value());
98 }