xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
Xale::DataStructure::BPlusTree< TKey, TValue > Class Template Reference

BPlus Tree implementation. More...

#include <BPlusTree.h>

Collaboration diagram for Xale::DataStructure::BPlusTree< TKey, TValue >:
Collaboration graph

Public Member Functions

 BPlusTree (int maxKeys)
 Constructor.
bool insert (TKey key, TValue *value)
 Insert a key-value pair into the B+ Tree.
bool remove (TKey key)
 Remove a key from the B+ Tree.
TValue * search (TKey key)
 Search for a key in the B+ Tree.

Detailed Description

template<typename TKey, typename TValue>
class Xale::DataStructure::BPlusTree< TKey, TValue >

BPlus Tree implementation.

Constructor & Destructor Documentation

◆ BPlusTree()

template<typename TKey, typename TValue>
Xale::DataStructure::BPlusTree< TKey, TValue >::BPlusTree ( int maxKeys)

Constructor.

Parameters
maxKeysMaximum number of keys per node (order of the tree)

Member Function Documentation

◆ insert()

template<typename TKey, typename TValue>
bool Xale::DataStructure::BPlusTree< TKey, TValue >::insert ( TKey key,
TValue * value )

Insert a key-value pair into the B+ Tree.

Parameters
keyKey to insert
valuePointer to the value to insert
Returns
True if insertion is successful, false otherwise

◆ remove()

template<typename TKey, typename TValue>
bool Xale::DataStructure::BPlusTree< TKey, TValue >::remove ( TKey key)

Remove a key from the B+ Tree.

Parameters
keyKey to remove
Returns
True if removal is successful, false if key not found

◆ search()

template<typename TKey, typename TValue>
TValue * Xale::DataStructure::BPlusTree< TKey, TValue >::search ( TKey key)

Search for a key in the B+ Tree.

Parameters
keyKey to search for
Returns
Pointer to the value if found, nullptr if not found

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