#ifndef COMPONENT_H #define COMPONENT_H ///////////////////////////////////////////////////////////////////// // component.h - implements announce protocol in two derived // // ver 1.0 classes with slightly different behavior // // // // Language: Visual C++, version 6.0, sp5 // // Platform: Dell Dimension 8100, Windows 2000 sp2 // // Application: CSE791 - Distributed Objects // // Demonstration of Programming to Interface // // Author: Jim Fawcett, CST 2-187, Syracuse University // // (315) 443-3948, jfawcett@twcny.rr.com // ///////////////////////////////////////////////////////////////////// /* Component Operations: ===================== This component supports the announce interface protocol, declared in interface.h. The protocol supports an announce function that identifies the component and its version number on std::cout. Interface Functions: ==================== announce::registerObjects(); // register avail. objs announce *ptr ptr = announce::makeObj(announce::type(1)); // create one of them ptr->announcer(); // use it delete ptr; // delete it */ ///////////////////////////////////////////////////////////////////// // Build Process: // ///////////////////////////////////////////////////////////////////// // // // see either interface.h or client.cpp // // // ///////////////////////////////////////////////////////////////////// /* Maintenance History: ==================== ver 1.0 : 14 Jan 2002 - first release */ // #include "interface.h" /////////////////////////////////////////////////////////////// // announce1 class declaration - example creatable class // create() returns pointer to tester class announce1 : public announce, public creator { public: announce1(); ~announce1(); virtual DLL_DECL void setString(const char *s); virtual DLL_DECL void announcer(); private: char *str; }; ///////////////////////////////////////////////////////////////////////// // test2 class declaration - example creatable class // create() returns pointer to tester class announce2 : public announce , public creator { public: announce2(); ~announce2(); virtual DLL_DECL void setString(const char *s); virtual DLL_DECL void announcer(); private: char *str; }; #endif