void registerCallback(CallBackInterface* _cb);
void registerCallback(vector<CallBackInterface*> _cb);
int callBack();
- void handleStruct(vector<data> vecData);
+ vector<data> handleStruct(vector<data> vecData);
vector<EnumC> handleEnum(vector<EnumC> vecEn);
void thread1();
}
-void TestClass::handleStruct(vector<data> vecData) {
+vector<data> TestClass::handleStruct(vector<data> vecData) {
for (data dat : vecData) {
cout << "Value: " << dat.value << endl;
cout << "Year: " << dat.year << endl;
}
+ data newData;
+ newData.name = "Anonymous";
+ newData.value = 1.33;
+ newData.year = 2016;
+ vecData.push_back(newData);
+
+ return vecData;
}
int TestClass::callBack() {
- /*int sum = 0;
+ int sum = 0;
for (CallBackInterface* cb : cbvec) {
sum = sum + cb->printInt();
}
- return sum;*/
- thread th1 (&TestClass::thread1, this);
+ return sum;
+/* thread th1 (&TestClass::thread1, this);
thread th2 (&TestClass::thread2, this);
th1.join();
th2.join();
- return 1;
+ return 1;*/
}
#endif