LLVM 23.0.0git
llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT > Class Template Reference

Template class to implement a pointer type into the trie data structure. More...

#include "llvm/CAS/OnDiskTrieRawHashMap.h"

Inheritance diagram for llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >:
[legend]

Public Member Functions

FileOffset getOffset () const
 operator bool () const
const ProxyT & operator* () const
const ProxyT * operator-> () const
 PointerImpl ()=default

Protected Member Functions

 PointerImpl (ProxyT Value, FileOffset Offset, bool IsValue=true)

Protected Attributes

ProxyT Value
uint32_t OffsetLow32 = 0
uint16_t OffsetHigh16 = 0
bool IsValue = false

Detailed Description

template<class ProxyT>
class llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >

Template class to implement a pointer type into the trie data structure.

It provides pointer-like operation, e.g., dereference to get underlying data. It also reserves the top 16 bits of the pointer value, which can be used to pack additional information if needed.

Definition at line 103 of file OnDiskTrieRawHashMap.h.

Constructor & Destructor Documentation

◆ PointerImpl() [1/2]

template<class ProxyT>
llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::PointerImpl ( )
default

◆ PointerImpl() [2/2]

template<class ProxyT>
llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::PointerImpl ( ProxyT Value,
FileOffset Offset,
bool IsValue = true )
inlineprotected

Member Function Documentation

◆ getOffset()

template<class ProxyT>
FileOffset llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::getOffset ( ) const
inline

Definition at line 105 of file OnDiskTrieRawHashMap.h.

References OffsetHigh16, and OffsetLow32.

◆ operator bool()

template<class ProxyT>
llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::operator bool ( ) const
inlineexplicit

Definition at line 109 of file OnDiskTrieRawHashMap.h.

References IsValue.

◆ operator*()

template<class ProxyT>
const ProxyT & llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::operator* ( ) const
inline

Definition at line 111 of file OnDiskTrieRawHashMap.h.

References assert(), IsValue, and Value.

◆ operator->()

template<class ProxyT>
const ProxyT * llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::operator-> ( ) const
inline

Definition at line 115 of file OnDiskTrieRawHashMap.h.

References assert(), IsValue, and Value.

Member Data Documentation

◆ IsValue

template<class ProxyT>
bool llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::IsValue = false
protected

Definition at line 136 of file OnDiskTrieRawHashMap.h.

Referenced by operator bool(), operator*(), operator->(), and PointerImpl().

◆ OffsetHigh16

template<class ProxyT>
uint16_t llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::OffsetHigh16 = 0
protected

Definition at line 132 of file OnDiskTrieRawHashMap.h.

Referenced by getOffset(), and PointerImpl().

◆ OffsetLow32

template<class ProxyT>
uint32_t llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::OffsetLow32 = 0
protected

Definition at line 131 of file OnDiskTrieRawHashMap.h.

Referenced by getOffset(), and PointerImpl().

◆ Value

template<class ProxyT>
ProxyT llvm::cas::OnDiskTrieRawHashMap::PointerImpl< ProxyT >::Value
protected

Definition at line 130 of file OnDiskTrieRawHashMap.h.

Referenced by operator*(), operator->(), and PointerImpl().


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