blob: 81ed67f6f5a928e355da342e3698d3d1338b1312 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include <IFSelect_SelectEntityNumber.ixx>
#include <Interface_InterfaceModel.hxx>
IFSelect_SelectEntityNumber::IFSelect_SelectEntityNumber () { }
void IFSelect_SelectEntityNumber::SetNumber
(const Handle(IFSelect_IntParam)& num)
{ thenum = num; }
Handle(IFSelect_IntParam) IFSelect_SelectEntityNumber::Number () const
{ return thenum; }
Interface_EntityIterator IFSelect_SelectEntityNumber::RootResult
(const Interface_Graph& G) const
{
Interface_EntityIterator iter;
Standard_Integer num = 0;
if (!thenum.IsNull()) num = thenum->Value();
if (num < 1) return iter; // vide si num < 1 ou num > NbEntities
if (num <= G.Size()) iter.GetOneItem(G.Entity(num));
return iter;
}
TCollection_AsciiString IFSelect_SelectEntityNumber::Label () const
{
Standard_Integer num = 0;
if (!thenum.IsNull()) num = thenum->Value();
TCollection_AsciiString labl(num);
labl.InsertBefore (1,"Entity Number ");
return labl;
}
|