Guitar
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LineIndexMap Class Reference

#include <LineIndexMap.h>

Classes

struct  CountResult
 
struct  Leaf
 
struct  LogicalPosition
 
struct  Node
 
struct  UserData
 
class  ValueItem
 
struct  VisualPosition
 

Public Types

typedef uint32_t key_type
 
typedef ValueItem value_type
 

Public Member Functions

bool validate () const
 
void clear ()
 
std::optional< value_typefind (key_type lrow) const
 
uint64_t count (key_type lrow) const
 
void insert (key_type lrow, value_type item)
 
void update (key_type lrow, value_type value)
 
void erase (key_type lrow)
 
VisualPosition logical_to_visual (key_type lrow, uint32_t lcol) const
 
LogicalPosition visual_to_logical (uint64_t vrow) const
 
uint64_t total_logical_row_count () const
 
uint64_t total_visual_row_count () const
 

Private Member Functions

void ensure_tail ()
 
void recalc_node (Node *node)
 
void split_node (size_t ni)
 
void insert_into_leaf (size_t ni, size_t li, size_t offset, value_type item)
 
CountResult count_and_find (key_type lrow) const
 

Private Attributes

std::vector< Nodenodes_
 

Static Private Attributes

static constexpr size_t max_leaf_capacity = 256
 
static constexpr size_t max_node_fanout = 256
 

Member Typedef Documentation

◆ key_type

typedef uint32_t LineIndexMap::key_type

◆ value_type

Member Function Documentation

◆ clear()

void LineIndexMap::clear ( )
inline

◆ count()

uint64_t LineIndexMap::count ( key_type  lrow) const
inline
Here is the call graph for this function:

◆ count_and_find()

CountResult LineIndexMap::count_and_find ( key_type  lrow) const
inlineprivate

◆ ensure_tail()

void LineIndexMap::ensure_tail ( )
inlineprivate

◆ erase()

void LineIndexMap::erase ( key_type  lrow)
inline

◆ find()

std::optional<value_type> LineIndexMap::find ( key_type  lrow) const
inline

◆ insert()

void LineIndexMap::insert ( key_type  lrow,
value_type  item 
)
inline
Here is the call graph for this function:

◆ insert_into_leaf()

void LineIndexMap::insert_into_leaf ( size_t  ni,
size_t  li,
size_t  offset,
value_type  item 
)
inlineprivate
Here is the call graph for this function:

◆ logical_to_visual()

VisualPosition LineIndexMap::logical_to_visual ( key_type  lrow,
uint32_t  lcol 
) const
inline
Here is the call graph for this function:

◆ recalc_node()

void LineIndexMap::recalc_node ( Node node)
inlineprivate

◆ split_node()

void LineIndexMap::split_node ( size_t  ni)
inlineprivate
Here is the call graph for this function:

◆ total_logical_row_count()

uint64_t LineIndexMap::total_logical_row_count ( ) const
inline

◆ total_visual_row_count()

uint64_t LineIndexMap::total_visual_row_count ( ) const
inline

◆ update()

void LineIndexMap::update ( key_type  lrow,
value_type  value 
)
inline
Here is the call graph for this function:

◆ validate()

bool LineIndexMap::validate ( ) const
inline
Here is the call graph for this function:

◆ visual_to_logical()

LogicalPosition LineIndexMap::visual_to_logical ( uint64_t  vrow) const
inline
Here is the call graph for this function:

Member Data Documentation

◆ max_leaf_capacity

constexpr size_t LineIndexMap::max_leaf_capacity = 256
staticconstexprprivate

◆ max_node_fanout

constexpr size_t LineIndexMap::max_node_fanout = 256
staticconstexprprivate

◆ nodes_

std::vector<Node> LineIndexMap::nodes_
private

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