0027104: DownCast() cannot return null for mismatched handle
[occt.git] / src / IGESAppli / IGESAppli_PipingFlow.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-01-11
2// Created by: CKY / Contract Toubro-Larsen ( Anand NATRAJAN )
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IGESAppli_PipingFlow_HeaderFile
18#define _IGESAppli_PipingFlow_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Integer.hxx>
24#include <IGESData_HArray1OfIGESEntity.hxx>
25#include <IGESDraw_HArray1OfConnectPoint.hxx>
26#include <Interface_HArray1OfHAsciiString.hxx>
27#include <IGESGraph_HArray1OfTextDisplayTemplate.hxx>
28#include <IGESData_IGESEntity.hxx>
29#include <Standard_Boolean.hxx>
30class Standard_OutOfRange;
31class IGESData_IGESEntity;
32class IGESDraw_ConnectPoint;
33class TCollection_HAsciiString;
34class IGESGraph_TextDisplayTemplate;
35
36
37class IGESAppli_PipingFlow;
38DEFINE_STANDARD_HANDLE(IGESAppli_PipingFlow, IGESData_IGESEntity)
39
40//! defines PipingFlow, Type <402> Form <20>
41//! in package IGESAppli
42//! Represents a single fluid flow path
43class IGESAppli_PipingFlow : public IGESData_IGESEntity
44{
45
46public:
47
48
49 Standard_EXPORT IGESAppli_PipingFlow();
50
51 //! This method is used to set the fields of the class
52 //! PipingFlow
53 //! - nbContextFlags : Count of Context Flags, always = 1
54 //! - aFlowType : Type of Flow, default = 0
55 //! - allFlowAssocs : PipingFlow Associativity Entities
56 //! - allConnectPoints : Connect Point Entities
57 //! - allJoins : Join Entities
58 //! - allFlowNames : PipingFlow Names
59 //! - allTextDispTs : Text Display Template Entities
60 //! - allContFlowAssocs : Continuation Flow Associativity Entities
61 Standard_EXPORT void Init (const Standard_Integer nbContextFlags, const Standard_Integer aFlowType, const Handle(IGESData_HArray1OfIGESEntity)& allFlowAssocs, const Handle(IGESDraw_HArray1OfConnectPoint)& allConnectPoints, const Handle(IGESData_HArray1OfIGESEntity)& allJoins, const Handle(Interface_HArray1OfHAsciiString)& allFlowNames, const Handle(IGESGraph_HArray1OfTextDisplayTemplate)& allTextDisps, const Handle(IGESData_HArray1OfIGESEntity)& allContFlowAssocs);
62
63 //! forces NbContextFalgs to 1, returns True if changed
64 Standard_EXPORT Standard_Boolean OwnCorrect();
65
66 //! returns number of Count of Context Flags, always = 1
67 Standard_EXPORT Standard_Integer NbContextFlags() const;
68
69 //! returns number of Piping Flow Associativity Entities
70 Standard_EXPORT Standard_Integer NbFlowAssociativities() const;
71
72 //! returns number of Connect Point Entities
73 Standard_EXPORT Standard_Integer NbConnectPoints() const;
74
75 //! returns number of Join Entities
76 Standard_EXPORT Standard_Integer NbJoins() const;
77
78 //! returns number of Flow Names
79 Standard_EXPORT Standard_Integer NbFlowNames() const;
80
81 //! returns number of Text Display Template Entities
82 Standard_EXPORT Standard_Integer NbTextDisplayTemplates() const;
83
84 //! returns number of Continuation Piping Flow Associativities
85 Standard_EXPORT Standard_Integer NbContFlowAssociativities() const;
86
87 //! returns Type of Flow = 0 : Not specified,
88 //! 1 : Logical,
89 //! 2 : Physical
90 Standard_EXPORT Standard_Integer TypeOfFlow() const;
91
92 //! returns Piping Flow Associativity Entity
93 //! raises exception if Index <= 0 or Index > NbFlowAssociativities()
94 Standard_EXPORT Handle(IGESData_IGESEntity) FlowAssociativity (const Standard_Integer Index) const;
95
96 //! returns Connect Point Entity
97 //! raises exception if Index <= 0 or Index > NbConnectPoints()
98 Standard_EXPORT Handle(IGESDraw_ConnectPoint) ConnectPoint (const Standard_Integer Index) const;
99
100 //! returns Join Entity
101 //! raises exception if Index <= 0 or Index > NbJoins()
102 Standard_EXPORT Handle(IGESData_IGESEntity) Join (const Standard_Integer Index) const;
103
104 //! returns Flow Name
105 //! raises exception if Index <= 0 or Index > NbFlowNames()
106 Standard_EXPORT Handle(TCollection_HAsciiString) FlowName (const Standard_Integer Index) const;
107
108 //! returns Text Display Template Entity
109 //! raises exception if Index <= 0 or Index > NbTextDisplayTemplates()
110 Standard_EXPORT Handle(IGESGraph_TextDisplayTemplate) TextDisplayTemplate (const Standard_Integer Index) const;
111
112 //! returns Continuation Piping Flow Associativity Entity
113 //! raises exception if Index <= 0 or Index > NbContFlowAssociativities()
114 Standard_EXPORT Handle(IGESData_IGESEntity) ContFlowAssociativity (const Standard_Integer Index) const;
115
116
117
118
92efcf78 119 DEFINE_STANDARD_RTTIEXT(IGESAppli_PipingFlow,IGESData_IGESEntity)
42cf5bc1 120
121protected:
122
123
124
125
126private:
127
128
129 Standard_Integer theNbContextFlags;
130 Standard_Integer theTypeOfFlow;
131 Handle(IGESData_HArray1OfIGESEntity) theFlowAssociativities;
132 Handle(IGESDraw_HArray1OfConnectPoint) theConnectPoints;
133 Handle(IGESData_HArray1OfIGESEntity) theJoins;
134 Handle(Interface_HArray1OfHAsciiString) theFlowNames;
135 Handle(IGESGraph_HArray1OfTextDisplayTemplate) theTextDisplayTemplates;
136 Handle(IGESData_HArray1OfIGESEntity) theContFlowAssociativities;
137
138
139};
140
141
142
143
144
145
146
147#endif // _IGESAppli_PipingFlow_HeaderFile