/* * wordentry.hpp * * Created on: Oct 25, 2010 * Author: mike * for use in Yale course CPSC 427a, Fall 2010 */ #pragma once #include #include "word.hpp" using namespace std; // WordEntry is a Word with links for forming relationships. // -------------------------------------------------------- class WordEntry: public Word { friend class WordList; private: WordEntry* next; // used by WordList WordEntry* parent; // used by Triangle WordEntry(const Word data) : Word(data), next(NULL), parent(NULL) { } public: void setParent(WordEntry* other) { parent = other; } WordEntry* getParent() const { return parent; } WordEntry* getNext() const { return next; } };