1 // Created by: CKY / Contract Toubro-Larsen
2 // Copyright (c) 1993-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 //--------------------------------------------------------------------
17 //--------------------------------------------------------------------
19 #include <IGESAppli_Flow.hxx>
20 #include <IGESData_IGESEntity.hxx>
21 #include <IGESDraw_ConnectPoint.hxx>
22 #include <IGESGraph_TextDisplayTemplate.hxx>
23 #include <Standard_DimensionMismatch.hxx>
24 #include <Standard_OutOfRange.hxx>
25 #include <Standard_Type.hxx>
26 #include <TCollection_HAsciiString.hxx>
28 IGESAppli_Flow::IGESAppli_Flow () { }
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)
41 theNbContextFlags = nbContextFlags;
42 theTypeOfFlow = aFlowType;
43 theFunctionFlag = aFuncFlag;
44 theFlowAssociativities = allFlowAssocs;
45 theConnectPoints = allConnectPoints;
47 theFlowNames = allFlowNames;
48 theTextDisplayTemplates = allTextDisps;
49 theContFlowAssociativities = allContFlowAssocs;
50 InitTypeAndForm(402,18);
53 Standard_Boolean IGESAppli_Flow::OwnCorrect ()
55 if (theNbContextFlags == 2) return Standard_False;
56 theNbContextFlags = 2;
61 Standard_Integer IGESAppli_Flow::NbContextFlags () const
63 return theNbContextFlags;
66 Standard_Integer IGESAppli_Flow::NbFlowAssociativities () const
68 return (theFlowAssociativities.IsNull() ? 0 : theFlowAssociativities->Length());
71 Standard_Integer IGESAppli_Flow::NbConnectPoints () const
73 return (theConnectPoints.IsNull() ? 0 : theConnectPoints->Length());
76 Standard_Integer IGESAppli_Flow::NbJoins () const
78 return (theJoins.IsNull() ? 0 : theJoins->Length());
81 Standard_Integer IGESAppli_Flow::NbFlowNames () const
83 return (theFlowNames.IsNull() ? 0 : theFlowNames->Length());
86 Standard_Integer IGESAppli_Flow::NbTextDisplayTemplates () const
88 return (theTextDisplayTemplates.IsNull() ? 0 : theTextDisplayTemplates->Length());
91 Standard_Integer IGESAppli_Flow::NbContFlowAssociativities () const
93 return (theContFlowAssociativities.IsNull() ? 0 : theContFlowAssociativities->Length());
96 Standard_Integer IGESAppli_Flow::TypeOfFlow () const
101 Standard_Integer IGESAppli_Flow::FunctionFlag () const
103 return theFunctionFlag;
106 Handle(IGESData_IGESEntity) IGESAppli_Flow::FlowAssociativity
107 (const Standard_Integer Index) const
109 return theFlowAssociativities->Value(Index);
112 Handle(IGESDraw_ConnectPoint) IGESAppli_Flow::ConnectPoint
113 (const Standard_Integer Index) const
115 return theConnectPoints->Value(Index);
118 Handle(IGESData_IGESEntity) IGESAppli_Flow::Join
119 (const Standard_Integer Index) const
121 return theJoins->Value(Index);
124 Handle(TCollection_HAsciiString) IGESAppli_Flow::FlowName
125 (const Standard_Integer Index) const
127 return theFlowNames->Value(Index);
130 Handle(IGESGraph_TextDisplayTemplate) IGESAppli_Flow::TextDisplayTemplate
131 (const Standard_Integer Index) const
133 return theTextDisplayTemplates->Value(Index);
136 Handle(IGESData_IGESEntity) IGESAppli_Flow::ContFlowAssociativity
137 (const Standard_Integer Index) const
139 return theContFlowAssociativities->Value(Index);