1 /****************************************************************************** 2 dbstree.C 3 4 Dynamic Binary Search Tree used throughout the entire project. 5 6 A dbsNode applied as a parent class to a specific class will provide 7 transparent storage in a dbstree. As a result no duplicates may be 8 stored and locating stored data is performed in less than 32 steps. 9 10 Check dbstree.tex for technical information on this tree. 11 12 *****************************************************************************/ 13 14 #include <stdio.h> 15 #include <assert.h> 16 #include <string.h> 17 #include "dbstree.h" 18 19 //*************************************************************** 20 // A tree of case sensitive strings -- char *Name 21 //*************************************************************** 22 23 char *dbsNodeStr::Query; 24 25 int dbsNodeStr::compare (dbsNodeStr *n) 26 { 27 return strcmp (Name, n->Name); 28 } 29 30 int dbsNodeStr::compare () 31 { 32 return strcmp (Name, Query); 33 } 34 35 dbsNodeStr::dbsNodeStr () 36 { 37 Name = Query; 38 } 39 40 dbsNodeStr::~dbsNodeStr () 41 { }