0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / StepBasic / StepBasic_Product.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 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
973c2be1 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.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14
42cf5bc1 15#include <Standard_Type.hxx>
16#include <StepBasic_Product.hxx>
17#include <StepBasic_ProductContext.hxx>
18#include <TCollection_HAsciiString.hxx>
7fd59977 19
25e59720 20IMPLEMENT_STANDARD_RTTIEXT(StepBasic_Product,Standard_Transient)
92efcf78 21
7fd59977 22StepBasic_Product::StepBasic_Product () {}
23
24void StepBasic_Product::Init(
25 const Handle(TCollection_HAsciiString)& aId,
26 const Handle(TCollection_HAsciiString)& aName,
27 const Handle(TCollection_HAsciiString)& aDescription,
28 const Handle(StepBasic_HArray1OfProductContext)& aFrameOfReference)
29{
30 // --- classe own fields ---
31 id = aId;
32 name = aName;
33 description = aDescription;
34 frameOfReference = aFrameOfReference;
35}
36
37
38void StepBasic_Product::SetId(const Handle(TCollection_HAsciiString)& aId)
39{
40 id = aId;
41}
42
43Handle(TCollection_HAsciiString) StepBasic_Product::Id() const
44{
45 return id;
46}
47
48void StepBasic_Product::SetName(const Handle(TCollection_HAsciiString)& aName)
49{
50 name = aName;
51}
52
53Handle(TCollection_HAsciiString) StepBasic_Product::Name() const
54{
55 return name;
56}
57
58void StepBasic_Product::SetDescription(const Handle(TCollection_HAsciiString)& aDescription)
59{
60 description = aDescription;
61}
62
63Handle(TCollection_HAsciiString) StepBasic_Product::Description() const
64{
65 return description;
66}
67
68void StepBasic_Product::SetFrameOfReference(const Handle(StepBasic_HArray1OfProductContext)& aFrameOfReference)
69{
70 frameOfReference = aFrameOfReference;
71}
72
73Handle(StepBasic_HArray1OfProductContext) StepBasic_Product::FrameOfReference() const
74{
75 return frameOfReference;
76}
77
78Handle(StepBasic_ProductContext) StepBasic_Product::FrameOfReferenceValue(const Standard_Integer num) const
79{
80 return frameOfReference->Value(num);
81}
82
83Standard_Integer StepBasic_Product::NbFrameOfReference () const
84{
85 if (frameOfReference.IsNull()) return 0;
86 return frameOfReference->Length();
87}