7fd59977 |
1 | //-------------------------------------------------------------------- |
2 | // |
3 | // File Name : IGESAppli_PipingFlow.cxx |
4 | // Date : |
5 | // Author : CKY / Contract Toubro-Larsen |
6 | // Copyright : MATRA-DATAVISION 1993 |
7 | // |
8 | //-------------------------------------------------------------------- |
9 | |
10 | #include <IGESAppli_PipingFlow.ixx> |
11 | #include <Standard_DimensionMismatch.hxx> |
12 | |
13 | |
14 | IGESAppli_PipingFlow::IGESAppli_PipingFlow () { } |
15 | |
16 | |
17 | void IGESAppli_PipingFlow::Init |
18 | (const Standard_Integer nbContextFlags, |
19 | const Standard_Integer aFlowType, |
20 | const Handle(IGESData_HArray1OfIGESEntity)& allFlowAssocs, |
21 | const Handle(IGESDraw_HArray1OfConnectPoint)& allConnectPoints, |
22 | const Handle(IGESData_HArray1OfIGESEntity)& allJoins, |
23 | const Handle(Interface_HArray1OfHAsciiString)& allFlowNames, |
24 | const Handle(IGESGraph_HArray1OfTextDisplayTemplate)& allTextDisps, |
25 | const Handle(IGESData_HArray1OfIGESEntity)& allContFlowAssocs) |
26 | { |
27 | Standard_Integer num = allFlowAssocs->Length(); |
28 | if (allFlowAssocs->Lower() != 1 || |
29 | allConnectPoints->Lower() != 1 || allConnectPoints->Length() != num || |
30 | allJoins->Lower() != 1 || allJoins->Length() != num || |
31 | allFlowNames->Lower() != 1 || allFlowNames->Length() != num || |
32 | allContFlowAssocs->Lower() != 1 || allContFlowAssocs->Length() != num ) |
33 | Standard_DimensionMismatch::Raise("IGESAppli_PipingFlow : Init"); |
34 | theNbContextFlags = nbContextFlags; |
35 | theTypeOfFlow = aFlowType; |
36 | theFlowAssociativities = allFlowAssocs; |
37 | theConnectPoints = allConnectPoints; |
38 | theJoins = allJoins; |
39 | theFlowNames = allFlowNames; |
40 | theTextDisplayTemplates = allTextDisps; |
41 | theContFlowAssociativities = allContFlowAssocs; |
42 | InitTypeAndForm(402,20); |
43 | } |
44 | |
45 | Standard_Boolean IGESAppli_PipingFlow::OwnCorrect () |
46 | { |
47 | if (theNbContextFlags == 1) return Standard_False; |
48 | theNbContextFlags = 1; |
49 | return Standard_True; |
50 | } |
51 | |
52 | |
53 | Standard_Integer IGESAppli_PipingFlow::NbContextFlags () const |
54 | { |
55 | return theNbContextFlags; |
56 | } |
57 | |
58 | Standard_Integer IGESAppli_PipingFlow::NbFlowAssociativities () const |
59 | { |
60 | return theFlowAssociativities->Length(); |
61 | } |
62 | |
63 | Standard_Integer IGESAppli_PipingFlow::NbConnectPoints () const |
64 | { |
65 | return theConnectPoints->Length(); |
66 | } |
67 | |
68 | Standard_Integer IGESAppli_PipingFlow::NbJoins () const |
69 | { |
70 | return theJoins->Length(); |
71 | } |
72 | |
73 | Standard_Integer IGESAppli_PipingFlow::NbFlowNames () const |
74 | { |
75 | return theFlowNames->Length(); |
76 | } |
77 | |
78 | Standard_Integer IGESAppli_PipingFlow::NbTextDisplayTemplates () const |
79 | { |
80 | return theTextDisplayTemplates->Length(); |
81 | } |
82 | |
83 | Standard_Integer IGESAppli_PipingFlow::NbContFlowAssociativities () const |
84 | { |
85 | return theContFlowAssociativities->Length(); |
86 | } |
87 | |
88 | Standard_Integer IGESAppli_PipingFlow::TypeOfFlow () const |
89 | { |
90 | return theTypeOfFlow; |
91 | } |
92 | |
93 | Handle(IGESData_IGESEntity) IGESAppli_PipingFlow::FlowAssociativity |
94 | (const Standard_Integer Index) const |
95 | { |
96 | return theFlowAssociativities->Value(Index); |
97 | } |
98 | |
99 | Handle(IGESDraw_ConnectPoint) IGESAppli_PipingFlow::ConnectPoint |
100 | (const Standard_Integer Index) const |
101 | { |
102 | return theConnectPoints->Value(Index); |
103 | } |
104 | |
105 | Handle(IGESData_IGESEntity) IGESAppli_PipingFlow::Join |
106 | (const Standard_Integer Index) const |
107 | { |
108 | return theJoins->Value(Index); |
109 | } |
110 | |
111 | Handle(TCollection_HAsciiString) IGESAppli_PipingFlow::FlowName |
112 | (const Standard_Integer Index) const |
113 | { |
114 | return theFlowNames->Value(Index); |
115 | } |
116 | |
117 | Handle(IGESGraph_TextDisplayTemplate) IGESAppli_PipingFlow::TextDisplayTemplate |
118 | (const Standard_Integer Index) const |
119 | { |
120 | return theTextDisplayTemplates->Value(Index); |
121 | } |
122 | |
123 | Handle(IGESData_IGESEntity) IGESAppli_PipingFlow::ContFlowAssociativity |
124 | (const Standard_Integer Index) const |
125 | { |
126 | return theContFlowAssociativities->Value(Index); |
127 | } |