0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / IGESAppli / IGESAppli_Flow.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 <IGESAppli_Flow.hxx>
20#include <IGESData_IGESEntity.hxx>
21#include <IGESDraw_ConnectPoint.hxx>
22#include <IGESGraph_TextDisplayTemplate.hxx>
42cf5bc1 23#include <Standard_Type.hxx>
24#include <TCollection_HAsciiString.hxx>
7fd59977 25
92efcf78 26IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Flow,IGESData_IGESEntity)
27
b311480e 28IGESAppli_Flow::IGESAppli_Flow () { }
7fd59977 29
30
31 void IGESAppli_Flow::Init
32 (const Standard_Integer nbContextFlags,
33 const Standard_Integer aFlowType, const Standard_Integer aFuncFlag,
34 const Handle(IGESData_HArray1OfIGESEntity)& allFlowAssocs,
35 const Handle(IGESDraw_HArray1OfConnectPoint)& allConnectPoints,
36 const Handle(IGESData_HArray1OfIGESEntity)& allJoins,
37 const Handle(Interface_HArray1OfHAsciiString)& allFlowNames,
38 const Handle(IGESGraph_HArray1OfTextDisplayTemplate)& allTextDisps,
39 const Handle(IGESData_HArray1OfIGESEntity)& allContFlowAssocs)
40{
41 theNbContextFlags = nbContextFlags;
42 theTypeOfFlow = aFlowType;
43 theFunctionFlag = aFuncFlag;
44 theFlowAssociativities = allFlowAssocs;
45 theConnectPoints = allConnectPoints;
46 theJoins = allJoins;
47 theFlowNames = allFlowNames;
48 theTextDisplayTemplates = allTextDisps;
49 theContFlowAssociativities = allContFlowAssocs;
50 InitTypeAndForm(402,18);
51}
52
53 Standard_Boolean IGESAppli_Flow::OwnCorrect ()
54{
55 if (theNbContextFlags == 2) return Standard_False;
56 theNbContextFlags = 2;
57 return Standard_True;
58}
59
60
61 Standard_Integer IGESAppli_Flow::NbContextFlags () const
62{
63 return theNbContextFlags;
64}
65
66 Standard_Integer IGESAppli_Flow::NbFlowAssociativities () const
67{
68 return (theFlowAssociativities.IsNull() ? 0 : theFlowAssociativities->Length());
69}
70
71 Standard_Integer IGESAppli_Flow::NbConnectPoints () const
72{
73 return (theConnectPoints.IsNull() ? 0 : theConnectPoints->Length());
74}
75
76 Standard_Integer IGESAppli_Flow::NbJoins () const
77{
78 return (theJoins.IsNull() ? 0 : theJoins->Length());
79}
80
81 Standard_Integer IGESAppli_Flow::NbFlowNames () const
82{
83 return (theFlowNames.IsNull() ? 0 : theFlowNames->Length());
84}
85
86 Standard_Integer IGESAppli_Flow::NbTextDisplayTemplates () const
87{
88 return (theTextDisplayTemplates.IsNull() ? 0 : theTextDisplayTemplates->Length());
89}
90
91 Standard_Integer IGESAppli_Flow::NbContFlowAssociativities () const
92{
93 return (theContFlowAssociativities.IsNull() ? 0 : theContFlowAssociativities->Length());
94}
95
96 Standard_Integer IGESAppli_Flow::TypeOfFlow () const
97{
98 return theTypeOfFlow;
99}
100
101 Standard_Integer IGESAppli_Flow::FunctionFlag () const
102{
103 return theFunctionFlag;
104}
105
106 Handle(IGESData_IGESEntity) IGESAppli_Flow::FlowAssociativity
107 (const Standard_Integer Index) const
108{
109 return theFlowAssociativities->Value(Index);
110}
111
112 Handle(IGESDraw_ConnectPoint) IGESAppli_Flow::ConnectPoint
113 (const Standard_Integer Index) const
114{
115 return theConnectPoints->Value(Index);
116}
117
118 Handle(IGESData_IGESEntity) IGESAppli_Flow::Join
119 (const Standard_Integer Index) const
120{
121 return theJoins->Value(Index);
122}
123
124 Handle(TCollection_HAsciiString) IGESAppli_Flow::FlowName
125 (const Standard_Integer Index) const
126{
127 return theFlowNames->Value(Index);
128}
129
130 Handle(IGESGraph_TextDisplayTemplate) IGESAppli_Flow::TextDisplayTemplate
131 (const Standard_Integer Index) const
132{
133 return theTextDisplayTemplates->Value(Index);
134}
135
136 Handle(IGESData_IGESEntity) IGESAppli_Flow::ContFlowAssociativity
137 (const Standard_Integer Index) const
138{
139 return theContFlowAssociativities->Value(Index);
140}