7fd59977 |
1 | //-------------------------------------------------------------------- |
2 | // |
3 | // File Name : IGESAppli_LevelToPWBLayerMap.cxx |
4 | // Date : |
5 | // Author : CKY / Contract Toubro-Larsen |
6 | // Copyright : MATRA-DATAVISION 1993 |
7 | // |
8 | //-------------------------------------------------------------------- |
9 | |
10 | #include <IGESAppli_LevelToPWBLayerMap.ixx> |
11 | |
12 | |
13 | IGESAppli_LevelToPWBLayerMap::IGESAppli_LevelToPWBLayerMap () { } |
14 | |
15 | |
16 | void IGESAppli_LevelToPWBLayerMap::Init |
17 | (const Standard_Integer nbPropVal, |
18 | const Handle(TColStd_HArray1OfInteger)& allExchLevels, |
19 | const Handle(Interface_HArray1OfHAsciiString)& allNativeLevels, |
20 | const Handle(TColStd_HArray1OfInteger)& allPhysLevels, |
21 | const Handle(Interface_HArray1OfHAsciiString)& allExchIdents) |
22 | { |
23 | Standard_Integer num = allExchLevels->Length(); |
24 | if ( allExchLevels->Lower() != 1 || |
25 | (allNativeLevels->Lower() != 1 || allNativeLevels->Length() != num) || |
26 | (allPhysLevels->Lower() != 1 || allPhysLevels->Length() != num) || |
27 | (allExchIdents->Lower() != 1 || allExchIdents->Length() != num) ) |
28 | Standard_DimensionMismatch::Raise("IGESAppli_LevelToPWBLayerMap: Init"); |
29 | theNbPropertyValues = nbPropVal; |
30 | theExchangeFileLevelNumber = allExchLevels; |
31 | theNativeLevel = allNativeLevels; |
32 | thePhysicalLayerNumber = allPhysLevels; |
33 | theExchangeFileLevelIdent = allExchIdents; |
34 | InitTypeAndForm(406,24); |
35 | } |
36 | |
37 | Standard_Integer IGESAppli_LevelToPWBLayerMap::NbPropertyValues () const |
38 | { |
39 | return theNbPropertyValues; |
40 | } |
41 | |
42 | Standard_Integer IGESAppli_LevelToPWBLayerMap::NbLevelToLayerDefs () const |
43 | { |
44 | return theExchangeFileLevelNumber->Length(); |
45 | } |
46 | |
47 | Standard_Integer IGESAppli_LevelToPWBLayerMap::ExchangeFileLevelNumber |
48 | (const Standard_Integer Index) const |
49 | { |
50 | return theExchangeFileLevelNumber->Value(Index); |
51 | } |
52 | |
53 | Handle(TCollection_HAsciiString) IGESAppli_LevelToPWBLayerMap::NativeLevel |
54 | (const Standard_Integer Index) const |
55 | { |
56 | return theNativeLevel->Value(Index); |
57 | } |
58 | |
59 | Standard_Integer IGESAppli_LevelToPWBLayerMap::PhysicalLayerNumber |
60 | (const Standard_Integer Index) const |
61 | { |
62 | return thePhysicalLayerNumber->Value(Index); |
63 | } |
64 | |
65 | Handle(TCollection_HAsciiString) IGESAppli_LevelToPWBLayerMap::ExchangeFileLevelIdent |
66 | (const Standard_Integer Index) const |
67 | { |
68 | return theExchangeFileLevelIdent->Value(Index); |
69 | } |