b311480e |
1 | // Created by: CKY / Contract Toubro-Larsen |
2 | // Copyright (c) 1993-1999 Matra Datavision |
3 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
4 | // |
5 | // The content of this file is subject to the Open CASCADE Technology Public |
6 | // License Version 6.5 (the "License"). You may not use the content of this file |
7 | // except in compliance with the License. Please obtain a copy of the License |
8 | // at http://www.opencascade.org and read it completely before using this file. |
7fd59977 |
9 | // |
b311480e |
10 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
7fd59977 |
12 | // |
b311480e |
13 | // The Original Code and all software distributed under the License is |
14 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | // Initial Developer hereby disclaims all such warranties, including without |
16 | // limitation, any warranties of merchantability, fitness for a particular |
17 | // purpose or non-infringement. Please see the License for the specific terms |
18 | // and conditions governing the rights and limitations under the License. |
19 | |
20 | //-------------------------------------------------------------------- |
7fd59977 |
21 | //-------------------------------------------------------------------- |
22 | |
23 | #include <IGESAppli_Flow.ixx> |
24 | #include <Standard_DimensionMismatch.hxx> |
25 | |
26 | |
b311480e |
27 | IGESAppli_Flow::IGESAppli_Flow () { } |
7fd59977 |
28 | |
29 | |
30 | void IGESAppli_Flow::Init |
31 | (const Standard_Integer nbContextFlags, |
32 | const Standard_Integer aFlowType, const Standard_Integer aFuncFlag, |
33 | const Handle(IGESData_HArray1OfIGESEntity)& allFlowAssocs, |
34 | const Handle(IGESDraw_HArray1OfConnectPoint)& allConnectPoints, |
35 | const Handle(IGESData_HArray1OfIGESEntity)& allJoins, |
36 | const Handle(Interface_HArray1OfHAsciiString)& allFlowNames, |
37 | const Handle(IGESGraph_HArray1OfTextDisplayTemplate)& allTextDisps, |
38 | const Handle(IGESData_HArray1OfIGESEntity)& allContFlowAssocs) |
39 | { |
40 | theNbContextFlags = nbContextFlags; |
41 | theTypeOfFlow = aFlowType; |
42 | theFunctionFlag = aFuncFlag; |
43 | theFlowAssociativities = allFlowAssocs; |
44 | theConnectPoints = allConnectPoints; |
45 | theJoins = allJoins; |
46 | theFlowNames = allFlowNames; |
47 | theTextDisplayTemplates = allTextDisps; |
48 | theContFlowAssociativities = allContFlowAssocs; |
49 | InitTypeAndForm(402,18); |
50 | } |
51 | |
52 | Standard_Boolean IGESAppli_Flow::OwnCorrect () |
53 | { |
54 | if (theNbContextFlags == 2) return Standard_False; |
55 | theNbContextFlags = 2; |
56 | return Standard_True; |
57 | } |
58 | |
59 | |
60 | Standard_Integer IGESAppli_Flow::NbContextFlags () const |
61 | { |
62 | return theNbContextFlags; |
63 | } |
64 | |
65 | Standard_Integer IGESAppli_Flow::NbFlowAssociativities () const |
66 | { |
67 | return (theFlowAssociativities.IsNull() ? 0 : theFlowAssociativities->Length()); |
68 | } |
69 | |
70 | Standard_Integer IGESAppli_Flow::NbConnectPoints () const |
71 | { |
72 | return (theConnectPoints.IsNull() ? 0 : theConnectPoints->Length()); |
73 | } |
74 | |
75 | Standard_Integer IGESAppli_Flow::NbJoins () const |
76 | { |
77 | return (theJoins.IsNull() ? 0 : theJoins->Length()); |
78 | } |
79 | |
80 | Standard_Integer IGESAppli_Flow::NbFlowNames () const |
81 | { |
82 | return (theFlowNames.IsNull() ? 0 : theFlowNames->Length()); |
83 | } |
84 | |
85 | Standard_Integer IGESAppli_Flow::NbTextDisplayTemplates () const |
86 | { |
87 | return (theTextDisplayTemplates.IsNull() ? 0 : theTextDisplayTemplates->Length()); |
88 | } |
89 | |
90 | Standard_Integer IGESAppli_Flow::NbContFlowAssociativities () const |
91 | { |
92 | return (theContFlowAssociativities.IsNull() ? 0 : theContFlowAssociativities->Length()); |
93 | } |
94 | |
95 | Standard_Integer IGESAppli_Flow::TypeOfFlow () const |
96 | { |
97 | return theTypeOfFlow; |
98 | } |
99 | |
100 | Standard_Integer IGESAppli_Flow::FunctionFlag () const |
101 | { |
102 | return theFunctionFlag; |
103 | } |
104 | |
105 | Handle(IGESData_IGESEntity) IGESAppli_Flow::FlowAssociativity |
106 | (const Standard_Integer Index) const |
107 | { |
108 | return theFlowAssociativities->Value(Index); |
109 | } |
110 | |
111 | Handle(IGESDraw_ConnectPoint) IGESAppli_Flow::ConnectPoint |
112 | (const Standard_Integer Index) const |
113 | { |
114 | return theConnectPoints->Value(Index); |
115 | } |
116 | |
117 | Handle(IGESData_IGESEntity) IGESAppli_Flow::Join |
118 | (const Standard_Integer Index) const |
119 | { |
120 | return theJoins->Value(Index); |
121 | } |
122 | |
123 | Handle(TCollection_HAsciiString) IGESAppli_Flow::FlowName |
124 | (const Standard_Integer Index) const |
125 | { |
126 | return theFlowNames->Value(Index); |
127 | } |
128 | |
129 | Handle(IGESGraph_TextDisplayTemplate) IGESAppli_Flow::TextDisplayTemplate |
130 | (const Standard_Integer Index) const |
131 | { |
132 | return theTextDisplayTemplates->Value(Index); |
133 | } |
134 | |
135 | Handle(IGESData_IGESEntity) IGESAppli_Flow::ContFlowAssociativity |
136 | (const Standard_Integer Index) const |
137 | { |
138 | return theContFlowAssociativities->Value(Index); |
139 | } |