OrderedList

OrderedList - fTree.BinaryTreeSearch(index);} inline...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef _OrderedList_h #define _OrderedList_h #include "CST.h" template <typename dataType> class COrderedList { public: COrderedList() : fNumItems(0) {} // Default constructor virtual ~COrderedList() {} // Virtual destructor COrderedList& operator=(const COrderedList col) { if (this != &col) {} return *this;} // Overloaded assignment operator inline short GetNumItems() {return fNumItems;} { fTree.CreateNextAvailable(data); fNumItems = fTree.GetNumItems(); } inline dataType& GetOrderedListItem(short index) {return
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fTree.BinaryTreeSearch(index);} inline dataType&amp; GetOrderedListItemByKey(dataType&amp; data) {return fTree.BinaryTreeSearchByKey(data);} inline void SetOrderedListItem(short index, dataType data) {GetOrderedListItem(index) = data;} inline bool EmptyOrderedList() {return fTree.IsEmpty();} inline bool DeleteOrderedListItemByKey(dataType&amp; data) { bool result; result = fTree.DeleteFromTreeByKey(data); fNumItems = fTree.GetNumItems(); return result; } private: CST&lt;dataType&gt; fTree; short fNumItems; }; #endif...
View Full Document

This note was uploaded on 01/17/2012 for the course CSC 1254 taught by Professor Blanks,l during the Fall '08 term at LSU.

Ask a homework question - tutors are online