#pragma once #include using namespace std; namespace Example { class AuctionHouse; // forward declaration // An AuctionUser has registered with the AuctionHouse to gain logon // access for online auctions. They may or may not have registered // their bank account to be able to buy or sell products yet. class AuctionUser { public: AuctionUser(const string& username, AuctionHouse& auctioneer); void changePassword(const string& newPassword); // callback used to allow the AuctionHouse to send us emails virtual void receiveEmail(const string& message); const string& getUsername() const; protected: // Our destructor is made pure virtual to prohibit instantiation of // AuctionUser directly. Only subclasses may be instantiated. virtual ~AuctionUser() = 0; // only AuctionUser subclasses can login() bool login() const; private: string m_username; string m_password; AuctionHouse* m_auctionHouse; }; }