0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / IGESDimen / IGESDimen_DimensionDisplayData.cxx
CommitLineData
b311480e 1// Created by: CKY / Contract Toubro-Larsen
2// Copyright (c) 1993-1999 Matra Datavision
973c2be1 3// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
7fd59977 6//
d5f74e42 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
973c2be1 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.
7fd59977 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
16//--------------------------------------------------------------------
7fd59977 17//--------------------------------------------------------------------
18
42cf5bc1 19#include <IGESDimen_DimensionDisplayData.hxx>
20#include <Standard_DimensionMismatch.hxx>
21#include <Standard_OutOfRange.hxx>
22#include <Standard_Type.hxx>
23#include <TCollection_HAsciiString.hxx>
7fd59977 24
92efcf78 25IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_DimensionDisplayData,IGESData_IGESEntity)
26
b311480e 27IGESDimen_DimensionDisplayData::IGESDimen_DimensionDisplayData () { }
7fd59977 28
29
30 void IGESDimen_DimensionDisplayData::Init
31 (const Standard_Integer numProps,
32 const Standard_Integer aDimType, const Standard_Integer aLabelPos,
33 const Standard_Integer aCharSet,
34 const Handle(TCollection_HAsciiString)& aString,
35 const Standard_Integer aSymbol, const Standard_Real anAng,
36 const Standard_Integer anAlign, const Standard_Integer aLevel,
37 const Standard_Integer aPlace, const Standard_Integer anOrient,
38 const Standard_Real initVal,
39 const Handle(TColStd_HArray1OfInteger)& notes,
40 const Handle(TColStd_HArray1OfInteger)& startInd,
41 const Handle(TColStd_HArray1OfInteger)& endInd)
42{
43 if (!notes.IsNull())
44 if (notes->Lower() != 1 ||
45 (startInd->Lower() != 1 || notes->Length() != startInd->Length()) ||
46 (endInd->Lower() != 1 || notes->Length() != endInd->Length()) )
47 Standard_DimensionMismatch::Raise("IGESDimen_DimensionDisplayData : Init");
48
49 theNbPropertyValues = numProps;
50 theDimensionType = aDimType;
51 theLabelPosition = aLabelPos;
52 theCharacterSet = aCharSet;
53 theLString = aString;
54 theDecimalSymbol = aSymbol;
55 theWitnessLineAngle = anAng;
56 theTextAlignment = anAlign;
57 theTextLevel = aLevel;
58 theTextPlacement = aPlace;
59 theArrowHeadOrientation = anOrient;
60 theInitialValue = initVal;
61 theSupplementaryNotes = notes;
62 theStartIndex = startInd;
63 theEndIndex = endInd;
64 InitTypeAndForm(406,30);
65}
66
67
68 Standard_Integer IGESDimen_DimensionDisplayData::NbPropertyValues () const
69{
70 return theNbPropertyValues;
71}
72
73 Standard_Integer IGESDimen_DimensionDisplayData::DimensionType () const
74{
75 return theDimensionType;
76}
77
78 Standard_Integer IGESDimen_DimensionDisplayData::LabelPosition () const
79{
80 return theLabelPosition;
81}
82
83 Standard_Integer IGESDimen_DimensionDisplayData::CharacterSet () const
84{
85 return theCharacterSet;
86}
87
88 Handle(TCollection_HAsciiString) IGESDimen_DimensionDisplayData::LString () const
89{
90 return theLString;
91}
92
93 Standard_Integer IGESDimen_DimensionDisplayData::DecimalSymbol () const
94{
95 return theDecimalSymbol;
96}
97
98 Standard_Real IGESDimen_DimensionDisplayData::WitnessLineAngle () const
99{
100 return theWitnessLineAngle;
101}
102
103 Standard_Integer IGESDimen_DimensionDisplayData::TextAlignment () const
104{
105 return theTextAlignment;
106}
107
108 Standard_Integer IGESDimen_DimensionDisplayData::TextLevel () const
109{
110 return theTextLevel;
111}
112
113 Standard_Integer IGESDimen_DimensionDisplayData::TextPlacement () const
114{
115 return theTextPlacement;
116}
117
118 Standard_Integer IGESDimen_DimensionDisplayData::ArrowHeadOrientation () const
119{
120 return theArrowHeadOrientation;
121}
122
123 Standard_Real IGESDimen_DimensionDisplayData::InitialValue () const
124{
125 return theInitialValue;
126}
127
128 Standard_Integer IGESDimen_DimensionDisplayData::NbSupplementaryNotes () const
129{
130 return (theSupplementaryNotes.IsNull() ? 0 : theSupplementaryNotes->Length());
131}
132
133 Standard_Integer IGESDimen_DimensionDisplayData::SupplementaryNote
134 (const Standard_Integer num) const
135{
136 return theSupplementaryNotes->Value(num);
137}
138
139 Standard_Integer IGESDimen_DimensionDisplayData::StartIndex
140 (const Standard_Integer num) const
141{
142 return theStartIndex->Value(num);
143}
144
145 Standard_Integer IGESDimen_DimensionDisplayData::EndIndex
146 (const Standard_Integer num) const
147{
148 return theEndIndex->Value(num);
149}