0024002: Overall code and build procedure refactoring -- 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
b311480e 25IGESDimen_DimensionDisplayData::IGESDimen_DimensionDisplayData () { }
7fd59977 26
27
28 void IGESDimen_DimensionDisplayData::Init
29 (const Standard_Integer numProps,
30 const Standard_Integer aDimType, const Standard_Integer aLabelPos,
31 const Standard_Integer aCharSet,
32 const Handle(TCollection_HAsciiString)& aString,
33 const Standard_Integer aSymbol, const Standard_Real anAng,
34 const Standard_Integer anAlign, const Standard_Integer aLevel,
35 const Standard_Integer aPlace, const Standard_Integer anOrient,
36 const Standard_Real initVal,
37 const Handle(TColStd_HArray1OfInteger)& notes,
38 const Handle(TColStd_HArray1OfInteger)& startInd,
39 const Handle(TColStd_HArray1OfInteger)& endInd)
40{
41 if (!notes.IsNull())
42 if (notes->Lower() != 1 ||
43 (startInd->Lower() != 1 || notes->Length() != startInd->Length()) ||
44 (endInd->Lower() != 1 || notes->Length() != endInd->Length()) )
45 Standard_DimensionMismatch::Raise("IGESDimen_DimensionDisplayData : Init");
46
47 theNbPropertyValues = numProps;
48 theDimensionType = aDimType;
49 theLabelPosition = aLabelPos;
50 theCharacterSet = aCharSet;
51 theLString = aString;
52 theDecimalSymbol = aSymbol;
53 theWitnessLineAngle = anAng;
54 theTextAlignment = anAlign;
55 theTextLevel = aLevel;
56 theTextPlacement = aPlace;
57 theArrowHeadOrientation = anOrient;
58 theInitialValue = initVal;
59 theSupplementaryNotes = notes;
60 theStartIndex = startInd;
61 theEndIndex = endInd;
62 InitTypeAndForm(406,30);
63}
64
65
66 Standard_Integer IGESDimen_DimensionDisplayData::NbPropertyValues () const
67{
68 return theNbPropertyValues;
69}
70
71 Standard_Integer IGESDimen_DimensionDisplayData::DimensionType () const
72{
73 return theDimensionType;
74}
75
76 Standard_Integer IGESDimen_DimensionDisplayData::LabelPosition () const
77{
78 return theLabelPosition;
79}
80
81 Standard_Integer IGESDimen_DimensionDisplayData::CharacterSet () const
82{
83 return theCharacterSet;
84}
85
86 Handle(TCollection_HAsciiString) IGESDimen_DimensionDisplayData::LString () const
87{
88 return theLString;
89}
90
91 Standard_Integer IGESDimen_DimensionDisplayData::DecimalSymbol () const
92{
93 return theDecimalSymbol;
94}
95
96 Standard_Real IGESDimen_DimensionDisplayData::WitnessLineAngle () const
97{
98 return theWitnessLineAngle;
99}
100
101 Standard_Integer IGESDimen_DimensionDisplayData::TextAlignment () const
102{
103 return theTextAlignment;
104}
105
106 Standard_Integer IGESDimen_DimensionDisplayData::TextLevel () const
107{
108 return theTextLevel;
109}
110
111 Standard_Integer IGESDimen_DimensionDisplayData::TextPlacement () const
112{
113 return theTextPlacement;
114}
115
116 Standard_Integer IGESDimen_DimensionDisplayData::ArrowHeadOrientation () const
117{
118 return theArrowHeadOrientation;
119}
120
121 Standard_Real IGESDimen_DimensionDisplayData::InitialValue () const
122{
123 return theInitialValue;
124}
125
126 Standard_Integer IGESDimen_DimensionDisplayData::NbSupplementaryNotes () const
127{
128 return (theSupplementaryNotes.IsNull() ? 0 : theSupplementaryNotes->Length());
129}
130
131 Standard_Integer IGESDimen_DimensionDisplayData::SupplementaryNote
132 (const Standard_Integer num) const
133{
134 return theSupplementaryNotes->Value(num);
135}
136
137 Standard_Integer IGESDimen_DimensionDisplayData::StartIndex
138 (const Standard_Integer num) const
139{
140 return theStartIndex->Value(num);
141}
142
143 Standard_Integer IGESDimen_DimensionDisplayData::EndIndex
144 (const Standard_Integer num) const
145{
146 return theEndIndex->Value(num);
147}