2020-05-08 07:12 AM
The title says it all. I need to cast a straight container to a MoveAnimator< Container >
I have a function in a base class that extends the container class like so:
hideMenu(MoveAnimator< touchgfx::Container >& menu)
Inside this base class I obviously cannot call MoveAnimator functions, so I would like to cast "this" to a move animator so the base class itself can call its own move animation functions.
2020-05-11 11:21 PM
A more simple approach would maybe be to have a "base" class which is not really a base class but a class that holds a MoveAnimator it can call functions on. Unless you need a baseclass that can, at run-time, cast to any kind of animator (Fade, Move, etc).
/Martin
2020-05-20 09:34 AM
Well, I have a base class that is extended to many other object types. I want to cast the extended classes as move animators to the base class type as a move animator so that the base class functions can operate on the extended classes.