pstore2
Public Member Functions | List of all members
pstore::index::details::index_pointer Union Reference

An index pointer is either a database address or a pointer to volatile RAM. More...

#include <hamt_map_types.hpp>

Public Member Functions

constexpr index_pointer (address const a) noexcept
 
constexpr index_pointer (typed_address< internal_node > const a) noexcept
 
constexpr index_pointer (typed_address< linear_node > const a) noexcept
 
 index_pointer (internal_node *const p) noexcept
 
 index_pointer (linear_node *const p) noexcept
 
 index_pointer (index_pointer const &) noexcept=default
 
 index_pointer (index_pointer &&) noexcept=default
 
index_pointeroperator= (index_pointer const &)=default
 
index_pointeroperator= (index_pointer &&) noexcept=default
 
index_pointeroperator= (address const &a) noexcept
 
index_pointeroperator= (typed_address< internal_node > const &a) noexcept
 
index_pointeroperator= (typed_address< linear_node > const &a) noexcept
 
index_pointeroperator= (internal_node *const p) noexcept
 
index_pointeroperator= (linear_node *const l) noexcept
 
constexpr bool operator== (index_pointer const &other) const noexcept
 
constexpr bool operator!= (index_pointer const &other) const noexcept
 
constexpr operator bool () const noexcept
 
void clear () noexcept
 
bool is_internal () const noexcept
 Returns true if the index_pointer is pointing to an internal node, false otherwise. More...
 
bool is_linear () const noexcept
 Returns true if the index_pointer is pointing to a linear node, false otherwise. More...
 
bool is_leaf () const noexcept
 Returns true if the index_pointer contains the address of a value in the store, false otherwise. More...
 
bool is_heap () const noexcept
 Returns true if the index_pointer is pointing to a heap node, false otherwise. More...
 
bool is_address () const noexcept
 Returns true if the index_pointer is pointing to a store node, false otherwise. More...
 
constexpr bool is_empty () const noexcept
 Returns true if the pointer is equivalent to "null".
 
address to_address () const noexcept
 
template<typename T , typename = typename std::enable_if_t< is_any_of<T, internal_node, linear_node>::value>>
typed_address< T > untag_address () const noexcept
 
template<typename Ptr , typename = typename std::enable_if_t<is_any_of< typename std::pointer_traits<Ptr>::element_type, internal_node, linear_node>::value>>
Ptr untag () const noexcept
 

Detailed Description

An index pointer is either a database address or a pointer to volatile RAM.

The type information (whether the record points to either an internal or linear node) is carried externally.

Member Function Documentation

◆ is_address()

bool pstore::index::details::index_pointer::is_address ( ) const
inlinenoexcept

Returns true if the index_pointer is pointing to a store node, false otherwise.

See also
is_heap

◆ is_heap()

bool pstore::index::details::index_pointer::is_heap ( ) const
inlinenoexcept

Returns true if the index_pointer is pointing to a heap node, false otherwise.

See also
is_address

◆ is_internal()

bool pstore::index::details::index_pointer::is_internal ( ) const
inlinenoexcept

Returns true if the index_pointer is pointing to an internal node, false otherwise.

See also
is_leaf

◆ is_leaf()

bool pstore::index::details::index_pointer::is_leaf ( ) const
inlinenoexcept

Returns true if the index_pointer contains the address of a value in the store, false otherwise.

See also
is_internal

◆ is_linear()

bool pstore::index::details::index_pointer::is_linear ( ) const
inlinenoexcept

Returns true if the index_pointer is pointing to a linear node, false otherwise.

See also
is_leaf
Note
A linear node is always found at max_internal_depth. This function will return true for internal nodes at lower tree levels.

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