0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / XCAFDimTolObjects / XCAFDimTolObjects_DatumObject.cxx
CommitLineData
9ebaae37 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#include <XCAFDimTolObjects_DatumObject.hxx>
15
16
92efcf78 17IMPLEMENT_STANDARD_RTTIEXT(XCAFDimTolObjects_DatumObject,Standard_Transient)
18
9ebaae37 19//=======================================================================
20//function : XCAFDimTolObjects_DatumObject
21//purpose :
22//=======================================================================
23
24XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject()
25{
1c9d3225 26 myIsDTarget = Standard_False;
9ebaae37 27}
28
29//=======================================================================
30//function : XCAFDimTolObjects_DatumObject
31//purpose :
32//=======================================================================
33
34XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject(const Handle(XCAFDimTolObjects_DatumObject)& theObj)
35{
36 myName = theObj->myName;
37 myModifiers = theObj->myModifiers;
38 myModifierWithValue = theObj->myModifierWithValue;
39 myValueOfModifier = theObj->myValueOfModifier;
40 myDatumTarget = theObj->myDatumTarget;
1c9d3225 41 myIsDTarget = theObj->myIsDTarget;
42 myAxis = theObj->myAxis;
43 myDTargetType = theObj->myDTargetType;
9ebaae37 44}
45
46//=======================================================================
47//function : GetName
48//purpose :
49//=======================================================================
50
51Handle(TCollection_HAsciiString) XCAFDimTolObjects_DatumObject::GetName() const
52{
53 if(myName.IsNull())
54 return new TCollection_HAsciiString();
55 return myName;
56}
57
58//=======================================================================
59//function : SetName
60//purpose :
61//=======================================================================
62
63void XCAFDimTolObjects_DatumObject::SetName(const Handle(TCollection_HAsciiString)& theName)
64{
65 myName = theName;
66}
67
68//=======================================================================
69//function : GetModifiers
70//purpose :
71//=======================================================================
72
73XCAFDimTolObjects_DatumModifiersSequence XCAFDimTolObjects_DatumObject::GetModifiers() const
74{
75 return myModifiers;
76}
77
78//=======================================================================
79//function : SetModifiers
80//purpose :
81//=======================================================================
82
83void XCAFDimTolObjects_DatumObject::SetModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers)
84{
85 myModifiers = theModifiers;
86}
87
88//=======================================================================
89//function : SetModifierWithValue
90//purpose :
91//=======================================================================
92
93void XCAFDimTolObjects_DatumObject::SetModifierWithValue(const XCAFDimTolObjects_DatumModifWithValue theModifier, const Standard_Real theValue)
94{
95 myModifierWithValue = theModifier;
96 myValueOfModifier = theValue;
97}
98
99//=======================================================================
100//function : GetModifierWithValue
101//purpose :
102//=======================================================================
103
104void XCAFDimTolObjects_DatumObject::GetModifierWithValue(XCAFDimTolObjects_DatumModifWithValue& theModifier, Standard_Real& theValue) const
105{
106 theModifier = myModifierWithValue;
107 theValue = myValueOfModifier;
108}
109
110//=======================================================================
111//function : AddModifier
112//purpose :
113//=======================================================================
114
115void XCAFDimTolObjects_DatumObject::AddModifier(const XCAFDimTolObjects_DatumSingleModif theModifier)
116{
117 myModifiers.Append(theModifier);
118}
119
120//=======================================================================
121//function : GetDatumTarget
122//purpose :
123//=======================================================================
124
125TopoDS_Shape XCAFDimTolObjects_DatumObject::GetDatumTarget() const
126{
127 return myDatumTarget;
128}
129
130//=======================================================================
131//function : SetDatumTarget
132//purpose :
133//=======================================================================
134
135void XCAFDimTolObjects_DatumObject::SetDatumTarget (const TopoDS_Shape& theShape)
136{
137 myDatumTarget = theShape;
138}
139
1c9d3225 140//=======================================================================
141//function : GetPosition
142//purpose :
143//=======================================================================
144
145Standard_Integer XCAFDimTolObjects_DatumObject::GetPosition() const
146{
147 return myPosition;
148}
149
150//=======================================================================
151//function : SetName
152//purpose :
153//=======================================================================
154
155void XCAFDimTolObjects_DatumObject::SetPosition(const Standard_Integer thePosition)
156{
157 myPosition = thePosition;
158}
159
160//=======================================================================
161//function : IsDatumTarget
162//purpose :
163//=======================================================================
164
165Standard_Boolean XCAFDimTolObjects_DatumObject::IsDatumTarget() const
166{
167 return myIsDTarget;
168}
169
9ebaae37 170//=======================================================================
171//function : IsDatumTarget
172//purpose :
173//=======================================================================
174
1c9d3225 175void XCAFDimTolObjects_DatumObject::IsDatumTarget(const Standard_Boolean theIsDT)
176{
177 myIsDTarget = theIsDT;
178}
179
180//=======================================================================
181//function : GetDatumTargetType
182//purpose :
183//=======================================================================
184
185XCAFDimTolObjects_DatumTargetType XCAFDimTolObjects_DatumObject::GetDatumTargetType() const
9ebaae37 186{
1c9d3225 187 return myDTargetType;
9ebaae37 188}
1c9d3225 189
190//=======================================================================
191//function : SetDatumTargetType
192//purpose :
193//=======================================================================
194
195void XCAFDimTolObjects_DatumObject::SetDatumTargetType(const XCAFDimTolObjects_DatumTargetType theType)
196{
197 myDTargetType = theType;
198}
199
200//=======================================================================
201//function : GetDatumTargetAxis
202//purpose :
203//=======================================================================
204
205gp_Ax2 XCAFDimTolObjects_DatumObject::GetDatumTargetAxis() const
206{
207 return myAxis;
208}
209
210//=======================================================================
211//function : SetDatumTargetAxis
212//purpose :
213//=======================================================================
214
215void XCAFDimTolObjects_DatumObject::SetDatumTargetAxis(const gp_Ax2& theAxis)
216{
217 myAxis = theAxis;
218}
219
220//=======================================================================
221//function : GetDatumTargetLength
222//purpose :
223//=======================================================================
224
225Standard_Real XCAFDimTolObjects_DatumObject::GetDatumTargetLength() const
226{
227 return myLength;
228}
229
230//=======================================================================
231//function : SetDatumTargetLength
232//purpose :
233//=======================================================================
234
235void XCAFDimTolObjects_DatumObject::SetDatumTargetLength(const Standard_Real theLength)
236{
237 myLength = theLength;
238}
239
240
241//=======================================================================
242//function : GetDatumTargetWidth
243//purpose :
244//=======================================================================
245
246Standard_Real XCAFDimTolObjects_DatumObject::GetDatumTargetWidth() const
247{
248 return myWidth;
249}
250
251//=======================================================================
252//function : SetDatumTargetWidth
253//purpose :
254//=======================================================================
255
256void XCAFDimTolObjects_DatumObject::SetDatumTargetWidth(const Standard_Real theWidth)
257{
258 myWidth = theWidth;
6595eee7 259}
260
261//=======================================================================
262//function : GetDatumTargetNumber
263//purpose :
264//=======================================================================
265
266Standard_Integer XCAFDimTolObjects_DatumObject::GetDatumTargetNumber() const
267{
268 return myDatumTargetNumber;
269}
270
271//=======================================================================
272//function : SetDatumTargetNumber
273//purpose :
274//=======================================================================
275
276void XCAFDimTolObjects_DatumObject::SetDatumTargetNumber(const Standard_Integer theNumber)
277{
278 myDatumTargetNumber = theNumber;
279}