void ____init_CallBack(); // thread
void ____registerCallBack(); // tell the other side that we are ready
- const static int size = 12;
- const static string methodSignatures[size];
-
private:
int intA;
float floatB;
int TestClass_Stub::objIdCnt = 0;
-const string TestClass_Stub::methodSignatures[TestClass_Stub::size] = {
- "voidsetA(int)", // 0
- "voidsetB(float)", // 1
- "voidsetC(string)", // 2
- "sumArray(string[])", // 3
- //"sumArray(int[])",
- "intsetAndGetA(int)", // 4
- "intsetACAndGetA(string,int)", // 5
- "intcallBack()", // 6
- "voidregisterCallBack(CallBackInterface)", // 7
- "voidregisterCallBack(CallBackInterface[])", // 8
- "registercallback", // 9
- "handleStruct(StructJ[])", // 10
- "structsize" // 11
-};
-
-
TestClass_Stub::TestClass_Stub() {
address = "";
vector<EnumC> TestClass_Stub::handleEnum(vector<EnumC> vecEn) {
int numParam = 1;
- int methodId = 13;
- string retType = "void";
- string paramCls[] = { "int" };
- int enumsize = vecEn.size();
- void* paramObj[] = { &enumsize };
- void* retObj = NULL;
- rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
-
- int numParam2 = vecEn.size();
- int methodId2 = 12;
- string retType2 = "int[]";
- string paramCls2[numParam2];
+ int numEl = vecEn.size();
+ int methodId = 12;
+ string retType = "int[]";
+ string paramCls[] = { "int[]" };
// Need to define this container for integer version of enum
- int paramEnum[numParam2];
- void* paramObj2[numParam2];
- for(int i = 0; i < numParam2; i++) {
- paramCls2[i] = "int";
- paramEnum[i] = (int) vecEn[i]; // cast enum to integer
- paramObj2[i] = ¶mEnum[i];
+ vector<int> paramInt(numEl);
+ for(int i = 0; i < numEl; i++) {
+ paramInt[i] = (int) vecEn[i]; // cast enum to integer
}
- vector<int> retEnumInt(numParam2);
+ void* paramObj[] = { ¶mInt };
// if no return value just
// void* retObj2 = NULL;
// This is with return value:
- void* retObj2 = &retEnumInt;
- rmiCall->remoteCall(objectId, methodId2, retType2, paramCls2, paramObj2, numParam2, retObj2);
+ vector<int> retEnumInt;
+ void* retObj = &retEnumInt;
+ rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
int enumsize1 = retEnumInt.size();
vector<EnumC> retVal(enumsize1);
for (int i=0; i < enumsize1; i++) {