Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IFSelect / IFSelect_SignCategory.cxx
CommitLineData
7fd59977 1#include <IFSelect_SignCategory.ixx>
2#include <Interface_Category.hxx>
3
4
5static Standard_CString nulsign = "";
6
7
8 IFSelect_SignCategory::IFSelect_SignCategory ()
9 : IFSelect_Signature ("Category")
10{
11 Interface_Category::Init(); // si pas deja fait
12 Standard_Integer i, nb = Interface_Category::NbCategories();
13 for (i = 1; i <= nb; i ++) AddCase (Interface_Category::Name(i));
14}
15
16
17 Standard_CString IFSelect_SignCategory::Value
18 (const Handle(Standard_Transient)& ent,
19 const Handle(Interface_InterfaceModel)& model) const
20{
21 if (ent.IsNull() || model.IsNull()) return nulsign;
22 return Interface_Category::Name(model->CategoryNumber (model->Number(ent)));
23}