Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

BTree Class Template Reference

#include <BTree.h>

List of all members.

Public Methods

 BTree (int order=6)
 Constructs a BTree with "order" keys and values in each node.

 BTree (const BTree &)
BTree& operator= (const BTree &)
 Copy constractor not emplemented yet.

 ~BTree ()
bool remove (const Key &key)
void insert (const Key &key, const Value &value)
Value* search (const Key &key)
void printAll ()

Protected Methods

virtual void theKeyIsFound (BTreePage< Key, Value > &keyPage, int position)
bool search (const Key &key, const BTreePage< Key, Value > &searchPage, BTreePage< Key, Value > **keyPage, int &position)
void deleteKey (BTreePage< Key, Value > *page, int position)
void deleteAll ()
void deleteAllPages (BTreePage< Key, Value > *page)

Private Attributes

int theOrder
BTreePage<Key,Value>* root

Friends

class  BTreeIterator< Key, Value >
ostream& operator<< (ostream &ostr, const BTree &T)
ostream& operator< (ostream &ostr, const BTree &T)
istream& operator> (istream &ostr, const BTree &T)
bool operator== (const BTree &T, const BTree &T1)

template<class Key, class Value> class BTree


Constructor & Destructor Documentation

template<class Key, class Value>
BTree<Key, Value>::BTree<Key, Value> ( int order = 6 ) [inline]
 

Constructs a BTree with "order" keys and values in each node.

Definition at line 125 of file BTree.h.

template<class Key, class Value>
BTree<Key, Value>::BTree<Key, Value> ( const BTree<Key, Value> & )
 

template<class Key, class Value>
BTree<Key, Value>::~BTree<Key, Value> ( ) [inline]
 

Definition at line 143 of file BTree.h.


Member Function Documentation

template<class Key, class Value>
BTree<Key, Value> & BTree<Key, Value>::operator= ( const BTree<Key, Value> & ) [inline]
 

Copy constractor not emplemented yet.

Definition at line 138 of file BTree.h.

template<class Key, class Value>
bool BTree<Key, Value>::remove ( const Key & key )
 

template<class Key, class Value>
void BTree<Key, Value>::insert ( const Key & key,
const Value & value )
 

template<class Key, class Value>
Value* BTree<Key, Value>::search ( const Key & key )
 

template<class Key, class Value>
void BTree<Key, Value>::printAll ( )
 

template<class Key, class Value>
void BTree<Key, Value>::theKeyIsFound ( BTreePage< Key, Value > & keyPage,
int position ) [inline, protected, virtual]
 

Definition at line 197 of file BTree.h.

template<class Key, class Value>
bool BTree<Key, Value>::search ( const Key & key,
const BTreePage< Key, Value > & searchPage,
BTreePage< Key, Value > ** keyPage,
int & position ) [protected]
 

template<class Key, class Value>
void BTree<Key, Value>::deleteKey ( BTreePage< Key, Value > * page,
int position ) [protected]
 

template<class Key, class Value>
void BTree<Key, Value>::deleteAll ( ) [inline, protected]
 

Definition at line 204 of file BTree.h.

Referenced by ~BTree().

template<class Key, class Value>
void BTree<Key, Value>::deleteAllPages ( BTreePage< Key, Value > * page ) [protected]
 

Referenced by deleteAll().


Friends And Related Function Documentation

template<class Key, class Value>
friend class BTreeIterator< Key, Value > [friend]
 

Definition at line 114 of file BTree.h.

template<class Key, class Value>
ostream & operator<< ( ostream & ostr,
const BTree<Key, Value> & T ) [friend]
 

Definition at line 170 of file BTree.h.

template<class Key, class Value>
ostream & operator< ( ostream & ostr,
const BTree<Key, Value> & T ) [friend]
 

Definition at line 175 of file BTree.h.

template<class Key, class Value>
istream & operator> ( istream & ostr,
const BTree<Key, Value> & T ) [friend]
 

Definition at line 179 of file BTree.h.

template<class Key, class Value>
bool operator== ( const BTree<Key, Value> & T,
const BTree<Key, Value> & T1 ) [friend]
 

Definition at line 183 of file BTree.h.


Member Data Documentation

template<class Key, class Value>
int BTree<Key, Value>::theOrder [private]
 

Definition at line 218 of file BTree.h.

template<class Key, class Value>
BTreePage<Key,Value>* BTree<Key, Value>::root [private]
 

Definition at line 219 of file BTree.h.


The documentation for this class was generated from the following file:
Generated at Tue Jun 19 09:49:48 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001