projects
/
iot2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing printing statements from C++ RMI library - this will cause SO files to get...
[iot2.git]
/
iotjava
/
iotrmi
/
C++
/
basics
/
TestClass.hpp
diff --git
a/iotjava/iotrmi/C++/basics/TestClass.hpp
b/iotjava/iotrmi/C++/basics/TestClass.hpp
index cc6c8542d20a8405c433ac2f3643be34146a24a8..ca963490351ab0ad57adc281a7f45d58588ebda8 100644
(file)
--- a/
iotjava/iotrmi/C++/basics/TestClass.hpp
+++ b/
iotjava/iotrmi/C++/basics/TestClass.hpp
@@
-105,13
+105,6
@@
TestClass::TestClass(int _int, float _float, string _string) {
}
}
-void TestClass::registerCallback(CallBackInterfaceWithCallBack* _cb) {
-
- cbvec.push_back(_cb);
- cout << "Registering callback object!" << endl;
-}
-
-
void TestClass::registerCallbackArray(vector<CallBackInterfaceWithCallBack*> _cb) {
for (CallBackInterfaceWithCallBack* cb : _cb) {
void TestClass::registerCallbackArray(vector<CallBackInterfaceWithCallBack*> _cb) {
for (CallBackInterfaceWithCallBack* cb : _cb) {
@@
-142,13
+135,26
@@
void TestClass::registerCallbackComplex(int in, vector<CallBackInterfaceWithCall
}
}
+void TestClass::registerCallback(CallBackInterfaceWithCallBack* _cb) {
+
+ cbvec.push_back(_cb);
+ cout << "Registering callback object!" << endl;
+}
+
+
int TestClass::callBack() {
int sum = 0;
for (CallBackInterfaceWithCallBack* cb : cbvec) {
int TestClass::callBack() {
int sum = 0;
for (CallBackInterfaceWithCallBack* cb : cbvec) {
-
cb->needCallback(this)
;
+
//cout << "Sum: " << sum << endl
;
sum = sum + cb->printInt();
sum = sum + cb->printInt();
+ cb->needCallback(this);
+ //cb->needCallback(this);
+ TestClass* tc = new TestClass();
+ cb->needCallback(tc);
+ //cout << "Sum after: " << sum << endl;
}
}
+ cout << "About to return sum: " << sum << endl;
return sum;
}
return sum;
}