1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13 
14 
15 #include <Interface_Macros.hxx>
16 #include <Standard_Transient.hxx>
17 #include <StepAP214_ApprovalItem.hxx>
18 #include <StepBasic_Date.hxx>
19 #include <StepBasic_Document.hxx>
20 #include <StepBasic_DocumentFile.hxx>
21 #include <StepBasic_Effectivity.hxx>
22 #include <StepBasic_Group.hxx>
23 #include <StepBasic_GroupRelationship.hxx>
24 #include <StepBasic_Product.hxx>
25 #include <StepBasic_ProductDefinition.hxx>
26 #include <StepBasic_ProductDefinitionFormation.hxx>
27 #include <StepBasic_ProductDefinitionFormationRelationship.hxx>
28 #include <StepBasic_ProductDefinitionRelationship.hxx>
29 #include <StepBasic_SecurityClassification.hxx>
30 #include <StepRepr_AssemblyComponentUsageSubstitute.hxx>
31 #include <StepRepr_ConfigurationItem.hxx>
32 #include <StepRepr_MaterialDesignation.hxx>
33 #include <StepRepr_PropertyDefinition.hxx>
34 #include <StepRepr_Representation.hxx>
35 #include <StepRepr_ShapeAspectRelationship.hxx>
36 #include <StepShape_ShapeRepresentation.hxx>
37 #include <StepVisual_MechanicalDesignGeometricPresentationRepresentation.hxx>
38 #include <StepVisual_PresentationArea.hxx>
39 
StepAP214_ApprovalItem()40 StepAP214_ApprovalItem::StepAP214_ApprovalItem () {  }
41 
CaseNum(const Handle (Standard_Transient)& ent) const42 Standard_Integer StepAP214_ApprovalItem::CaseNum(const Handle(Standard_Transient)& ent) const
43 {
44 
45   if (ent.IsNull()) return 0;
46   if (ent->IsKind(STANDARD_TYPE(StepRepr_AssemblyComponentUsageSubstitute))) return 1;
47   if (ent->IsKind(STANDARD_TYPE(StepBasic_DocumentFile))) return 2;
48   if (ent->IsKind(STANDARD_TYPE(StepRepr_MaterialDesignation))) return 3;
49   if (ent->IsKind(STANDARD_TYPE(StepVisual_MechanicalDesignGeometricPresentationRepresentation))) return 4;
50   if (ent->IsKind(STANDARD_TYPE(StepVisual_PresentationArea))) return 5;
51   if (ent->IsKind(STANDARD_TYPE(StepBasic_Product))) return 6;
52   if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) return 7;
53   if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionFormation))) return 8;
54   if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionRelationship))) return 9;
55   if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 10;
56   if (ent->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) return 11;
57   if (ent->IsKind(STANDARD_TYPE(StepBasic_SecurityClassification))) return 12;
58   if (ent->IsKind(STANDARD_TYPE(StepRepr_ConfigurationItem))) return 13;
59   if (ent->IsKind(STANDARD_TYPE(StepBasic_Date))) return 14;
60   if (ent->IsKind(STANDARD_TYPE(StepBasic_Document))) return 15;
61   if (ent->IsKind(STANDARD_TYPE(StepBasic_Effectivity))) return 16;
62   if (ent->IsKind(STANDARD_TYPE(StepBasic_Group))) return 17;
63   if (ent->IsKind(STANDARD_TYPE(StepBasic_GroupRelationship))) return 18;
64   if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionFormationRelationship))) return 19;
65   if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 20;
66   if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))) return 21;
67   return 0;
68 }
69 
70 
Handle(StepRepr_AssemblyComponentUsageSubstitute)71 Handle(StepRepr_AssemblyComponentUsageSubstitute)  StepAP214_ApprovalItem::AssemblyComponentUsageSubstitute() const
72 {  return GetCasted(StepRepr_AssemblyComponentUsageSubstitute,Value());  }
73 
Handle(StepBasic_DocumentFile)74 Handle(StepBasic_DocumentFile) StepAP214_ApprovalItem::DocumentFile() const
75 {  return GetCasted(StepBasic_DocumentFile,Value());  }
76 
77 
Handle(StepRepr_MaterialDesignation)78 Handle(StepRepr_MaterialDesignation) StepAP214_ApprovalItem::MaterialDesignation() const
79 {  return GetCasted(StepRepr_MaterialDesignation,Value());  }
80 
Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)81 Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation) StepAP214_ApprovalItem::MechanicalDesignGeometricPresentationRepresentation() const
82 {  return GetCasted(StepVisual_MechanicalDesignGeometricPresentationRepresentation,Value());  }
83 
Handle(StepVisual_PresentationArea)84 Handle(StepVisual_PresentationArea) StepAP214_ApprovalItem::PresentationArea() const
85 {  return GetCasted(StepVisual_PresentationArea,Value());  }
86 
Handle(StepBasic_Product)87 Handle(StepBasic_Product) StepAP214_ApprovalItem::Product() const
88 {  return GetCasted(StepBasic_Product,Value());  }
89 
Handle(StepBasic_ProductDefinition)90 Handle(StepBasic_ProductDefinition) StepAP214_ApprovalItem::ProductDefinition () const
91 {  return GetCasted(StepBasic_ProductDefinition,Value());  }
92 
Handle(StepBasic_ProductDefinitionFormation)93 Handle(StepBasic_ProductDefinitionFormation) StepAP214_ApprovalItem::ProductDefinitionFormation() const
94 {  return GetCasted(StepBasic_ProductDefinitionFormation,Value());  }
95 
Handle(StepBasic_ProductDefinitionRelationship)96 Handle(StepBasic_ProductDefinitionRelationship) StepAP214_ApprovalItem::ProductDefinitionRelationship() const
97 {  return GetCasted(StepBasic_ProductDefinitionRelationship,Value());  }
98 
Handle(StepRepr_PropertyDefinition)99 Handle(StepRepr_PropertyDefinition) StepAP214_ApprovalItem::PropertyDefinition() const
100 {  return GetCasted(StepRepr_PropertyDefinition,Value());  }
101 
Handle(StepShape_ShapeRepresentation)102 Handle(StepShape_ShapeRepresentation) StepAP214_ApprovalItem::ShapeRepresentation() const
103 {  return GetCasted(StepShape_ShapeRepresentation,Value());  }
104 
Handle(StepBasic_SecurityClassification)105 Handle(StepBasic_SecurityClassification) StepAP214_ApprovalItem::SecurityClassification() const
106 {  return GetCasted(StepBasic_SecurityClassification,Value());  }
107 
Handle(StepRepr_ConfigurationItem)108 Handle(StepRepr_ConfigurationItem) StepAP214_ApprovalItem::ConfigurationItem() const
109 {  return GetCasted(StepRepr_ConfigurationItem,Value());  }
110 
Handle(StepBasic_Date)111 Handle(StepBasic_Date) StepAP214_ApprovalItem::Date() const
112 {  return GetCasted(StepBasic_Date,Value());  }
113 
Handle(StepBasic_Document)114 Handle(StepBasic_Document) StepAP214_ApprovalItem::Document() const
115 {  return GetCasted(StepBasic_Document,Value());  }
116 
Handle(StepBasic_Effectivity)117 Handle(StepBasic_Effectivity) StepAP214_ApprovalItem::Effectivity() const
118 {  return GetCasted(StepBasic_Effectivity,Value());  }
119 
Handle(StepBasic_Group)120 Handle(StepBasic_Group) StepAP214_ApprovalItem::Group() const
121 {  return GetCasted(StepBasic_Group,Value());  }
122 
Handle(StepBasic_GroupRelationship)123 Handle(StepBasic_GroupRelationship) StepAP214_ApprovalItem::GroupRelationship() const
124 {  return GetCasted(StepBasic_GroupRelationship,Value());  }
125 
Handle(StepBasic_ProductDefinitionFormationRelationship)126 Handle(StepBasic_ProductDefinitionFormationRelationship) StepAP214_ApprovalItem::ProductDefinitionFormationRelationship() const
127 {  return GetCasted(StepBasic_ProductDefinitionFormationRelationship,Value());  }
128 
Handle(StepRepr_Representation)129 Handle(StepRepr_Representation) StepAP214_ApprovalItem::Representation() const
130 {  return GetCasted(StepRepr_Representation,Value());  }
131 
Handle(StepRepr_ShapeAspectRelationship)132 Handle(StepRepr_ShapeAspectRelationship) StepAP214_ApprovalItem::ShapeAspectRelationship() const
133 {  return GetCasted(StepRepr_ShapeAspectRelationship,Value());  }
134