I\'d like to implement a Swift method that takes in a certain class type, but only takes instances of those classes that comply to a specific protocol. For example, in Objec
this method header from ObjC:
- (void)addFilter:(GPUImageOutput *)newFilter { ... }
is identical to this header in Swift:
func addFilter(newFilter: T?) { ... }
both method will accept the same set of classes
GPUImageOutput class; andGPUImageInput protocol; andnewFilter is optional, it can be nil;