1 // Created on: 1993-01-11
2 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESDraw_NetworkSubfigureDef_HeaderFile
18 #define _IGESDraw_NetworkSubfigureDef_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <IGESData_HArray1OfIGESEntity.hxx>
25 #include <IGESDraw_HArray1OfConnectPoint.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Boolean.hxx>
28 class TCollection_HAsciiString;
29 class IGESGraph_TextDisplayTemplate;
30 class Standard_OutOfRange;
31 class IGESData_IGESEntity;
32 class IGESDraw_ConnectPoint;
35 class IGESDraw_NetworkSubfigureDef;
36 DEFINE_STANDARD_HANDLE(IGESDraw_NetworkSubfigureDef, IGESData_IGESEntity)
38 //! defines IGESNetworkSubfigureDef,
39 //! Type <320> Form Number <0> in package IGESDraw
41 //! This class differs from the ordinary subfigure definition
42 //! in that it defines a specialized subfigure, one whose
43 //! instances may participate in networks.
45 //! The Number of associated(child) Connect Point Entities
46 //! in the Network Subfigure Instance must match the number
47 //! in the Network Subfigure Definition, their order must
48 //! be identical, and any unused points of connection in
49 //! the instance must be indicated by a null(zero) pointer.
50 class IGESDraw_NetworkSubfigureDef : public IGESData_IGESEntity
56 Standard_EXPORT IGESDraw_NetworkSubfigureDef();
58 //! This method is used to set fields of the class
59 //! NetworkSubfigureDef
60 //! - aDepth : Depth of Subfigure
61 //! (indicating the amount of nesting)
62 //! - aName : Subfigure Name
63 //! - allEntities : Associated subfigures Entities exclusive
64 //! of primary reference designator and
66 //! - aTypeFlag : Type flag determines which Entity
67 //! belongs in which design
68 //! (Logical design or Physical design)
69 //! - aDesignator : Designator HAsciiString and its Template
70 //! - allPointEntities : Associated Connect Point Entities
71 Standard_EXPORT void Init (const Standard_Integer aDepth, const Handle(TCollection_HAsciiString)& aName, const Handle(IGESData_HArray1OfIGESEntity)& allEntities, const Standard_Integer aTypeFlag, const Handle(TCollection_HAsciiString)& aDesignator, const Handle(IGESGraph_TextDisplayTemplate)& aTemplate, const Handle(IGESDraw_HArray1OfConnectPoint)& allPointEntities);
73 //! returns Depth of Subfigure(indication the amount of nesting)
74 //! Note : The Depth is inclusive of both Network Subfigure Definition
75 //! Entity and the Ordinary Subfigure Definition Entity.
76 //! Thus, the two may be nested.
77 Standard_EXPORT Standard_Integer Depth() const;
79 //! returns the Subfigure Name
80 Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
82 //! returns Number of Associated(child) entries in subfigure exclusive
83 //! of primary reference designator and Control Points
84 Standard_EXPORT Standard_Integer NbEntities() const;
86 //! returns the Index'th IGESEntity in subfigure exclusive of primary
87 //! reference designator and Control Points
88 //! raises exception if Index <=0 or Index > NbEntities()
89 Standard_EXPORT Handle(IGESData_IGESEntity) Entity (const Standard_Integer Index) const;
91 //! return value = 0 : Not Specified
92 //! = 1 : Logical design
93 //! = 2 : Physical design
94 Standard_EXPORT Standard_Integer TypeFlag() const;
96 //! returns Primary Reference Designator
97 Standard_EXPORT Handle(TCollection_HAsciiString) Designator() const;
99 //! returns True if Text Display Template is specified for
100 //! primary designator else returns False
101 Standard_EXPORT Standard_Boolean HasDesignatorTemplate() const;
103 //! if Text Display Template specified then return TextDisplayTemplate
104 //! else return NULL Handle
105 Standard_EXPORT Handle(IGESGraph_TextDisplayTemplate) DesignatorTemplate() const;
107 //! returns the Number Of Associated(child) Connect Point Entities
108 Standard_EXPORT Standard_Integer NbPointEntities() const;
110 //! returns True is Index'th Associated Connect Point Entity is present
111 //! else returns False
112 //! raises exception if Index is out of bound
113 Standard_EXPORT Standard_Boolean HasPointEntity (const Standard_Integer Index) const;
115 //! returns the Index'th Associated Connect Point Entity
116 //! raises exception if Index <= 0 or Index > NbPointEntities()
117 Standard_EXPORT Handle(IGESDraw_ConnectPoint) PointEntity (const Standard_Integer Index) const;
122 DEFINE_STANDARD_RTTIEXT(IGESDraw_NetworkSubfigureDef,IGESData_IGESEntity)
132 Standard_Integer theDepth;
133 Handle(TCollection_HAsciiString) theName;
134 Handle(IGESData_HArray1OfIGESEntity) theEntities;
135 Standard_Integer theTypeFlag;
136 Handle(TCollection_HAsciiString) theDesignator;
137 Handle(IGESGraph_TextDisplayTemplate) theDesignatorTemplate;
138 Handle(IGESDraw_HArray1OfConnectPoint) thePointEntities;
149 #endif // _IGESDraw_NetworkSubfigureDef_HeaderFile