42cf5bc1 |
1 | // Created on: 1992-11-18 |
2 | // Created by: Christian CAILLET |
3 | // Copyright (c) 1992-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 _IFSelect_SelectEntityNumber_HeaderFile |
18 | #define _IFSelect_SelectEntityNumber_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <IFSelect_SelectBase.hxx> |
24 | class IFSelect_IntParam; |
25 | class Interface_EntityIterator; |
26 | class Interface_Graph; |
27 | class TCollection_AsciiString; |
28 | |
29 | |
30 | class IFSelect_SelectEntityNumber; |
31 | DEFINE_STANDARD_HANDLE(IFSelect_SelectEntityNumber, IFSelect_SelectBase) |
32 | |
33 | //! A SelectEntityNumber gets in an InterfaceModel (through a |
34 | //! Graph), the Entity which has a specified Number (its rank of |
35 | //! adding into the Model) : there can be zero (if none) or one. |
36 | //! The Number is not directly defined as an Integer, but as a |
37 | //! Parameter, which can be externally controled |
38 | class IFSelect_SelectEntityNumber : public IFSelect_SelectBase |
39 | { |
40 | |
41 | public: |
42 | |
43 | |
44 | //! Creates a SelectEntityNumber, initially with no specified Number |
45 | Standard_EXPORT IFSelect_SelectEntityNumber(); |
46 | |
47 | //! Sets Entity Number to be taken (initially, none is set : 0) |
48 | Standard_EXPORT void SetNumber (const Handle(IFSelect_IntParam)& num); |
49 | |
50 | //! Returns specified Number (as a Parameter) |
51 | Standard_EXPORT Handle(IFSelect_IntParam) Number() const; |
52 | |
53 | //! Returns the list of selected entities : the Entity having the |
54 | //! specified Number (this result assures naturally uniqueness) |
79104795 |
55 | Standard_EXPORT Interface_EntityIterator RootResult (const Interface_Graph& G) const Standard_OVERRIDE; |
42cf5bc1 |
56 | |
57 | //! Returns a text defining the criterium : "Entity Number ..." |
79104795 |
58 | Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE; |
42cf5bc1 |
59 | |
60 | |
61 | |
62 | |
92efcf78 |
63 | DEFINE_STANDARD_RTTIEXT(IFSelect_SelectEntityNumber,IFSelect_SelectBase) |
42cf5bc1 |
64 | |
65 | protected: |
66 | |
67 | |
68 | |
69 | |
70 | private: |
71 | |
72 | |
73 | Handle(IFSelect_IntParam) thenum; |
74 | |
75 | |
76 | }; |
77 | |
78 | |
79 | |
80 | |
81 | |
82 | |
83 | |
84 | #endif // _IFSelect_SelectEntityNumber_HeaderFile |