⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tableb.h

📁 Data Abstraction & Problem Solving with C++源码
💻 H
字号:
// ********************************************************// Header file TableB.h for the ADT table.// Binary search tree implementation.// Assumption: A table contains at most one item with a //             given search key at any time.// ********************************************************#include "BST.h"  // binary search tree operations#include "TableException.h"typedef TreeItemType TableItemType;class Table{public:   Table();  // default constructor   // copy constructor and destructor are   // supplied by the compiler// Table operations:   virtual bool tableIsEmpty() const;   virtual int tableLength() const;   virtual void tableInsert(const TableItemType& newItem);   virtual void tableDelete(KeyType searchKey)                            throw(TableException);   virtual void tableRetrieve(KeyType searchKey,                            TableItemType& tableItem) const                            throw(TableException);   virtual void traverseTable(FunctionType visit);protected: void setSize(int newSize);private:   BinarySearchTree bst; // binary search tree that contains                         // the table誷 items   int           size;   // number of items in the table};  // end Table class// End of header file.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -