title: Passing a Class object to a function in Objective C - with restrictions on the classes that it represents?
body: <p>(I probably didn't phrase that very well!)</p>
  
  <p>I'd like to pass a Class object into an Objective C function:</p>
  
  <pre><code>-(void)someMethod:(Class *)classObject { ...
  </code></pre>
  
  <p>And, if I want to restrict the parameter to classes who implement a particular protocol, I know I can do this:</p>
  
  <pre><code>-(void)someMethod:(Class&lt;SomeProtocol&gt; *)classObject { ...
  </code></pre>
  
  <p>But is it possible to do the same for Classes instead of Protocols?</p>
  
  <p>To use the classic "I have a Dog class which extends Animal" example, can I restrict the parameter to accept [Animal class] and [Dog class], but not [Cheese class]?</p>
  
  <p>Thanks in advance!
   Matthew</p>