Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IFSelect / IFSelect_SignType.cxx
CommitLineData
7fd59977 1#include <IFSelect_SignType.ixx>
2#include <Standard_Type.hxx>
3#include <Interface_Macros.hxx>
4
5static Standard_CString nulsign = "";
6
7
8 IFSelect_SignType::IFSelect_SignType (const Standard_Boolean nopk)
9 : IFSelect_Signature ((Standard_CString ) (nopk ? "Class Type" : "Dynamic Type") ) ,
10 thenopk (nopk)
11{}
12
13 Standard_CString IFSelect_SignType::Value
14 (const Handle(Standard_Transient)& ent,
15 const Handle(Interface_InterfaceModel)& model) const
16{
17 if (ent.IsNull()) return nulsign;
18 DeclareAndCast(Standard_Type,atype,ent);
19 if (atype.IsNull()) atype = ent->DynamicType();
20 Standard_CString tn = atype->Name();
21 if (!thenopk) return tn;
22 for (int i = 0; tn[i] != '\0'; i ++) {
23 if (tn[i] == '_') return &tn[i+1];
24 }
25 return tn;
26}