title: How do I use AS with a switch in swift to get the class type
body: <p>I have an array of <code>SomeClass</code> which is the super class of various other classes.<br>
  The array has all of those random classes in it.<br>
  Is there a way using switch (as opposed to <code>else if let something = elm as? TheSubClassType</code>)</p>
  
  <p>In pseudo code:</p>
  
  <pre><code>for AObjectOfTypeSomeClass in MyBigArray{
    switch the_type_of(AObjectOfTypeSomeClass){
      case SubClass1:
          let O = AObjectOfTypeSomeClass as! SubClass1
      ...
      ...
      ...
    }
  }
  </code></pre>