OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TPEF::ReferenceManager::HashFunctions Class Reference

#include <SafePointer.hh>

Collaboration diagram for TPEF::ReferenceManager::HashFunctions:
Collaboration graph

Public Member Functions

size_t operator() (const SectionIndexKey &key) const
 
size_t operator() (const SectionOffsetKey &key) const
 
size_t operator() (const FileOffsetKey &key) const
 
size_t operator() (const SectionKey &key) const
 
size_t operator() (const SafePointable *const &key) const
 

Detailed Description

Class containing all the hash functions if hash_map is used. However the use of hash_map will make program very slow unless MapTools::containsValue() is not optimised for hash_tables or that function should be circumvented.

Definition at line 111 of file SafePointer.hh.

Member Function Documentation

◆ operator()() [1/5]

size_t TPEF::ReferenceManager::HashFunctions::operator() ( const FileOffsetKey key) const
inline

Definition at line 127 of file SafePointer.hh.

127 {
128 return key.fileOffset();
129 }

References TPEF::ReferenceManager::FileOffsetKey::fileOffset().

Here is the call graph for this function:

◆ operator()() [2/5]

size_t TPEF::ReferenceManager::HashFunctions::operator() ( const SafePointable *const &  key) const
inline

Definition at line 135 of file SafePointer.hh.

135 {
136 return reinterpret_cast<size_t>(key);
137 }

◆ operator()() [3/5]

size_t TPEF::ReferenceManager::HashFunctions::operator() ( const SectionIndexKey key) const
inline

Definition at line 113 of file SafePointer.hh.

113 {
114 return key.index()^
115 (static_cast<size_t>(key.sectionId()) <<
116 ((sizeof(size_t) - sizeof(SectionId)) *
118 }
const Byte BYTE_BITWIDTH
Definition BaseType.hh:136
HalfWord SectionId
Type for storing binary file section ids.

References BYTE_BITWIDTH, TPEF::ReferenceManager::SectionIndexKey::index(), and TPEF::ReferenceManager::SectionIndexKey::sectionId().

Here is the call graph for this function:

◆ operator()() [4/5]

size_t TPEF::ReferenceManager::HashFunctions::operator() ( const SectionKey key) const
inline

Definition at line 131 of file SafePointer.hh.

131 {
132 return key.sectionId();
133 }

References TPEF::ReferenceManager::SectionKey::sectionId().

Here is the call graph for this function:

◆ operator()() [5/5]

size_t TPEF::ReferenceManager::HashFunctions::operator() ( const SectionOffsetKey key) const
inline

Definition at line 120 of file SafePointer.hh.

120 {
121 return key.offset()^
122 (static_cast<size_t>(key.sectionId()) <<
123 ((sizeof(size_t) - sizeof(SectionId)) *
125 }

References BYTE_BITWIDTH, TPEF::ReferenceManager::SectionOffsetKey::offset(), and TPEF::ReferenceManager::SectionOffsetKey::sectionId().

Here is the call graph for this function:

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