1 // Created on: 2015-07-10
2 // Created by: Irina KRYLOVA
3 // Copyright (c) 2015 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <StepAP242_IdAttributeSelect.hxx>
17 #include <Interface_Macros.hxx>
18 #include <StepBasic_Action.hxx>
19 #include <StepBasic_Address.hxx>
20 #include <StepBasic_ApplicationContext.hxx>
21 #include <StepBasic_Group.hxx>
22 #include <StepBasic_ProductCategory.hxx>
23 #include <StepDimTol_GeometricTolerance.hxx>
24 #include <StepRepr_PropertyDefinition.hxx>
25 #include <StepRepr_Representation.hxx>
26 #include <StepRepr_ShapeAspect.hxx>
27 #include <StepRepr_ShapeAspectRelationship.hxx>
28 #include <StepShape_DimensionalSize.hxx>
30 //=======================================================================
31 //function : StepAP242_IdAttributeSelect
33 //=======================================================================
35 StepAP242_IdAttributeSelect::StepAP242_IdAttributeSelect () { }
37 //=======================================================================
40 //=======================================================================
42 Standard_Integer StepAP242_IdAttributeSelect::CaseNum(const Handle(Standard_Transient)& ent) const
44 if (ent.IsNull()) return 0;
45 if (ent->IsKind(STANDARD_TYPE(StepBasic_Action))) return 1;
46 if (ent->IsKind(STANDARD_TYPE(StepBasic_Address))) return 2;
47 if (ent->IsKind(STANDARD_TYPE(StepBasic_ApplicationContext))) return 3;
48 if (ent->IsKind(STANDARD_TYPE(StepShape_DimensionalSize))) return 4;
49 if (ent->IsKind(STANDARD_TYPE(StepDimTol_GeometricTolerance))) return 5;
50 if (ent->IsKind(STANDARD_TYPE(StepBasic_Group))) return 6;
51 if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductCategory))) return 8;
52 if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 9;
53 if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 10;
54 if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect))) return 11;
55 if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))) return 12;
59 Handle(StepBasic_Action) StepAP242_IdAttributeSelect::Action() const
60 { return GetCasted(StepBasic_Action,Value()); }
62 Handle(StepBasic_Address) StepAP242_IdAttributeSelect::Address() const
63 { return GetCasted(StepBasic_Address,Value()); }
65 Handle(StepBasic_ApplicationContext) StepAP242_IdAttributeSelect::ApplicationContext() const
66 { return GetCasted(StepBasic_ApplicationContext,Value()); }
68 Handle(StepShape_DimensionalSize) StepAP242_IdAttributeSelect::DimensionalSize() const
69 { return GetCasted(StepShape_DimensionalSize,Value()); }
71 Handle(StepDimTol_GeometricTolerance) StepAP242_IdAttributeSelect::GeometricTolerance() const
72 { return GetCasted(StepDimTol_GeometricTolerance,Value()); }
74 Handle(StepBasic_Group) StepAP242_IdAttributeSelect::Group() const
75 { return GetCasted(StepBasic_Group,Value()); }
77 Handle(StepBasic_ProductCategory) StepAP242_IdAttributeSelect::ProductCategory() const
78 { return GetCasted(StepBasic_ProductCategory,Value()); }
80 Handle(StepRepr_PropertyDefinition) StepAP242_IdAttributeSelect::PropertyDefinition() const
81 { return GetCasted(StepRepr_PropertyDefinition,Value()); }
83 Handle(StepRepr_Representation) StepAP242_IdAttributeSelect::Representation() const
84 { return GetCasted(StepRepr_Representation,Value()); }
86 Handle(StepRepr_ShapeAspect) StepAP242_IdAttributeSelect::ShapeAspect() const
87 { return GetCasted(StepRepr_ShapeAspect,Value()); }
89 Handle(StepRepr_ShapeAspectRelationship) StepAP242_IdAttributeSelect::ShapeAspectRelationship() const
90 { return GetCasted(StepRepr_ShapeAspectRelationship,Value()); }