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
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 _IFSelect_SelectEntityNumber_HeaderFile
18 #define _IFSelect_SelectEntityNumber_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <IFSelect_SelectBase.hxx>
24 class IFSelect_IntParam;
25 class Interface_EntityIterator;
26 class Interface_Graph;
27 class TCollection_AsciiString;
30 class IFSelect_SelectEntityNumber;
31 DEFINE_STANDARD_HANDLE(IFSelect_SelectEntityNumber, IFSelect_SelectBase)
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
44 //! Creates a SelectEntityNumber, initially with no specified Number
45 Standard_EXPORT IFSelect_SelectEntityNumber();
47 //! Sets Entity Number to be taken (initially, none is set : 0)
48 Standard_EXPORT void SetNumber (const Handle(IFSelect_IntParam)& num);
50 //! Returns specified Number (as a Parameter)
51 Standard_EXPORT Handle(IFSelect_IntParam) Number() const;
53 //! Returns the list of selected entities : the Entity having the
54 //! specified Number (this result assures naturally uniqueness)
55 Standard_EXPORT Interface_EntityIterator RootResult (const Interface_Graph& G) const;
57 //! Returns a text defining the criterium : "Entity Number ..."
58 Standard_EXPORT TCollection_AsciiString Label() const;
63 DEFINE_STANDARD_RTTI(IFSelect_SelectEntityNumber,IFSelect_SelectBase)
73 Handle(IFSelect_IntParam) thenum;
84 #endif // _IFSelect_SelectEntityNumber_HeaderFile