/////////////////////////////////////////////////////////////////////////// // derived2.cpp - provides protocol details for derived2 class // // // // this file is not visible to client, who has access only to the // // compiled derived1.dll and protocol header file // // // // Jim Fawcett, CSE 791 - Distributed Objects, Demonstration // /////////////////////////////////////////////////////////////////////////// // Important: // // Please see notes in the Protocol.h file // /////////////////////////////////////////////////////////////////////////// #define IN_DLL #include #include #include "protocol.h" using namespace std; class derived2 : public protocol { public: DLL_DECL int getInt() { cout << " calling derived2::getInt()\n"; return 0; } DLL_DECL void putInt(int) { cout << " calling derived2::putInt()\n"; } DLL_DECL string passVal(string s) { s += ": a copy inside derived2"; return s; } DLL_DECL string passRef(string &s) { s += ": a reference inside derived2"; return s; } }; DLL_DECL protocol* protocol::make_d2() { cout << " calling protocal::make_d2()\n"; return new derived2; }