Adding object ID and tons of minor adjustments for callback support
[iot2.git] / iotjava / iotrmi / C++ / sample / TestClass.cpp
index cbaeebab86a317eee9b88734615e3a9efe71ff30..1981601d1e5092af78038b1f9a8bf107eef6176b 100644 (file)
@@ -20,8 +20,22 @@ int main(int argc, char *argv[])
        input.push_back(987);*/
 
        cout << "Return value: " << tc->sumArray(input) << endl;
-
        delete tc;
 
+       vector<CallBackInterface*> test;
+       CallBackInterface *cb1 = new CallBack(12);
+       CallBackInterface *cb2 = new CallBack(22);
+       CallBackInterface *cb3 = new CallBack(32);
+       test.push_back(cb1);
+       test.push_back(cb2);
+       test.push_back(cb3);
+       for (CallBackInterface *cb : test) {
+               cout << "Test print: " << cb->printInt() << endl;
+       }
+
+       delete cb1;
+       delete cb2;
+       delete cb3;
+
        return 0;
 }