summaryrefslogtreecommitdiff
path: root/inc/MoniTool_Elem.gxx
blob: b156f5161844db28e288608486673420e837e058 (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
//#include <MoniTool_Elem.ixx>
#include <Standard_Integer.hxx>


    MoniTool_Elem::MoniTool_Elem (const TheKey& akey)
    : theval (akey)
{  SetHashCode ( TheHasher::HashCode (akey, IntegerLast() ) );  }


    const TheKey&  MoniTool_Elem::Value () const
      {  return theval;  }

    Standard_Boolean  MoniTool_Elem::Equates
  (const Handle(MoniTool_Element)& other) const
{
  if (other.IsNull()) return Standard_False;
  if (GetHashCode() != other->GetHashCode()) return Standard_False;
  if (other->DynamicType() != DynamicType()) return Standard_False;
  Handle(MoniTool_Elem) another = Handle(MoniTool_Elem)::DownCast(other);
//  return (theval == another->Value());
  return  TheHasher::IsEqual (theval,another->Value());
}

    Handle(Standard_Type)  MoniTool_Elem::ValueType () const
      {  return TheInfo::Type(theval);  }

    Standard_CString  MoniTool_Elem::ValueTypeName () const
      {  return TheInfo::TypeName(theval);  }