00001 /* 00002 * Copyright (c) 2004 CSIRO ICT Centre 00003 * 00004 * $Id: ALNode.h 587 2004-12-03 15:06:33Z nch $ 00005 */ 00006 00007 /* 00008 * ALNode forms part of the indexing structure used by 00009 * IndexedActiveList. It is basically a node in a 00010 * binary tree. I had intended to code this up generically 00011 * using templates, but right now it is specific to 00012 * ALElements. 00013 */ 00014 00015 #ifndef ALNODE_DEFINED 00016 #define ALNODE_DEFINED 00017 00018 #include "ALElement.h" 00019 00020 00021 class ALNode 00022 { 00023 public: 00024 ALNode(ALElement * e, 00025 ALNode * lC, 00026 ALNode * rC) 00027 : element(e), leftChild(lC), rightChild(rC) {}; 00028 ~ALNode() {}; 00029 00030 ALElement * getElement() const { return element; }; 00031 ALNode * getLeftChild() const { return leftChild; }; 00032 ALNode * getRightChild() const { return rightChild; }; 00033 00034 void setElement(ALElement * e) { element = e; }; 00035 void setLeftChild(ALNode * lC) { leftChild = lC; }; 00036 void setRightChild(ALNode * rC) { rightChild = rC; }; 00037 00038 private: 00039 ALElement * element; 00040 ALNode * leftChild; 00041 ALNode * rightChild; 00042 00043 ALNode(); 00044 ALNode(ALNode const &); 00045 ALNode & operator=(ALNode const &); 00046 }; 00047 00048 00049 #endif // ifndef ALNODE_DEFINED