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


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


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

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

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

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