A
Arkaitz Jimenez
Hi all,
I think this is mostly impossible, but just want to be sure.
Say that I have this 2 untouchable things:
void my_func(MyBase *baseptr){
base_ptr->one();
base_ptr->two();
}
class MyBase{
void one(){implemented}
void two(){implemented}
};
And now I want to test if my_func works ok but I can't use a MyBase
object, one and two implementations are too heavy, I could use
anything that my_func accepts, it'd accept pointers to derived.
So, as far as I know any implementation would hardcode base_ptr->one
to the MyBase:ne and base_ptr->two MyBase::two because they're not
even virtual and that doesn't let me any room to play, inheritance,
etc....
There's nothing I could do with RTTI that would do the trick without
modifying MyBase or my_func.
Am I correct?
Thanks
Arkaitz
I think this is mostly impossible, but just want to be sure.
Say that I have this 2 untouchable things:
void my_func(MyBase *baseptr){
base_ptr->one();
base_ptr->two();
}
class MyBase{
void one(){implemented}
void two(){implemented}
};
And now I want to test if my_func works ok but I can't use a MyBase
object, one and two implementations are too heavy, I could use
anything that my_func accepts, it'd accept pointers to derived.
So, as far as I know any implementation would hardcode base_ptr->one
to the MyBase:ne and base_ptr->two MyBase::two because they're not
even virtual and that doesn't let me any room to play, inheritance,
etc....
There's nothing I could do with RTTI that would do the trick without
modifying MyBase or my_func.
Am I correct?
Thanks
Arkaitz