summaryrefslogtreecommitdiff
path: root/inc/IFSelect_SelectList.gxx
blob: 27e7622d83396dfe92935fd0b185a786ab0f8224 (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
//#include <IFSelect_SelectList.ixx>

// ....    Instanciation avec "Handle(Entity)" qui offre ces deux methodes :
//   nb = ent->NbEntities()   et   ent_i = ent->InterfaceEntity(i)


    IFSelect_SelectList::IFSelect_SelectList ()  {  }

    void IFSelect_SelectType::KeepInputEntity (Interface_EntityIterator& iter)
      {  iter.SelectType(STANDARD_TYPE(Entity));  }

    Standard_Integer IFSelect_SelectList::NbItems
  (const Handle(Standard_Transient)& ent)
{
  Handle(Entity) anent = Handle(Entity)::DownCast(ent);
  if (anent.IsNull()) return 0;
  return anent->NbEntities();
}

    Handle(Standard_Transient) IFSelect_SelectList::ListedEntity
  (const Standard_Integer num, const Handle(Standard_Transient)& ent)
{
  Handle(Entity) anent = Handle(Entity)::DownCast(ent);
  if (anent.IsNull()) Standard_OutOfRange::Raise
    ("IFSelect SelectType : ListedEntity");
  return anent->InterfacebEntity(num);
}


    TCollection_AsciiString  IFSelect_SelectList::ListLabel () const 
      {  return TCollection_AsciiString(STANDARD_TYPE(Entity)->Name());  }