title: iPhone Objective-C foreach design
body: <p>I'm trying to implement a design as follows:</p>
  
  <p><code>Touch</code> class : acts as an interface, several classes inherit from it:<br>
  <code>MoveTouch</code> class<br>
  <code>JumpTouch</code> class<br>
  <code>InterfaceTouch</code> class</p>
  
  <p>Then I want to have a list of <code>Touch</code> objects.  I then want to be able to strip out all the <code>MoveTouch</code> objects ONLY (not the other ones), and then all the <code>JumpTouch</code> objects separately, etc., out of this big list.  Unfortunately, <code>for (MoveTouch* t in touches)</code> does not do what I want; everything in the entire list gets acted upon.</p>