d658f275 |
1 | // Created on: 2016-03-31 |
2 | // Created by: Irina KRYLOVA |
3 | // Copyright (c) 2016 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 | |
17 | #include <Interface_Macros.hxx> |
18 | #include <Standard_Transient.hxx> |
19 | #include <StepBasic_ProductDefinition.hxx> |
20 | #include <StepBasic_ProductDefinitionOrReference.hxx> |
21 | #include <StepBasic_ProductDefinitionReference.hxx> |
22 | #include <StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx> |
23 | |
24 | //======================================================================= |
25 | //function : StepBasic_ProductDefinitionOrReference |
26 | //purpose : |
27 | //======================================================================= |
28 | StepBasic_ProductDefinitionOrReference::StepBasic_ProductDefinitionOrReference () { } |
29 | |
30 | //======================================================================= |
31 | //function : CaseNum |
32 | //purpose : |
33 | //======================================================================= |
34 | Standard_Integer StepBasic_ProductDefinitionOrReference::CaseNum(const Handle(Standard_Transient)& ent) const |
35 | { |
36 | if (ent.IsNull()) return 0; |
37 | if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) return 1; |
38 | if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionReference))) return 2; |
39 | if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionReferenceWithLocalRepresentation))) return 3; |
40 | return 0; |
41 | } |
42 | |
43 | //======================================================================= |
44 | //function : ProductDefinition |
45 | //purpose : |
46 | //======================================================================= |
47 | Handle(StepBasic_ProductDefinition) StepBasic_ProductDefinitionOrReference::ProductDefinition () const |
48 | { |
49 | return GetCasted(StepBasic_ProductDefinition, Value()); |
50 | } |
51 | |
52 | //======================================================================= |
53 | //function : ProductDefinitionReference |
54 | //purpose : |
55 | //======================================================================= |
56 | Handle(StepBasic_ProductDefinitionReference) StepBasic_ProductDefinitionOrReference:: |
57 | ProductDefinitionReference () const |
58 | { |
59 | return GetCasted(StepBasic_ProductDefinitionReference, Value()); |
60 | } |
61 | |
62 | //======================================================================= |
63 | //function : ProductDefinitionReferenceWithLocalRepresentation |
64 | //purpose : |
65 | //======================================================================= |
66 | Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation) StepBasic_ProductDefinitionOrReference:: |
67 | ProductDefinitionReferenceWithLocalRepresentation () const |
68 | { |
69 | return GetCasted(StepBasic_ProductDefinitionReferenceWithLocalRepresentation, Value()); |
70 | } |