Initial version that handles multiple callback objects through 1 socket
[iot2.git] / iotjava / iotpolicy / IoTCompiler.java
index 0afc699907754a4485c94e7139976a57fb07571e..4bbeb6a8c023917a4a42cf19e0112f754428dec4 100644 (file)
@@ -753,11 +753,16 @@ public class IoTCompiler {
                for (String method : methods) {
 
                        List<String> methPrmTypes = intDecl.getMethodParamTypes(method);
-                       for (String paramType : methPrmTypes) {
+                       List<String> methParams = intDecl.getMethodParams(method);
+                       for (int i = 0; i < methPrmTypes.size(); i++) {
 
-                               String simpleType = getSimpleType(paramType);
+                               String simpleType = getSimpleType(methPrmTypes.get(i));
+                               String param = methParams.get(i);
                                if (getParamCategory(simpleType) == ParamCategory.NONPRIMITIVES) {
                                        includeClasses.add(getNonPrimitiveCplusClass(simpleType));
+                               } else if (param.contains("[]")) {
+                               // Check if this is array for C++; translate into vector
+                                       includeClasses.add("vector");
                                }
                        }
                }