// $Revision: 1.5 $ // Copyright (C) 1994-1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_CALLERON #include "CallerOn.h" #endif #ifndef TaligentSamples_CALCFUNCTORS #include "CalcFunctors.h" #endif #ifndef Taligent_LOCALSERVICE #include #endif #ifndef Taligent_MESSAGESTREAMSTRANSPORT #include #endif #ifndef IOSTREAMH #include // Included for cout #endif #ifndef _H_LIMITS #include #endif void CallerMain() { TCallerOn caller(TLocalServiceReference(TLocalObjectName("TemplateRPCDispatcher"))); TPushFunctor pushFour(4); TPushFunctor pushThree(3); TPlusFunctor plus; caller.Do(pushFour); caller.Do(pushThree); caller.Do(plus); cout << endl << "Push 3, push 4, plus, gives us: " << plus.GetResult() << endl; caller.Do(pushFour); caller.Do(plus); cout << endl << "Push 4, plus gives us: " << plus.GetResult() << endl; caller.Do(plus); cout << endl << "Doing plus again gives us: " << plus.GetResult() << endl; caller.ExitDispatcher(); }