/////////////////////////////////////////////////////////////////////////// // derived1.cpp - provides protocol details for derived1 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 // /////////////////////////////////////////////////////////////////////////// #include #include #include "protocol.h" using namespace std; class derived1 : public protocol { public: int getInt() { cout << " calling derived1::getInt()\n"; return 0; } void putInt(int) { cout << " calling derived1::putInt()\n"; } string passVal(string s) { s += ": a copy inside derived1"; return s; } string passRef(string &s) { s += ": a reference inside derived1"; return s; } }; protocol* protocol::make_d1() { cout << " calling protocal::make_d1()\n"; return new derived1; }