#include <BinNode.hpp>
Public Methods | |
BinNode () | |
BinNode (DBase *e) | |
BinNode (DBase *e, BinNode *l) | |
BinNode (DBase *e, BinNode *l, BinNode *r) | |
virtual | ~BinNode () |
BinNode * | leftchild () const |
BinNode * | rightchild () const |
DBase & | value () |
int | CompareID (String &ID) const |
int | CompareID (DBase &db) const |
void | setValue (DBase &val) |
bool | isLeaf () const |
bool | valid () const |
DBase * | getElem () |
void * | operator new (size_t) |
void | operator delete (void *) |
void | display () const |
Public Attributes | |
BinNode * | left |
BinNode * | right |
Static Public Attributes | |
BinNode * | freelist = NULL |
Private Attributes | |
DBase * | element |
Friends | |
ostream & | operator<< (ostream &os, BinNode *node) |
|
Definition at line 8 of file BinNode.cpp. 00009 : element ( NULL ), 00010 left ( NULL ), 00011 right ( NULL ) { } |
|
Definition at line 14 of file BinNode.cpp. 00015 : element ( e ), 00016 left ( NULL ), 00017 right ( NULL ) { } |
|
Definition at line 19 of file BinNode.cpp. 00020 : element ( e ), 00021 left ( l ), 00022 right ( NULL ) { } |
|
Definition at line 25 of file BinNode.cpp. |
|
Definition at line 30 of file BinNode.cpp. 00030 { } |
|
Definition at line 57 of file BinNode.cpp. |
|
Definition at line 32 of file BinNode.cpp. Referenced by BinSearchTree::find(), and BinSearchTree::findID().
00033 { 00034 if ( this == NULL ) 00035 { 00036 cout << "The Node is NULL" << endl; 00037 return 1000; 00038 } 00039 00040 if ( element != NULL ) 00041 { 00042 if ( element->_id != NULL ) 00043 { 00044 return -1 *( element->_id->compare( ID ) ); 00045 } 00046 else 00047 { 00048 return -50; 00049 } 00050 } 00051 else 00052 { 00053 return -100; 00054 } 00055 } |
|
Definition at line 46 of file BinNode.hpp. 00047 { // on the Screen. 00048 cout << element->string() << endl; 00049 } |
|
Definition at line 89 of file BinNode.cpp. Referenced by BinSearchTree::find(), and BinSearchTree::findID().
00090 { 00091 if ( this == NULL ) 00092 { 00093 cout << "The Node is NULL" << endl; 00094 return NULL; 00095 } 00096 00097 return element; 00098 } |
|
Definition at line 105 of file BinNode.cpp. Referenced by do_commands(), and output_tree().
00106 { 00107 return (left == NULL) && (right == NULL); 00108 } |
|
Definition at line 62 of file BinNode.cpp. Referenced by do_commands(), and output_tree().
00063 { 00064 return left; 00065 } |
|
Definition at line 120 of file BinNode.cpp. |
|
Definition at line 110 of file BinNode.cpp. |
|
Definition at line 67 of file BinNode.cpp. Referenced by do_commands(), and output_tree().
00068 { 00069 return right; 00070 } |
|
Definition at line 100 of file BinNode.cpp. Referenced by BinSearchTree::remove().
00101 { 00102 element = new DBase( val ); 00103 } |
|
Definition at line 72 of file BinNode.cpp. 00073 { 00074 return ( element != NULL ); 00075 } |
|
Definition at line 77 of file BinNode.cpp. Referenced by do_commands(), BinSearchTree::insert(), operator<<(), output_tree(), BinSearchTree::preorder(), BinSearchTree::print(), BinSearchTree::remove(), and HuffTree::weight().
00078 { 00079 if ( this == NULL ) 00080 { 00081 DBase* temp = new DBase(); 00082 cout << "The Node is NULL" << endl; 00083 return *temp; 00084 } 00085 00086 return *element; 00087 } |
|
Definition at line 51 of file BinNode.hpp. |
|
Definition at line 57 of file BinNode.hpp. Referenced by operator<<().
|
|
Definition at line 18 of file HuffBin.hpp. |
|
Definition at line 42 of file BinNode.hpp. Referenced by BinSearchTree::deletemin(), BinSearchTree::find(), BinSearchTree::findID(), freelist(), BinSearchTree::insert(), operator new(), BinSearchTree::preorder(), BinSearchTree::print(), and BinSearchTree::remove().
|
|
Definition at line 43 of file BinNode.hpp. Referenced by BinSearchTree::deletemin(), BinSearchTree::find(), BinSearchTree::findID(), BinSearchTree::insert(), BinSearchTree::preorder(), BinSearchTree::print(), and BinSearchTree::remove().
|