STLdoc
STLdocumentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag > Class Template Reference

Public Types

typedef hash_map_traits< _Key_t, _Mapped_t, _Mflag > _Mytype_t
 
typedef _Key_t key_type
 
typedef _Mapped_t mapped_type
 
typedef _STLCLR GenericPair< _Key_t, _Mapped_t > value_type
 
typedef _STLCLR BinaryDelegate< key_type, key_type, boolkey_compare
 
typedef _STLCLR BinaryDelegate< value_type, value_type, boolvalue_compare
 
typedef _STLCLR UnaryDelegate< key_type, inthasher
 
typedef _Key_t generic_key
 
typedef _Mapped_t generic_mapped
 

Public Member Functions

 hash_map_traits ()
 
 hash_map_traits (key_compare^_Pred)
 
 hash_map_traits (key_compare^_Pred, hasher^_Hashfn)
 
key_compare key_comp ()
 
value_compare value_comp ()
 
hasher hash_delegate ()
 
int get_hash (key_type _Key)
 

Static Public Member Functions

static key_type get_key (value_type%_Val)
 
static mapped_type get_mapped (value_type%_Val)
 
static int _Hasher (key_type _Key)
 

Public Attributes

_STLCLR_FIELD_ACCESS __pad0__: bool _Value_compare(value_type _Left
 
_STLCLR_FIELD_ACCESS value_type _Right
 
key_compare comp
 
hasher hash_fun
 
bool _Multi
 

Member Typedef Documentation

template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef hash_map_traits<_Key_t, _Mapped_t, _Mflag> cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::_Mytype_t
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef _Key_t cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::generic_key
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef _Mapped_t cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::generic_mapped
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef _STLCLR UnaryDelegate<key_type, int> cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::hasher
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef _STLCLR BinaryDelegate<key_type, key_type, bool> cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::key_compare
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef _Key_t cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::key_type
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef _Mapped_t cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::mapped_type
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef _STLCLR BinaryDelegate<value_type, value_type, bool> cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::value_compare
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
typedef _STLCLR GenericPair<_Key_t, _Mapped_t> cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::value_type

Constructor & Destructor Documentation

template<typename _Key_t, typename _Mapped_t, bool _Mflag>
cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::hash_map_traits ( )
inline
34  hash_fun(gcnew hasher(&_Hasher)),
35  _Multi(_Mflag)
36  { // construct with default comparator and hash function
37  }
key_compare comp
Definition: hash_map:101
static int _Hasher(key_type _Key)
Definition: hash_map:95
_STLCLR UnaryDelegate< key_type, int > hasher
Definition: hash_map:27
bool _Hash_key_compare(_Key_t _Left, _Key_t _Right)
Definition: xhash:12
hasher hash_fun
Definition: hash_map:102
_STLCLR BinaryDelegate< key_type, key_type, bool > key_compare
Definition: hash_map:24
bool _Multi
Definition: hash_map:103
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::hash_map_traits ( key_compare _Pred)
inline
40  : comp(_Pred),
41  hash_fun(gcnew hasher(&_Hasher)),
42  _Multi(_Mflag)
43  { // construct with specified comparator and default hash function
44  }
key_compare comp
Definition: hash_map:101
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
static int _Hasher(key_type _Key)
Definition: hash_map:95
_STLCLR UnaryDelegate< key_type, int > hasher
Definition: hash_map:27
hasher hash_fun
Definition: hash_map:102
bool _Multi
Definition: hash_map:103
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::hash_map_traits ( key_compare _Pred,
hasher _Hashfn 
)
inline
47  : comp(_Pred), hash_fun(_Hashfn),
48  _Multi(_Mflag)
49  { // construct with specified comparator and default hash function
50  }
key_compare comp
Definition: hash_map:101
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
hasher hash_fun
Definition: hash_map:102
bool _Multi
Definition: hash_map:103

Member Function Documentation

template<typename _Key_t, typename _Mapped_t, bool _Mflag>
static int cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::_Hasher ( key_type  _Key)
inlinestatic
96  { // hash _Key to int value using template function hash_value
97  return (hash_value(_Key));
98  }
int hash_value(System::Object^_Key)
Definition: xhash:25
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
int cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::get_hash ( key_type  _Key)
inline
68  { // rehash hashed _Key to int value by pseudorandomizing transform
69  int _Hashval = hash_fun(_Key);
70  int _Quot = _Hashval / 127773;
71  int _Rem = _Hashval % 127773;
72 
73  _Rem = 16807 * _Rem - 2836 * _Quot;
74  if (_Rem < 0)
75  _Rem += 2147483647;
76  return (_Rem);
77  }
hasher hash_fun
Definition: hash_map:102
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
static key_type cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::get_key ( value_type _Val)
inlinestatic
80  { // extract key from element value
81  return (_Val->first);
82  }
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
static mapped_type cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::get_mapped ( value_type _Val)
inlinestatic
85  { // extract mapped from element value
86  return (_Val->second);
87  }
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
hasher cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::hash_delegate ( )
inline
63  { // return object for hashing key
64  return (gcnew hasher(this, &hash_map_traits::get_hash));
65  }
_STLCLR UnaryDelegate< key_type, int > hasher
Definition: hash_map:27
int get_hash(key_type _Key)
Definition: hash_map:67
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
key_compare cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::key_comp ( )
inline
53  { // return object for comparing keys
54  return (comp);
55  }
key_compare comp
Definition: hash_map:101
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
value_compare cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::value_comp ( )
inline
58  { // return object for comparing values
59  return (gcnew value_compare(this, &_Mytype_t::_Value_compare));
60  }
_STLCLR BinaryDelegate< value_type, value_type, bool > value_compare
Definition: hash_map:26

Member Data Documentation

template<typename _Key_t, typename _Mapped_t, bool _Mflag>
_STLCLR_FIELD_ACCESS cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::__pad0__
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
bool cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::_Multi
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
_STLCLR_FIELD_ACCESS value_type cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::_Right
Initial value:
{
return (comp(_Left->first, _Right->first))
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
key_compare cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::comp
template<typename _Key_t, typename _Mapped_t, bool _Mflag>
hasher cliext::impl::hash_map_traits< _Key_t, _Mapped_t, _Mflag >::hash_fun

The documentation for this class was generated from the following file: