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
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 _IGESDraw_ConnectPoint_HeaderFile
18 #define _IGESDraw_ConnectPoint_HeaderFile
19 
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22 
23 #include <gp_XYZ.hxx>
24 #include <Standard_Integer.hxx>
25 #include <IGESData_IGESEntity.hxx>
26 #include <Standard_Boolean.hxx>
27 class TCollection_HAsciiString;
28 class IGESGraph_TextDisplayTemplate;
29 class gp_Pnt;
30 
31 
32 class IGESDraw_ConnectPoint;
33 DEFINE_STANDARD_HANDLE(IGESDraw_ConnectPoint, IGESData_IGESEntity)
34 
35 //! defines IGESConnectPoint, Type <132> Form Number <0>
36 //! in package IGESDraw
37 //!
38 //! Connect Point Entity describes a point of connection for
39 //! zero, one or more entities. Its referenced from Composite
40 //! curve, or Network Subfigure Definition/Instance, or Flow
41 //! Associative Instance, or it may stand alone.
42 class IGESDraw_ConnectPoint : public IGESData_IGESEntity
43 {
44 
45 public:
46 
47 
48   Standard_EXPORT IGESDraw_ConnectPoint();
49 
50   //! This method is used to set the fields of the class
51   //! ConnectPoint
52   //! - aPoint               : A Coordinate point
53   //! - aDisplaySymbol       : Display symbol Geometry
54   //! - aTypeFlag            : Type of the connection
55   //! - aFunctionFlag        : Function flag for the connection
56   //! - aFunctionIdentifier  : Connection Point Function Identifier
57   //! - anIdentifierTemplate : Connection Point Function Template
58   //! - aFunctionName        : Connection Point Function Name
59   //! - aFunctionTemplate    : Connection Point Function Template
60   //! - aPointIdentifier     : Unique Connect Point Identifier
61   //! - aFunctionCode        : Connect Point Function Code
62   //! - aSwapFlag            : Connect Point Swap Flag
63   //! - anOwnerSubfigure     : Pointer to the "Owner" Entity
64   Standard_EXPORT void Init (const gp_XYZ& aPoint, const Handle(IGESData_IGESEntity)& aDisplaySymbol, const Standard_Integer aTypeFlag, const Standard_Integer aFunctionFlag, const Handle(TCollection_HAsciiString)& aFunctionIdentifier, const Handle(IGESGraph_TextDisplayTemplate)& anIdentifierTemplate, const Handle(TCollection_HAsciiString)& aFunctionName, const Handle(IGESGraph_TextDisplayTemplate)& aFunctionTemplate, const Standard_Integer aPointIdentifier, const Standard_Integer aFunctionCode, const Standard_Integer aSwapFlag, const Handle(IGESData_IGESEntity)& anOwnerSubfigure);
65 
66   //! returns the coordinate of the connection point
67   Standard_EXPORT gp_Pnt Point() const;
68 
69   //! returns the Transformed coordinate of the connection point
70   Standard_EXPORT gp_Pnt TransformedPoint() const;
71 
72   //! returns True if Display symbol is specified
73   //! else returns False
74   Standard_EXPORT Standard_Boolean HasDisplaySymbol() const;
75 
76   //! if display symbol specified returns display symbol geometric entity
77   //! else returns NULL Handle
78   Standard_EXPORT Handle(IGESData_IGESEntity) DisplaySymbol() const;
79 
80   //! return value specifies a particular type of connection :
81   //! Type Flag = 0   : Not Specified(default)
82   //! 1   : Nonspecific logical  point of connection
83   //! 2   : Nonspecific physical point of connection
84   //! 101 : Logical component pin
85   //! 102 : Logical part connector
86   //! 103 : Logical offpage connector
87   //! 104 : Logical global signal connector
88   //! 201 : Physical PWA surface mount pin
89   //! 202 : Physical PWA blind pin
90   //! 203 : Physical PWA thru-pin
91   //! 5001-9999 : Implementor defined.
92   Standard_EXPORT Standard_Integer TypeFlag() const;
93 
94   //! returns Function Code that specifies a particular function for the
95   //! ECO576 connection :
96   //! e.g.,        Function Flag = 0 : Unspecified(default)
97   //! = 1 : Electrical Signal
98   //! = 2 : Fluid flow Signal
99   Standard_EXPORT Standard_Integer FunctionFlag() const;
100 
101   //! return HAsciiString identifying Pin Number or Nozzle Label etc.
102   Standard_EXPORT Handle(TCollection_HAsciiString) FunctionIdentifier() const;
103 
104   //! returns True if Text Display Template is specified for Identifier
105   //! else returns False
106   Standard_EXPORT Standard_Boolean HasIdentifierTemplate() const;
107 
108   //! if Text Display Template for the Function Identifier is defined,
109   //! returns TestDisplayTemplate
110   //! else returns NULL Handle
111   Standard_EXPORT Handle(IGESGraph_TextDisplayTemplate) IdentifierTemplate() const;
112 
113   //! returns Connection Point Function Name
114   Standard_EXPORT Handle(TCollection_HAsciiString) FunctionName() const;
115 
116   //! returns True if Text Display Template is specified for Function Name
117   //! else returns False
118   Standard_EXPORT Standard_Boolean HasFunctionTemplate() const;
119 
120   //! if Text Display Template for the Function Name is defined,
121   //! returns TestDisplayTemplate
122   //! else returns NULL Handle
123   Standard_EXPORT Handle(IGESGraph_TextDisplayTemplate) FunctionTemplate() const;
124 
125   //! returns the Unique Connect Point Identifier
126   Standard_EXPORT Standard_Integer PointIdentifier() const;
127 
128   //! returns the Connect Point Function Code
129   Standard_EXPORT Standard_Integer FunctionCode() const;
130 
131   //! return value = 0 : Connect point may be swapped(default)
132   //! = 1 : Connect point may not be swapped
133   Standard_EXPORT Standard_Boolean SwapFlag() const;
134 
135   //! returns True if Network Subfigure Instance/Definition Entity
136   //! is specified
137   //! else returns False
138   Standard_EXPORT Standard_Boolean HasOwnerSubfigure() const;
139 
140   //! returns "owner" Network Subfigure Instance Entity,
141   //! or Network Subfigure Definition Entity, or NULL Handle.
142   Standard_EXPORT Handle(IGESData_IGESEntity) OwnerSubfigure() const;
143 
144 
145 
146 
147   DEFINE_STANDARD_RTTIEXT(IGESDraw_ConnectPoint,IGESData_IGESEntity)
148 
149 protected:
150 
151 
152 
153 
154 private:
155 
156 
157   gp_XYZ thePoint;
158   Handle(IGESData_IGESEntity) theDisplaySymbol;
159   Standard_Integer theTypeFlag;
160   Standard_Integer theFunctionFlag;
161   Handle(TCollection_HAsciiString) theFunctionIdentifier;
162   Handle(IGESGraph_TextDisplayTemplate) theIdentifierTemplate;
163   Handle(TCollection_HAsciiString) theFunctionName;
164   Handle(IGESGraph_TextDisplayTemplate) theFunctionTemplate;
165   Standard_Integer thePointIdentifier;
166   Standard_Integer theFunctionCode;
167   Standard_Boolean theSwapFlag;
168   Handle(IGESData_IGESEntity) theOwnerSubfigure;
169 
170 
171 };
172 
173 
174 
175 
176 
177 
178 
179 #endif // _IGESDraw_ConnectPoint_HeaderFile
180