I'm trying to implement a design as follows:
Touch class : acts as an interface, several classes inherit from it MoveTouch class inherits JumpTouch class inherits InterfaceTouch class inherits
Then I want to have a list of Touch objects. I then want to be able to strip out all the MoveTouch objects ONLY (not the other ones), and then all the JumpTouch objects separately, etc., out of this big list. Unfortunately, "for (MoveTouch* t in touches)" does not do what I want; everything in the entire list gets acted upon.
Help would be appreciated.