Testing for list/vector data types
[iot2.git] / iotjava / iotrmi / C++ / IoTRMIUtil.hpp
index 5da411cfd4d85179bd5e1a6291766aef4454f8ac..2c3be17cfc9aab7372d1b647cf175257cf3681f1 100644 (file)
@@ -300,6 +300,10 @@ void* IoTRMIUtil::getParamObject(void* retObj, const char* type, char* paramByte
        } else if ( string(type).find("*") != string::npos) {
                // This is an array type, i.e. vector
                retObj = getArrayParamObject(retObj, type, paramBytes, len);
+       } else if ( (string(type).find("<") != string::npos) &&
+                               (string(type).find(">") != string::npos)) {
+               // This is a vector/list type
+               retObj = getArrayParamObject(retObj, type, paramBytes, len);
        } else {
                cerr << "IoTRMIUtil: Unrecognizable type: " << type << endl;
                exit(-1);
@@ -389,6 +393,10 @@ char* IoTRMIUtil::getObjectBytes(char* retObjBytes, void* obj, const char* type)
        } else if ( string(type).find("*") != string::npos) {
        // This is an array type, i.e. vector
                retObjBytes = getArrayObjectBytes(retObjBytes, obj, type);
+       } else if ( (string(type).find("<") != string::npos) &&
+                               (string(type).find(">") != string::npos)) {
+       // This is a vector/list type
+               retObjBytes = getArrayObjectBytes(retObjBytes, obj, type);
        } else {
                cerr << "IoTRMIUtil: Unrecognizable type: " << type << endl;
                exit(-1);