If i use this
void print(const Event* ev, void* data) {
cout << DCAST(MyObject, coll[0].node())->c << endl;
}
as print function, the program works perfectly.
but with this, the program doesn’t work
void print(const Event* ev, void* data) {
cout << DCAST(MyObject, coll[0].node())->c << endl;
cout << "type: " << coll[0].node()->is_of_type(MyObject::get_class_type()) << endl;
}
I suppose that the error is in the calling of is_of_type method. or in MyObject::get_class_type method.