#ifndef CONCRETECOMMAND_H #define CONCRETECOMMAND_H /////////////////////////////////////////////////////////////////// // concreteCommand.h - declare commands appropriate for // // ver 1.1 application // // // // Language: Visual C++, ver 7.1 // // Platform: Dell Dimension 8300, Windows XP, Pro, sp2 // // Application: CSE776 - Design Patterns, Summer 2005 // // Author: Jim Fawcett, Instructor // // CST 2-187, (315) 443-3948 // // jfawcett@twcny.rr.com // /////////////////////////////////////////////////////////////////// #include #include "sKcommand.h" #include "receiver.h" /// NOTICE!!!! ////////////////////////////////////////////////// // Derived classes below could be created long after library // // invoker and abstract command classes were defined. Yet // // invoker can cause the execution of execute() functions // // provided here in response to any one of library's internal // // events. This comes about through power of polymorphism! // ///////////////////////////////////////////////////////////////// class concreteCommand1 : public command { public: concreteCommand1(receiver &rcvr) : _rcvr(rcvr) { } void execute(); private: receiver _rcvr; }; class concreteCommand2 : public command { public: concreteCommand2(receiver &rcvr) : _rcvr(rcvr) { } void execute(); private: receiver _rcvr; }; #endif