Testing complex callbacks invocation; fixing subtle bugs
[iot2.git] / iotjava / iotrmi / C++ / basics / TestClass.hpp
index 9c466445c85e5bee65f81e71129a70b5c3235c25..fa9b877e3df4c6bc3995992a6c092a2053c6bd11 100644 (file)
@@ -42,6 +42,7 @@ class TestClass : public TestClassInterface {
                void                            registerCallback(CallBackInterfaceWithCallBack* _cb);
                void                            registerCallbackArray(vector<CallBackInterfaceWithCallBack*> _cb);
                void                            registerCallbackList(vector<CallBackInterfaceWithCallBack*> _cb);
+               void                            registerCallbackComplex(int in, vector<CallBackInterfaceWithCallBack*> _cb, double db);
                int                                     callBack();
 
                // Enum
@@ -117,6 +118,18 @@ void TestClass::registerCallbackList(vector<CallBackInterfaceWithCallBack*> _cb)
 }
 
 
+void TestClass::registerCallbackComplex(int in, vector<CallBackInterfaceWithCallBack*> _cb, double db) {
+
+       for (CallBackInterfaceWithCallBack* cb : _cb) {
+               cbvec.push_back(cb);
+               cout << "Registering callback object in list!" << endl;
+       }
+
+       cout << "Integer: " << in << endl;
+       cout << "Double: " << db << endl;
+}
+
+
 int TestClass::callBack() {
 
        int sum = 0;