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 IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Flow,IGESData_IGESEntity)
30 IGESAppli_Flow::IGESAppli_Flow () { }
33 void IGESAppli_Flow::Init
34 (const Standard_Integer nbContextFlags,
35 const Standard_Integer aFlowType, const Standard_Integer aFuncFlag,
36 const Handle(IGESData_HArray1OfIGESEntity)& allFlowAssocs,
37 const Handle(IGESDraw_HArray1OfConnectPoint)& allConnectPoints,
38 const Handle(IGESData_HArray1OfIGESEntity)& allJoins,
39 const Handle(Interface_HArray1OfHAsciiString)& allFlowNames,
40 const Handle(IGESGraph_HArray1OfTextDisplayTemplate)& allTextDisps,
41 const Handle(IGESData_HArray1OfIGESEntity)& allContFlowAssocs)
43 theNbContextFlags = nbContextFlags;
44 theTypeOfFlow = aFlowType;
45 theFunctionFlag = aFuncFlag;
46 theFlowAssociativities = allFlowAssocs;
47 theConnectPoints = allConnectPoints;
49 theFlowNames = allFlowNames;
50 theTextDisplayTemplates = allTextDisps;
51 theContFlowAssociativities = allContFlowAssocs;
52 InitTypeAndForm(402,18);
55 Standard_Boolean IGESAppli_Flow::OwnCorrect ()
57 if (theNbContextFlags == 2) return Standard_False;
58 theNbContextFlags = 2;
63 Standard_Integer IGESAppli_Flow::NbContextFlags () const
65 return theNbContextFlags;
68 Standard_Integer IGESAppli_Flow::NbFlowAssociativities () const
70 return (theFlowAssociativities.IsNull() ? 0 : theFlowAssociativities->Length());
73 Standard_Integer IGESAppli_Flow::NbConnectPoints () const
75 return (theConnectPoints.IsNull() ? 0 : theConnectPoints->Length());
78 Standard_Integer IGESAppli_Flow::NbJoins () const
80 return (theJoins.IsNull() ? 0 : theJoins->Length());
83 Standard_Integer IGESAppli_Flow::NbFlowNames () const
85 return (theFlowNames.IsNull() ? 0 : theFlowNames->Length());
88 Standard_Integer IGESAppli_Flow::NbTextDisplayTemplates () const
90 return (theTextDisplayTemplates.IsNull() ? 0 : theTextDisplayTemplates->Length());
93 Standard_Integer IGESAppli_Flow::NbContFlowAssociativities () const
95 return (theContFlowAssociativities.IsNull() ? 0 : theContFlowAssociativities->Length());
98 Standard_Integer IGESAppli_Flow::TypeOfFlow () const
100 return theTypeOfFlow;
103 Standard_Integer IGESAppli_Flow::FunctionFlag () const
105 return theFunctionFlag;
108 Handle(IGESData_IGESEntity) IGESAppli_Flow::FlowAssociativity
109 (const Standard_Integer Index) const
111 return theFlowAssociativities->Value(Index);
114 Handle(IGESDraw_ConnectPoint) IGESAppli_Flow::ConnectPoint
115 (const Standard_Integer Index) const
117 return theConnectPoints->Value(Index);
120 Handle(IGESData_IGESEntity) IGESAppli_Flow::Join
121 (const Standard_Integer Index) const
123 return theJoins->Value(Index);
126 Handle(TCollection_HAsciiString) IGESAppli_Flow::FlowName
127 (const Standard_Integer Index) const
129 return theFlowNames->Value(Index);
132 Handle(IGESGraph_TextDisplayTemplate) IGESAppli_Flow::TextDisplayTemplate
133 (const Standard_Integer Index) const
135 return theTextDisplayTemplates->Value(Index);
138 Handle(IGESData_IGESEntity) IGESAppli_Flow::ContFlowAssociativity
139 (const Standard_Integer Index) const
141 return theContFlowAssociativities->Value(Index);