0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / StepRepr / StepRepr_ConfigurationItem.cxx
CommitLineData
b311480e 1// Created on: 1999-11-26
2// Created by: Andrey BETENEV
3// Copyright (c) 1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
b311480e 16
7fd59977 17// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
7fd59977 18
42cf5bc1 19#include <Standard_Type.hxx>
20#include <StepRepr_ConfigurationItem.hxx>
21#include <StepRepr_ProductConcept.hxx>
22#include <TCollection_HAsciiString.hxx>
7fd59977 23
24//=======================================================================
25//function : StepRepr_ConfigurationItem
26//purpose :
27//=======================================================================
7fd59977 28StepRepr_ConfigurationItem::StepRepr_ConfigurationItem ()
29{
30 defDescription = Standard_False;
31 defPurpose = Standard_False;
32}
33
34//=======================================================================
35//function : Init
36//purpose :
37//=======================================================================
38
39void StepRepr_ConfigurationItem::Init (const Handle(TCollection_HAsciiString) &aId,
40 const Handle(TCollection_HAsciiString) &aName,
41 const Standard_Boolean hasDescription,
42 const Handle(TCollection_HAsciiString) &aDescription,
43 const Handle(StepRepr_ProductConcept) &aItemConcept,
44 const Standard_Boolean hasPurpose,
45 const Handle(TCollection_HAsciiString) &aPurpose)
46{
47
48 theId = aId;
49
50 theName = aName;
51
52 defDescription = hasDescription;
53 if (defDescription) {
54 theDescription = aDescription;
55 }
56 else theDescription.Nullify();
57
58 theItemConcept = aItemConcept;
59
60 defPurpose = hasPurpose;
61 if (defPurpose) {
62 thePurpose = aPurpose;
63 }
64 else thePurpose.Nullify();
65}
66
67//=======================================================================
68//function : Id
69//purpose :
70//=======================================================================
71
72Handle(TCollection_HAsciiString) StepRepr_ConfigurationItem::Id () const
73{
74 return theId;
75}
76
77//=======================================================================
78//function : SetId
79//purpose :
80//=======================================================================
81
82void StepRepr_ConfigurationItem::SetId (const Handle(TCollection_HAsciiString) &aId)
83{
84 theId = aId;
85}
86
87//=======================================================================
88//function : Name
89//purpose :
90//=======================================================================
91
92Handle(TCollection_HAsciiString) StepRepr_ConfigurationItem::Name () const
93{
94 return theName;
95}
96
97//=======================================================================
98//function : SetName
99//purpose :
100//=======================================================================
101
102void StepRepr_ConfigurationItem::SetName (const Handle(TCollection_HAsciiString) &aName)
103{
104 theName = aName;
105}
106
107//=======================================================================
108//function : Description
109//purpose :
110//=======================================================================
111
112Handle(TCollection_HAsciiString) StepRepr_ConfigurationItem::Description () const
113{
114 return theDescription;
115}
116
117//=======================================================================
118//function : SetDescription
119//purpose :
120//=======================================================================
121
122void StepRepr_ConfigurationItem::SetDescription (const Handle(TCollection_HAsciiString) &aDescription)
123{
124 theDescription = aDescription;
125}
126
127//=======================================================================
128//function : HasDescription
129//purpose :
130//=======================================================================
131
132Standard_Boolean StepRepr_ConfigurationItem::HasDescription () const
133{
134 return defDescription;
135}
136
137//=======================================================================
138//function : ItemConcept
139//purpose :
140//=======================================================================
141
142Handle(StepRepr_ProductConcept) StepRepr_ConfigurationItem::ItemConcept () const
143{
144 return theItemConcept;
145}
146
147//=======================================================================
148//function : SetItemConcept
149//purpose :
150//=======================================================================
151
152void StepRepr_ConfigurationItem::SetItemConcept (const Handle(StepRepr_ProductConcept) &aItemConcept)
153{
154 theItemConcept = aItemConcept;
155}
156
157//=======================================================================
158//function : Purpose
159//purpose :
160//=======================================================================
161
162Handle(TCollection_HAsciiString) StepRepr_ConfigurationItem::Purpose () const
163{
164 return thePurpose;
165}
166
167//=======================================================================
168//function : SetPurpose
169//purpose :
170//=======================================================================
171
172void StepRepr_ConfigurationItem::SetPurpose (const Handle(TCollection_HAsciiString) &aPurpose)
173{
174 thePurpose = aPurpose;
175}
176
177//=======================================================================
178//function : HasPurpose
179//purpose :
180//=======================================================================
181
182Standard_Boolean StepRepr_ConfigurationItem::HasPurpose () const
183{
184 return defPurpose;
185}