0032743: Coding Rules - remove unused class friends of Package classes
[occt.git] / src / GccEnt / GccEnt.hxx
1 // Created on: 1991-03-05
2 // Created by: Remy GILET
3 // Copyright (c) 1991-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 _GccEnt_HeaderFile
18 #define _GccEnt_HeaderFile
19
20 #include <GccEnt_Position.hxx>
21 #include <Standard.hxx>
22 #include <Standard_DefineAlloc.hxx>
23 #include <Standard_Handle.hxx>
24 #include <Standard_OStream.hxx>
25
26 class GccEnt_QualifiedLin;
27 class gp_Lin2d;
28 class GccEnt_QualifiedCirc;
29 class gp_Circ2d;
30
31
32 //! This package provides an implementation of the qualified
33 //! entities useful to create 2d entities with geometric
34 //! constraints. The qualifier explains which subfamily of
35 //! solutions we want to obtain. It uses the following law: the
36 //! matter/the interior side is at the left of the line, if we go
37 //! from the beginning to the end.
38 //! The qualifiers are:
39 //! Enclosing   : the solution(s) must enclose the argument.
40 //! Enclosed    : the solution(s) must be enclosed in the
41 //! argument.
42 //! Outside     : both the solution(s) and the argument must be
43 //! outside to each other.
44 //! Unqualified : the position is undefined, so give all the
45 //! solutions.
46 //! The use of a qualifier is always required if such
47 //! subfamilies exist. For example, it is not used for a point.
48 //! Note:    the interior of a curve is defined as the left-hand
49 //! side of the curve in relation to its orientation.
50 class GccEnt 
51 {
52 public:
53
54   DEFINE_STANDARD_ALLOC
55
56
57   //! Prints the name of Position type as a String on the Stream.
58   static Standard_OStream& Print (const GccEnt_Position thePosition, Standard_OStream& theStream)
59   {
60     return (theStream << PositionToString (thePosition));
61   }
62
63   //! Returns the string name for a given position.
64   //! @param thePosition position type
65   //! @return string identifier from the list UNQUALIFIED ENCLOSING ENCLOSED OUTSIDE NOQUALIFIER
66   Standard_EXPORT static Standard_CString PositionToString (GccEnt_Position thePosition);
67
68   //! Returns the position from the given string identifier (using case-insensitive comparison).
69   //! @param thePositionString string identifier
70   //! @return position or GccEnt_unqualified if string identifier is invalid
71   static GccEnt_Position PositionFromString (Standard_CString thePositionString)
72   {
73     GccEnt_Position aPosition = GccEnt_unqualified;
74     PositionFromString (thePositionString, aPosition);
75     return aPosition;
76   }
77
78   //! Determines the position from the given string identifier (using case-insensitive comparison).
79   //! @param thePositionString string identifier
80   //! @param thePosition detected shape type
81   //! @return TRUE if string identifier is known
82   Standard_EXPORT static Standard_Boolean PositionFromString (Standard_CString thePositionString,
83                                                               GccEnt_Position& thePosition);
84   
85   //! Constructs a qualified line,
86   //! so that the relative position to the circle or line of the
87   //! solution computed by a construction algorithm using the
88   //! qualified circle or line is not qualified, i.e. all solutions apply.
89   Standard_EXPORT static GccEnt_QualifiedLin Unqualified (const gp_Lin2d& Obj);
90   
91   //! Constructs a qualified circle
92   //! so that the relative position to the circle or line of the
93   //! solution computed by a construction algorithm using the
94   //! qualified circle or line is not qualified, i.e. all solutions apply.
95   Standard_EXPORT static GccEnt_QualifiedCirc Unqualified (const gp_Circ2d& Obj);
96   
97
98   //! Constructs such a qualified circle that the solution
99   //! computed by a construction algorithm using the qualified
100   //! circle encloses the circle.
101   Standard_EXPORT static GccEnt_QualifiedCirc Enclosing (const gp_Circ2d& Obj);
102   
103   //! Constructs a qualified line,
104   //! so that the solution computed by a construction
105   //! algorithm using the qualified circle or line is enclosed by
106   //! the circle or line.
107   Standard_EXPORT static GccEnt_QualifiedLin Enclosed (const gp_Lin2d& Obj);
108   
109   //! Constructs a qualified circle
110   //! so that the solution computed by a construction
111   //! algorithm using the qualified circle or line is enclosed by
112   //! the circle or line.
113   Standard_EXPORT static GccEnt_QualifiedCirc Enclosed (const gp_Circ2d& Obj);
114   
115   //! Constructs a qualified line,
116   //! so that the solution computed by a construction
117   //! algorithm using the qualified circle or line and the circle
118   //! or line are external to one another.
119   Standard_EXPORT static GccEnt_QualifiedLin Outside (const gp_Lin2d& Obj);
120   
121   //! Constructs a qualified circle
122   //! so that the solution computed by a construction
123   //! algorithm using the qualified circle or line and the circle
124   //! or line are external to one another.
125   Standard_EXPORT static GccEnt_QualifiedCirc Outside (const gp_Circ2d& Obj);
126
127 };
128
129 #endif // _GccEnt_HeaderFile