c11p610.txt

来自「Data Abstraction & Problem Solving with 」· 文本 代码 · 共 42 行

TXT
42
字号
// ********************************************************// Excerpts from the implementation file TableB.cpp. // Binary search tree implementation.// ********************************************************#include "TableB.h"  // header filevoid Table::tableInsert(const TableItemType& newItem){      bst.searchTreeInsert(newItem);      ++size;}  // end tableInsertvoid Table::tableDelete(KeyType searchKey)            throw(TableException){   try   {  bst.searchTreeDelete(searchKey);   }  // end try   catch (TreeException e)   {  throw TableException("TableException: Item not found on delete");   }  // end catch}  // end tableDeletevoid Table::tableRetrieve(KeyType searchKey,                           TableItemType& tableItem) const                          throw(TableException){   try   {  bst.searchTreeRetrieve(searchKey, tableItem);   }  // end try   catch (TreeException e)   {  throw TableException("TableException: Item not found on retrieve");   }  // end catch}  // end tableRetrievevoid Table::traverseTable(FunctionType visit){   bst.inorderTraverse(visit);}  // end traverseTable// End of implementation file.

⌨️ 快捷键说明

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