/**
* HELPER: writeStructParamClassJavaStub() writes parameters if struct is present
*/
- private void writeStructParamClassJavaStub(List<String> methParams, List<String> methPrmTypes, String callbackType) {
+ private void writeStructParamClassJavaStub(List<String> methParams, List<String> methPrmTypes, Set<String> callbackType) {
print("int paramLen = ");
writeLengthStructParamClassJavaStub(methParams, methPrmTypes);
* HELPER: writeStdMethodBodyJavaStub() writes the standard method body in the stub class
*/
private void writeStdMethodBodyJavaStub(InterfaceDecl intDecl, List<String> methParams,
- List<String> methPrmTypes, String method, String callbackType) {
+ List<String> methPrmTypes, String method, Set<String> callbackType) {
checkAndWriteStructSetupJavaStub(methParams, methPrmTypes, intDecl, method);
println("int methodId = " + intDecl.getMethodNumId(method) + ";");
}
+ /**
+ * HELPER: checkCallbackType() checks the callback type
+ */
+ private boolean checkCallbackType(String paramType, Set<String> callbackType) {
+
+ String prmType = returnGenericCallbackType(paramType);
+ if (callbackType == null) // If there is no callbackType it means not a callback method
+ return false;
+ else {
+ for (String type : callbackType) {
+ if (type.equals(prmType))
+ return true; // Check callbackType one by one
+ }
+ return false;
+ }
+ }
+
+
/**
* HELPER: checkCallbackType() checks the callback type
*/
* HELPER: writeCallbackMethodBodyJavaStub() writes the callback method of the stub class
*/
private void writeCallbackMethodBodyJavaStub(InterfaceDecl intDecl, List<String> methParams,
- List<String> methPrmTypes, String method, String callbackType) {
+ List<String> methPrmTypes, String method, Set<String> callbackType) {
// Determine callback object counter type (List vs. single variable)
for (int i = 0; i < methParams.size(); i++) {
if (isArrayOrList(paramType, param)) { // Generate loop
println("int cnt" + i + " = 0;");
println("for (" + getGenericType(paramType) + " cb : " + getSimpleIdentifier(param) + ") {");
- writeCallbackInstantiationMethodBodyJavaStub("cb", callbackType, i, true);
+ writeCallbackInstantiationMethodBodyJavaStub("cb", returnGenericCallbackType(paramType), i, true);
} else
- writeCallbackInstantiationMethodBodyJavaStub(getSimpleIdentifier(param), callbackType, i, false);
+ writeCallbackInstantiationMethodBodyJavaStub(getSimpleIdentifier(param), returnGenericCallbackType(paramType), i, false);
if (isArrayOrList(paramType, param))
println("}");
}
print("public " + intDecl.getMethodType(method) + " " +
intDecl.getMethodId(method) + "(");
boolean isCallbackMethod = false;
- String callbackType = null;
+ //String callbackType = null;
+ Set<String> callbackType = new HashSet<String>();
for (int i = 0; i < methParams.size(); i++) {
String paramType = returnGenericCallbackType(methPrmTypes.get(i));
// Check if this has callback object
if (callbackClasses.contains(paramType)) {
isCallbackMethod = true;
- callbackType = paramType;
+ //callbackType = paramType;
+ callbackType.add(paramType);
// Even if there're 2 callback arguments, we expect them to be of the same interface
}
print(methPrmTypes.get(i) + " " + methParams.get(i));
/**
* HELPER: writeMethodJavaSkeleton() writes the method of the skeleton class
*/
- private void writeMethodJavaSkeleton(Collection<String> methods, InterfaceDecl intDecl, Set<String> callbackClasses,
- boolean callbackSkeleton, String intface) {
+ private void writeMethodJavaSkeleton(Collection<String> methods, InterfaceDecl intDecl) {
for (String method : methods) {
List<String> methPrmTypes = intDecl.getMethodParamTypes(method);
String methodId = intDecl.getMethodId(method);
print("public " + intDecl.getMethodType(method) + " " + methodId + "(");
- boolean isCallbackMethod = false;
- String callbackType = null;
for (int i = 0; i < methParams.size(); i++) {
String origParamType = methPrmTypes.get(i);
String paramType = checkAndGetParamClass(origParamType);
- if (callbackClasses.contains(origParamType)) { // Check if this has callback object
- isCallbackMethod = true;
- callbackType = origParamType;
- }
print(paramType + " " + methParams.get(i));
// Check if this is the last element (don't print a comma)
if (i != methParams.size() - 1) {
/**
* HELPER: writeCallbackInstantiationJavaStubGeneration() writes the instantiation of callback stubs
*/
- private void writeCallbackInstantiationJavaStubGeneration(String exchParamType) {
+ private void writeCallbackInstantiationJavaStubGeneration(String exchParamType, int counter) {
- //println("int objIdRecv = (int[]) paramObj[0];");
- println(exchParamType + " newStub = null;");
- println("if(!IoTRMIUtil.mapStub.containsKey(objIdRecv)) {");
- println("newStub = new " + exchParamType + "_Stub(rmiComm, objIdRecv);");
- println("IoTRMIUtil.mapStub.put(objIdRecv, newStub);");
- println("rmiComm.setObjectIdCounter(objIdRecv);");
+ println(exchParamType + " newStub" + counter + " = null;");
+ println("if(!IoTRMIUtil.mapStub.containsKey(objIdRecv" + counter + ")) {");
+ println("newStub" + counter + " = new " + exchParamType + "_Stub(rmiComm, objIdRecv" + counter + ");");
+ println("IoTRMIUtil.mapStub.put(objIdRecv" + counter + ", newStub" + counter + ");");
+ println("rmiComm.setObjectIdCounter(objIdRecv" + counter + ");");
println("rmiComm.decrementObjectIdCounter();");
println("}");
println("else {");
- println("newStub = (" + exchParamType + "_Stub) IoTRMIUtil.mapStub.get(objIdRecv);");
+ println("newStub" + counter + " = (" + exchParamType + "_Stub) IoTRMIUtil.mapStub.get(objIdRecv" + counter + ");");
println("}");
}
* HELPER: writeCallbackJavaStubGeneration() writes the callback stub generation part
*/
private Map<Integer,String> writeCallbackJavaStubGeneration(List<String> methParams, List<String> methPrmTypes,
- String callbackType, boolean isStructMethod) {
+ Set<String> callbackType, boolean isStructMethod) {
Map<Integer,String> mapStubParam = new HashMap<Integer,String>();
String offsetPfx = "";
println("int numStubs" + i + " = stubIdArray" + i + ".length;");
println("List<" + exchParamType + "> stub" + i + " = new ArrayList<" + exchParamType + ">();");
} else {
- println("int objIdRecv = stubIdArray" + i + "[0];");
- writeCallbackInstantiationJavaStubGeneration(exchParamType);
+ println("int objIdRecv" + i + " = stubIdArray" + i + "[0];");
+ writeCallbackInstantiationJavaStubGeneration(exchParamType, i);
}
}
// Generate a loop if needed
String exchParamType = checkAndGetParamClass(getGenericType(paramType));
if (isArray(param)) {
println("for (int i = 0; i < numStubs" + i + "; i++) {");
- println("int objIdRecv = stubIdArray" + i + "[i];");
- writeCallbackInstantiationJavaStubGeneration(exchParamType);
- println("stub" + i + "[i] = newStub;");
+ println("int objIdRecv" + i + " = stubIdArray" + i + "[i];");
+ writeCallbackInstantiationJavaStubGeneration(exchParamType, i);
+ println("stub" + i + "[i] = newStub" + i + ";");
println("}");
} else if (isList(paramType)) {
println("for (int i = 0; i < numStubs" + i + "; i++) {");
- println("int objIdRecv = stubIdArray" + i + "[i];");
- writeCallbackInstantiationJavaStubGeneration(exchParamType);
- println("stub" + i + ".add(newStub);");
+ println("int objIdRecv" + i + " = stubIdArray" + i + "[i];");
+ writeCallbackInstantiationJavaStubGeneration(exchParamType, i);
+ println("stub" + i + ".add(newStub" + i + ");");
println("}");
} else
- println(exchParamType + " stub" + i + " = newStub;");
+ println(exchParamType + " stub" + i + " = newStub" + i + ";");
mapStubParam.put(i, "stub" + i); // List of all stub parameters
}
}
* HELPER: writeMethodHelperReturnJavaSkeleton() writes return statement part in skeleton
*/
private void writeMethodHelperReturnJavaSkeleton(InterfaceDecl intDecl, List<String> methParams,
- List<String> methPrmTypes, String method, boolean isCallbackMethod, String callbackType,
+ List<String> methPrmTypes, String method, boolean isCallbackMethod, Set<String> callbackType,
boolean isStructMethod) {
checkAndWriteEnumTypeJavaSkeleton(methParams, methPrmTypes, isStructMethod);
// Generate array of parameter objects
boolean isCallbackMethod = false;
- String callbackType = null;
+ //String callbackType = null;
+ Set<String> callbackType = new HashSet<String>();
println("byte[] localMethodBytes = methodBytes;");
println("rmiComm.setGetMethodBytes();");
print("int paramLen = ");
String prmType = returnGenericCallbackType(methPrmTypes.get(i));
if (callbackClasses.contains(prmType)) {
isCallbackMethod = true;
- callbackType = prmType;
+ //callbackType = prmType;
+ callbackType.add(prmType);
println("paramCls[pos] = int[].class;");
println("paramClsGen[pos++] = null;");
} else { // Generate normal classes if it's not a callback object
// Generate array of parameter objects
boolean isCallbackMethod = false;
- String callbackType = null;
+ //String callbackType = null;
+ Set<String> callbackType = new HashSet<String>();
println("byte[] localMethodBytes = methodBytes;");
println("rmiComm.setGetMethodBytes();");
print("Object[] paramObj = rmiComm.getMethodParams(new Class<?>[] { ");
String paramType = returnGenericCallbackType(methPrmTypes.get(i));
if (callbackClasses.contains(paramType)) {
isCallbackMethod = true;
- callbackType = paramType;
+ //callbackType = paramType;
+ callbackType.add(paramType);
print("int[].class");
} else { // Generate normal classes if it's not a callback object
String prmType = checkAndGetArray(methPrmTypes.get(i), methParams.get(i));
// Write function to return didAlreadyInitWaitInvoke
writeReturnDidAlreadyInitWaitInvoke();
// Write methods
- writeMethodJavaSkeleton(methods, intDecl, callbackClasses, false, intface);
+ writeMethodJavaSkeleton(methods, intDecl);
// Write method helper
writeMethodHelperJavaSkeleton(methods, intDecl, callbackClasses);
// Write waitRequestInvokeMethod() - main loop
/**
* HELPER: writeMethodDeclCplusStub() writes the method declarations of the stub
*/
- private void writeMethodDeclCplusStub(Collection<String> methods, InterfaceDecl intDecl, Set<String> callbackClasses, String newStubClass) {
+ private void writeMethodDeclCplusStub(Collection<String> methods, InterfaceDecl intDecl) {
for (String method : methods) {
List<String> methPrmTypes = intDecl.getMethodParamTypes(method);
print(checkAndGetCplusType(intDecl.getMethodType(method)) + " " +
intDecl.getMethodId(method) + "(");
- boolean isCallbackMethod = false;
- String callbackType = null;
for (int i = 0; i < methParams.size(); i++) {
String paramType = returnGenericCallbackType(methPrmTypes.get(i));
- // Check if this has callback object
- if (callbackClasses.contains(paramType)) {
- isCallbackMethod = true;
- callbackType = paramType;
- // Even if there're 2 callback arguments, we expect them to be of the same interface
- }
String methPrmType = checkAndGetCplusType(methPrmTypes.get(i));
String methParamComplete = checkAndGetCplusArray(methPrmType, methParams.get(i));
print(methParamComplete);
print(checkAndGetCplusType(intDecl.getMethodType(method)) + " " + newStubClass + "::" +
intDecl.getMethodId(method) + "(");
boolean isCallbackMethod = false;
- String callbackType = null;
+ Set<String> callbackType = new HashSet<String>();
for (int i = 0; i < methParams.size(); i++) {
String paramType = returnGenericCallbackType(methPrmTypes.get(i));
// Check if this has callback object
if (callbackClasses.contains(paramType)) {
isCallbackMethod = true;
- callbackType = paramType;
+ //callbackType = paramType;
+ callbackType.add(paramType);
// Even if there're 2 callback arguments, we expect them to be of the same interface
}
String methPrmType = checkAndGetCplusType(methPrmTypes.get(i));
*/
private void writeCallbackInstantiationMethodBodyCplusStub(String paramIdent, String callbackType, int counter) {
- println("auto it = IoTRMIUtil::mapSkel->find(" + paramIdent + ");");
- println("if (it == IoTRMIUtil::mapSkel->end()) {");
+ println("auto it" + counter + " = IoTRMIUtil::mapSkel->find(" + paramIdent + ");");
+ println("if (it" + counter + " == IoTRMIUtil::mapSkel->end()) {");
println("int newObjIdSent = rmiComm->getObjectIdCounter();");
println("objIdSent" + counter + ".push_back(newObjIdSent);");
println("rmiComm->decrementObjectIdCounter();");
println(callbackType + "_Skeleton* skel" + counter + " = new " + callbackType + "_Skeleton(" + paramIdent + ", rmiComm, newObjIdSent);");
- println("vecCallbackObj.push_back(skel" + counter + ");");
println("IoTRMIUtil::mapSkel->insert(make_pair(" + paramIdent + ", skel" + counter + "));");
println("IoTRMIUtil::mapSkelId->insert(make_pair(" + paramIdent + ", newObjIdSent));");
println("thread th" + counter + " (&" + callbackType + "_Skeleton::___waitRequestInvokeMethod, std::ref(skel" + counter +
* HELPER: writeCallbackMethodBodyCplusStub() writes the callback method of the stub class
*/
private void writeCallbackMethodBodyCplusStub(InterfaceDecl intDecl, List<String> methParams,
- List<String> methPrmTypes, String method, String callbackType) {
+ List<String> methPrmTypes, String method, Set<String> callbackType) {
// Check if this is single object, array, or list of objects
boolean isArrayOrList = false;
String param = methParams.get(i);
if (isArrayOrList(paramType, param)) { // Generate loop
println("for (" + getGenericType(paramType) + "* cb : " + getSimpleIdentifier(param) + ") {");
- writeCallbackInstantiationMethodBodyCplusStub("cb", callbackType, i);
+ writeCallbackInstantiationMethodBodyCplusStub("cb", returnGenericCallbackType(paramType), i);
isArrayOrList = true;
callbackParam = getSimpleIdentifier(param);
} else {
- writeCallbackInstantiationMethodBodyCplusStub(getSimpleIdentifier(param), callbackType, i);
+ writeCallbackInstantiationMethodBodyCplusStub(getSimpleIdentifier(param), returnGenericCallbackType(paramType), i);
}
if (isArrayOrList)
println("}");
/**
* HELPER: writeStructParamClassCplusStub() writes member parameters of struct
*/
- private void writeStructParamClassCplusStub(List<String> methParams, List<String> methPrmTypes, String callbackType) {
+ private void writeStructParamClassCplusStub(List<String> methParams, List<String> methPrmTypes, Set<String> callbackType) {
print("int numParam = ");
writeLengthStructParamClassCplusStub(methParams, methPrmTypes);
* HELPER: writeStdMethodBodyCplusStub() writes the standard method body in the stub class
*/
private void writeStdMethodBodyCplusStub(InterfaceDecl intDecl, List<String> methParams,
- List<String> methPrmTypes, String method, String callbackType, boolean isCallbackMethod) {
+ List<String> methPrmTypes, String method, Set<String> callbackType, boolean isCallbackMethod) {
checkAndWriteStructSetupCplusStub(methParams, methPrmTypes, intDecl, method);
println("int methodId = " + intDecl.getMethodNumId(method) + ";");
// Get the object Id
Integer objId = mapIntfaceObjId.get(intface);
println("int objectId = " + objId + ";");
- if (callbackExist) {
- // We assume that each class only has one callback interface for now
- Iterator it = callbackClasses.iterator();
- String callbackType = (String) it.next();
- println("// Callback properties");
- println("vector<" + callbackType + "*> vecCallbackObj;");
- }
println("// Synchronization variables");
for (String method : methods) {
// Generate AtomicBooleans for methods that have return values
println("delete rmiComm;");
println("rmiComm = NULL;");
println("}");
- if (callbackExist) {
- // We assume that each class only has one callback interface for now
- //Iterator it = callbackClasses.iterator();
- //String callbackType = (String) it.next();
- for (String callbackType : callbackClasses) {
- println("for(" + callbackType + "* cb : vecCallbackObj) {");
- println("delete cb;");
- println("cb = NULL;");
- println("}");
- }
- }
println("}");
println("");
}
println(newStubClass + "(IoTRMIComm* _rmiComm, int _objectId);");
println("~" + newStubClass + "();");
// Write methods
- writeMethodDeclCplusStub(methods, intDecl, callbackClasses, newStubClass);
+ writeMethodDeclCplusStub(methods, intDecl);
print("}"); println(";");
println("#endif");
pw.close();
private void writePropertiesCplusSkeleton(String intface, boolean callbackExist, Set<String> callbackClasses) {
println(intface + " *mainObj;");
- // Callback
- if (callbackExist) {
- Iterator it = callbackClasses.iterator();
- String callbackType = (String) it.next();
- String exchangeType = checkAndGetParamClass(callbackType);
- println("// Callback properties");
- println("vector<" + exchangeType + "*> vecCallbackObj;");
- }
println("IoTRMIComm *rmiComm;");
println("char* methodBytes;");
println("int methodLen;");
println("delete rmiComm;");
println("rmiComm = NULL;");
println("}");
- if (callbackExist) {
- // We assume that each class only has one callback interface for now
- //Iterator it = callbackClasses.iterator();
- //String callbackType = (String) it.next();
- for (String callbackType : callbackClasses) {
- String exchangeType = checkAndGetParamClass(callbackType);
- println("for(" + exchangeType + "* cb : vecCallbackObj) {");
- println("delete cb;");
- println("cb = NULL;");
- println("}");
- }
- }
println("}");
println("");
}
/**
* HELPER: writeMethodCplusSkeleton() writes the method of the skeleton class
*/
- private void writeMethodCplusSkeleton(Collection<String> methods, InterfaceDecl intDecl,
- Set<String> callbackClasses, boolean callbackSkeleton, String intface, String newSkelClass) {
+ private void writeMethodCplusSkeleton(Collection<String> methods, InterfaceDecl intDecl, String newSkelClass) {
for (String method : methods) {
String methodId = intDecl.getMethodId(method);
String methodType = checkAndGetCplusType(intDecl.getMethodType(method));
print(methodType + " " + newSkelClass + "::" + methodId + "(");
- boolean isCallbackMethod = false;
- String callbackType = null;
for (int i = 0; i < methParams.size(); i++) {
String origParamType = methPrmTypes.get(i);
- if (callbackClasses.contains(origParamType)) { // Check if this has callback object
- isCallbackMethod = true;
- callbackType = origParamType;
- }
String paramType = checkAndGetParamClass(methPrmTypes.get(i));
String methPrmType = checkAndGetCplusType(paramType);
String methParamComplete = checkAndGetCplusArray(methPrmType, methParams.get(i));
/**
* HELPER: writeCallbackCplusNumStubs() writes the numStubs variable
*/
- private void writeCallbackCplusNumStubs(List<String> methParams, List<String> methPrmTypes, String callbackType) {
+ private void writeCallbackCplusNumStubs(List<String> methParams, List<String> methPrmTypes, Set<String> callbackType) {
for (int i = 0; i < methParams.size(); i++) {
String paramType = methPrmTypes.get(i);
/**
* HELPER: writeCallbackInstantiationCplusStubGeneration() writes the instantiation of callback stubs
*/
- private void writeCallbackInstantiationCplusStubGeneration(String exchParamType) {
+ private void writeCallbackInstantiationCplusStubGeneration(String exchParamType, int counter) {
- //println("int objIdRecv = (int[]) paramObj[0];");
- println(exchParamType + "* newStub = NULL;");
- println("auto it = IoTRMIUtil::mapStub->find(objIdRecv);");
- println("if (it == IoTRMIUtil::mapStub->end()) {");
- println("newStub = new " + exchParamType + "_Stub(rmiComm, objIdRecv);");
- println("IoTRMIUtil::mapStub->insert(make_pair(objIdRecv, newStub));");
- println("rmiComm->setObjectIdCounter(objIdRecv);");
+ println(exchParamType + "* newStub" + counter + " = NULL;");
+ println("auto it" + counter + " = IoTRMIUtil::mapStub->find(objIdRecv" + counter + ");");
+ println("if (it" + counter + " == IoTRMIUtil::mapStub->end()) {");
+ println("newStub" + counter + " = new " + exchParamType + "_Stub(rmiComm, objIdRecv" + counter + ");");
+ println("IoTRMIUtil::mapStub->insert(make_pair(objIdRecv" + counter + ", newStub" + counter + "));");
+ println("rmiComm->setObjectIdCounter(objIdRecv" + counter + ");");
println("rmiComm->decrementObjectIdCounter();");
- println("skel->vecCallbackObj.push_back(newStub);");
println("}");
println("else {");
- println("newStub = (" + exchParamType + "_Stub*) it->second;");
+ println("newStub" + counter + " = (" + exchParamType + "_Stub*) it" + counter + "->second;");
println("}");
}
/**
* HELPER: writeCallbackCplusStubGeneration() writes the callback stub generation part
*/
- private void writeCallbackCplusStubGeneration(List<String> methParams, List<String> methPrmTypes, String callbackType) {
+ private void writeCallbackCplusStubGeneration(List<String> methParams, List<String> methPrmTypes, Set<String> callbackType) {
// Iterate over callback objects
for (int i = 0; i < methParams.size(); i++) {
if (isArrayOrList(paramType, param)) {
println("vector<" + exchParamType + "*> stub" + i + ";");
println("for (int i = 0; i < numStubIdArray" + i + ".size(); i++) {");
- println("int objIdRecv = numStubIdArray" + i + "[i];");
- writeCallbackInstantiationCplusStubGeneration(exchParamType);
- println("stub" + i + ".push_back(newStub);");
+ println("int objIdRecv" + i + " = numStubIdArray" + i + "[i];");
+ writeCallbackInstantiationCplusStubGeneration(exchParamType, i);
+ println("stub" + i + ".push_back(newStub" + i + ");");
println("}");
} else {
- println("int objIdRecv = numStubIdArray" + i + "[0];");
- writeCallbackInstantiationCplusStubGeneration(exchParamType);
- println(exchParamType + "* stub" + i + " = newStub;");
+ println("int objIdRecv" + i + " = numStubIdArray" + i + "[0];");
+ writeCallbackInstantiationCplusStubGeneration(exchParamType, i);
+ println(exchParamType + "* stub" + i + " = newStub" + i + ";");
}
}
}
* HELPER: writeMethodHelperReturnCplusSkeleton() writes the return statement part in skeleton
*/
private void writeMethodHelperReturnCplusSkeleton(InterfaceDecl intDecl, List<String> methParams,
- List<String> methPrmTypes, String method, boolean isCallbackMethod, String callbackType,
+ List<String> methPrmTypes, String method, boolean isCallbackMethod, Set<String> callbackType,
String methodId, Set<String> callbackClasses) {
println("rmiComm->getMethodParams(paramCls, numParam, paramObj, localMethodBytes);");
// Generate array of parameter types
boolean isCallbackMethod = false;
- String callbackType = null;
+ //String callbackType = null;
+ Set<String> callbackType = new HashSet<String>();
print("string paramCls[] = { ");
for (int i = 0; i < methParams.size(); i++) {
String paramType = returnGenericCallbackType(methPrmTypes.get(i));
if (callbackClasses.contains(paramType)) {
isCallbackMethod = true;
- callbackType = paramType;
+ //callbackType = paramType;
+ callbackType.add(paramType);
print("\"int*\"");
} else { // Generate normal classes if it's not a callback object
String paramTypeC = checkAndGetCplusArgClsType(methPrmTypes.get(i), methParams.get(i));
// Generate array of parameter objects
boolean isCallbackMethod = false;
- String callbackType = null;
+ Set<String> callbackType = new HashSet<String>();
print("int numParam = ");
writeLengthStructParamClassSkeleton(methParams, methPrmTypes, method, intDecl);
println(";");
String prmType = returnGenericCallbackType(methPrmTypes.get(i));
if (callbackClasses.contains(prmType)) {
isCallbackMethod = true;
- callbackType = prmType;
+ //callbackType = prmType;
+ callbackType.add(prmType);
//println("int numStubs" + i + " = 0;");
println("vector<int> numStubIdArray" + i + ";");
println("paramCls[pos] = \"int*\";");
/**
* HELPER: writeMethodHelperDeclCplusSkeleton() writes the method helper declarations of the skeleton class
*/
- private void writeMethodHelperDeclCplusSkeleton(Collection<String> methods, InterfaceDecl intDecl,
- Set<String> callbackClasses, String newSkelClass) {
+ private void writeMethodHelperDeclCplusSkeleton(Collection<String> methods, InterfaceDecl intDecl, String newSkelClass) {
// Use this set to handle two same methodIds
Set<String> uniqueMethodIds = new HashSet<String>();
println("bool didInitWaitInvoke();");
writeMethodDeclCplusSkeleton(methods, intDecl, callbackClasses);
// Write method helper declarations
- writeMethodHelperDeclCplusSkeleton(methods, intDecl, callbackClasses, newSkelClass);
+ writeMethodHelperDeclCplusSkeleton(methods, intDecl, newSkelClass);
// Write waitRequestInvokeMethod() declaration - main loop
println("void ___waitRequestInvokeMethod(" + newSkelClass + "* skel);");
println("};");
// Write didInitWaitInvoke() to return bool
writeReturnDidAlreadyInitWaitInvoke(newSkelClass);
// Write methods
- writeMethodCplusSkeleton(methods, intDecl, callbackClasses, false, intface, newSkelClass);
+ writeMethodCplusSkeleton(methods, intDecl, newSkelClass);
// Write method helper
writeMethodHelperCplusSkeleton(methods, intDecl, callbackClasses, newSkelClass);
// Write waitRequestInvokeMethod() - main loop
comp.generateCPlusInterfaces();
comp.generateCPlusStubClassesHpp();
comp.generateCPlusStubClassesCpp();
- //comp.generateCPlusCallbackStubClasses();
comp.generateCplusSkeletonClassHpp();
comp.generateCplusSkeletonClassCpp();
- //comp.generateCplusCallbackSkeletonClass();
} else {
// Check other options
while(i < args.length) {
comp.generateCPlusInterfaces();
comp.generateCPlusStubClassesHpp();
comp.generateCPlusStubClassesCpp();
- //comp.generateCPlusCallbackStubClasses();
comp.generateCplusSkeletonClassHpp();
comp.generateCplusSkeletonClassCpp();
- //comp.generateCplusCallbackSkeletonClass();
}
}
i = i + 2;