HashMapEntryBase< K, V, ENTRY, ENTRY_HANDLER, LAYOUT > Class Template Reference Data Structures

#include <hashmap.h>

详细描述

template<typename K, typename V, typename ENTRY, typename ENTRY_HANDLER, HASHMAP_ENTRY_LAYOUT LAYOUT = ENTRY_HANDLER::LAYOUT>
class maxon::HashMapEntryBase< K, V, ENTRY, ENTRY_HANDLER, LAYOUT >

Base class for HashMap::Entry .

Public Types

using  EntryHandler = ENTRY_HANDLER

公共成员函数

V &  GetValue ()
const V &  GetValue () const
V &  GetSecond ()
const V &  GetSecond () const
void  SetValue (const V &value)
void  SetValue (V &&value)
void  ResetValue ()
HashInt   GetHashCode () const
Int   GetMemorySize () const
  HashMapEntryBase ( UInt hash)
template<typename KEY >
  HashMapEntryBase ( UInt hash, const KEY &)
template<typename KEY , typename A >
  HashMapEntryBase ( UInt hash, const KEY &, A &&value)

Public Attributes

decltype(ENTRY_HANDLER::GetKey(*(V *) nullptr)  GetKey )() const
decltype(ENTRY_HANDLER::GetKey(*(V *) nullptr)  GetFirst )() const

Protected Member Functions

  MAXON_DISALLOW_COPY_AND_ASSIGN ( HashMapEntryBase )

Protected Attributes

ENTRY *  _next
UInt   _hashCode
_value

Member Typedef Documentation

◆  EntryHandler

using EntryHandler = ENTRY_HANDLER

构造函数 & 析构函数文档编制

◆  HashMapEntryBase() [1/3]

HashMapEntryBase ( UInt   hash )
explicit

◆  HashMapEntryBase() [2/3]

HashMapEntryBase ( UInt   hash ,
const KEY &   
)

◆  HashMapEntryBase() [3/3]

HashMapEntryBase ( UInt   hash ,
const KEY &  ,
A &&  value  
)

成员函数文档编制

◆  GetValue() [1/2]

V& GetValue ( )

Returns this entry's value.

返回
Value of this entry.

◆  GetValue() [2/2]

const V& GetValue ( ) const

Returns this entry's value.

返回
Value of this entry.

◆  GetSecond() [1/2]

V& GetSecond ( )

Returns this entry's value.

返回
Value of this entry.

◆  GetSecond() [2/2]

const V& GetSecond ( ) const

Returns this entry's value.

返回
Value of this entry.

◆  SetValue() [1/2]

void SetValue ( const V &  value )

Sets the value of this entry by copy assignment.

参数
[in] value New value.

◆  SetValue() [2/2]

void SetValue ( V &&  value )

Sets the value of this entry by move assignment.

参数
[in] value New value.

◆  ResetValue()

void ResetValue ( )

◆  GetHashCode()

HashInt GetHashCode ( ) const

◆  GetMemorySize()

Int GetMemorySize ( ) const

◆  MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( HashMapEntryBase < K, V, ENTRY, ENTRY_HANDLER, LAYOUT >  )
protected

Member Data Documentation

◆  GetKey

decltype(ENTRY_HANDLER::GetKey(*(V*) nullptr) GetKey() const

Returns this entry's key.

返回
Key of this entry.

◆  GetFirst

decltype(ENTRY_HANDLER::GetKey(*(V*) nullptr) GetFirst() const

Returns this entry's key.

返回
Key of this entry.

◆  _next

ENTRY* _next protected

◆  _hashCode

UInt _hashCode
protected

◆  _value

V _value protected