0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / Sweep / Sweep_NumShapeTool.hxx
1 // Created on: 1993-06-02
2 // Created by: Laurent BOURESCHE
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 _Sweep_NumShapeTool_HeaderFile
18 #define _Sweep_NumShapeTool_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Sweep_NumShape.hxx>
25 #include <Standard_Integer.hxx>
26 #include <TopAbs_ShapeEnum.hxx>
27 #include <TopAbs_Orientation.hxx>
28 #include <Standard_Boolean.hxx>
29 class Standard_OutOfRange;
30 class Sweep_NumShape;
31
32
33 //! This class provides  the indexation and  type analysis
34 //! services required by  the NumShape Directing Shapes of
35 //! Swept Primitives.
36 class Sweep_NumShapeTool 
37 {
38 public:
39
40   DEFINE_STANDARD_ALLOC
41
42   
43   //! Create a new NumShapeTool with <aShape>.  The Tool
44   //! must prepare an indexation  for  all the subshapes
45   //! of this shape.
46   Standard_EXPORT Sweep_NumShapeTool(const Sweep_NumShape& aShape);
47   
48   //! Returns the number of subshapes in the shape.
49   Standard_EXPORT Standard_Integer NbShapes() const;
50   
51   //! Returns the index of <aShape>.
52   Standard_EXPORT Standard_Integer Index (const Sweep_NumShape& aShape) const;
53   
54   //! Returns the Shape at index anIndex
55   Standard_EXPORT Sweep_NumShape Shape (const Standard_Integer anIndex) const;
56   
57   //! Returns the type of <aShape>.
58   Standard_EXPORT TopAbs_ShapeEnum Type (const Sweep_NumShape& aShape) const;
59   
60   //! Returns the orientation of <aShape>.
61   Standard_EXPORT TopAbs_Orientation Orientation (const Sweep_NumShape& aShape) const;
62   
63   //! Returns true if there is a First Vertex in the Shape.
64   Standard_EXPORT Standard_Boolean HasFirstVertex() const;
65   
66   //! Returns true if there is a Last Vertex in the Shape.
67   Standard_EXPORT Standard_Boolean HasLastVertex() const;
68   
69   //! Returns the first vertex.
70   Standard_EXPORT Sweep_NumShape FirstVertex() const;
71   
72   //! Returns the last vertex.
73   Standard_EXPORT Sweep_NumShape LastVertex() const;
74
75
76
77
78 protected:
79
80
81
82
83
84 private:
85
86
87
88   Sweep_NumShape myNumShape;
89
90
91 };
92
93
94
95
96
97
98
99 #endif // _Sweep_NumShapeTool_HeaderFile