Integration of OCCT 6.5.0 from SVN
[occt.git] / src / StepRepr / StepRepr_ConfigurationItem.cxx
1 // File:        StepRepr_ConfigurationItem.cxx
2 // Created:     Fri Nov 26 16:26:36 1999 
3 // Author:      Andrey BETENEV
4 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
5 // Copyright:   Matra Datavision 1999
6
7 #include <StepRepr_ConfigurationItem.ixx>
8
9 //=======================================================================
10 //function : StepRepr_ConfigurationItem
11 //purpose  : 
12 //=======================================================================
13
14 StepRepr_ConfigurationItem::StepRepr_ConfigurationItem ()
15 {
16   defDescription = Standard_False;
17   defPurpose = Standard_False;
18 }
19
20 //=======================================================================
21 //function : Init
22 //purpose  : 
23 //=======================================================================
24
25 void StepRepr_ConfigurationItem::Init (const Handle(TCollection_HAsciiString) &aId,
26                                        const Handle(TCollection_HAsciiString) &aName,
27                                        const Standard_Boolean hasDescription,
28                                        const Handle(TCollection_HAsciiString) &aDescription,
29                                        const Handle(StepRepr_ProductConcept) &aItemConcept,
30                                        const Standard_Boolean hasPurpose,
31                                        const Handle(TCollection_HAsciiString) &aPurpose)
32 {
33
34   theId = aId;
35
36   theName = aName;
37
38   defDescription = hasDescription;
39   if (defDescription) {
40     theDescription = aDescription;
41   }
42   else theDescription.Nullify();
43
44   theItemConcept = aItemConcept;
45
46   defPurpose = hasPurpose;
47   if (defPurpose) {
48     thePurpose = aPurpose;
49   }
50   else thePurpose.Nullify();
51 }
52
53 //=======================================================================
54 //function : Id
55 //purpose  : 
56 //=======================================================================
57
58 Handle(TCollection_HAsciiString) StepRepr_ConfigurationItem::Id () const
59 {
60   return theId;
61 }
62
63 //=======================================================================
64 //function : SetId
65 //purpose  : 
66 //=======================================================================
67
68 void StepRepr_ConfigurationItem::SetId (const Handle(TCollection_HAsciiString) &aId)
69 {
70   theId = aId;
71 }
72
73 //=======================================================================
74 //function : Name
75 //purpose  : 
76 //=======================================================================
77
78 Handle(TCollection_HAsciiString) StepRepr_ConfigurationItem::Name () const
79 {
80   return theName;
81 }
82
83 //=======================================================================
84 //function : SetName
85 //purpose  : 
86 //=======================================================================
87
88 void StepRepr_ConfigurationItem::SetName (const Handle(TCollection_HAsciiString) &aName)
89 {
90   theName = aName;
91 }
92
93 //=======================================================================
94 //function : Description
95 //purpose  : 
96 //=======================================================================
97
98 Handle(TCollection_HAsciiString) StepRepr_ConfigurationItem::Description () const
99 {
100   return theDescription;
101 }
102
103 //=======================================================================
104 //function : SetDescription
105 //purpose  : 
106 //=======================================================================
107
108 void StepRepr_ConfigurationItem::SetDescription (const Handle(TCollection_HAsciiString) &aDescription)
109 {
110   theDescription = aDescription;
111 }
112
113 //=======================================================================
114 //function : HasDescription
115 //purpose  : 
116 //=======================================================================
117
118 Standard_Boolean StepRepr_ConfigurationItem::HasDescription () const
119 {
120   return defDescription;
121 }
122
123 //=======================================================================
124 //function : ItemConcept
125 //purpose  : 
126 //=======================================================================
127
128 Handle(StepRepr_ProductConcept) StepRepr_ConfigurationItem::ItemConcept () const
129 {
130   return theItemConcept;
131 }
132
133 //=======================================================================
134 //function : SetItemConcept
135 //purpose  : 
136 //=======================================================================
137
138 void StepRepr_ConfigurationItem::SetItemConcept (const Handle(StepRepr_ProductConcept) &aItemConcept)
139 {
140   theItemConcept = aItemConcept;
141 }
142
143 //=======================================================================
144 //function : Purpose
145 //purpose  : 
146 //=======================================================================
147
148 Handle(TCollection_HAsciiString) StepRepr_ConfigurationItem::Purpose () const
149 {
150   return thePurpose;
151 }
152
153 //=======================================================================
154 //function : SetPurpose
155 //purpose  : 
156 //=======================================================================
157
158 void StepRepr_ConfigurationItem::SetPurpose (const Handle(TCollection_HAsciiString) &aPurpose)
159 {
160   thePurpose = aPurpose;
161 }
162
163 //=======================================================================
164 //function : HasPurpose
165 //purpose  : 
166 //=======================================================================
167
168 Standard_Boolean StepRepr_ConfigurationItem::HasPurpose () const
169 {
170   return defPurpose;
171 }