// // // simplified Account link class // // Hidden class used by Account List class // Based on Simplified List Template Class // Described in Chapter 9 of // Data Structures in C++ using the STL // Published by Addison-Wesley, 1997 // Written by Tim Budd, budd@cs.orst.edu // Oregon State University // // // MAR 4/4/00 - Avoided templates because couldn't get // Budd's code to compile under Microsoft Visual Studio v6.0 #ifndef ACCOUNTLISTLINK_H #define ACCOUNTLISTLINK_H //#include "AccountListList.h" #include "Account.h" #include using namespace std; //link class AccountLink { public: // given a link bump to the next one AccountLink * Next() { return nextLink; } Account & GetValue() { return value; } // version allowing to change the value Account GetValue() const { return value; } // just reporting private: AccountLink (Account & val); Account value; AccountLink * nextLink; AccountLink * prevLink; // allow lists to see element values friend class AccountList; }; ostream & operator << (ostream & strOut, const AccountLink & toShow); #endif