2 #include "CallBackInterface.hpp"
3 #include "../IoTRMICall.hpp"
7 class CallBack_CBStub : public CallBackInterface {
10 CallBack_CBStub(IoTRMICall* _rmiCall, int _objectId);
16 const static int size = 2;
17 const static string methodSignatures[size];
22 int objectId = 0; // Default value is 0
26 const string CallBack_CBStub::methodSignatures[CallBack_CBStub::size] = {
34 CallBack_CBStub::CallBack_CBStub() {
40 CallBack_CBStub::CallBack_CBStub(IoTRMICall* _rmiCall, int _objectId) {
47 CallBack_CBStub::~CallBack_CBStub() {
49 if (rmiCall != NULL) {
56 int CallBack_CBStub::printInt() {
59 string sign = "intprintInt()";
60 string retType = "int";
61 string paramCls[] = { };
62 void* paramObj[] = { };
64 void* retObj = &retVal;
65 rmiCall->remoteCall(objectId, sign, retType, paramCls, paramObj, numParam, retObj);
70 void CallBack_CBStub::setInt(int _i) {
73 string sign = "voidsetInt(int)";
74 string retType = "void";
75 string paramCls[] = { "int" };
76 void* paramObj[] = { &_i };
78 rmiCall->remoteCall(objectId, sign, retType, paramCls, paramObj, numParam, retObj);