Modified plugin logic so one class can be multiple plugin types.
parent
b5b5b45eda
commit
d7ddda160e
|
@ -71,21 +71,18 @@ static PluginController *sharedPluginController = nil;
|
||||||
if ([bundleClass conformsToProtocol:@protocol(CogContainer)]) {
|
if ([bundleClass conformsToProtocol:@protocol(CogContainer)]) {
|
||||||
[self setupContainer:className];
|
[self setupContainer:className];
|
||||||
}
|
}
|
||||||
else if ([bundleClass conformsToProtocol:@protocol(CogDecoder)]) {
|
if ([bundleClass conformsToProtocol:@protocol(CogDecoder)]) {
|
||||||
[self setupDecoder:className];
|
[self setupDecoder:className];
|
||||||
}
|
}
|
||||||
else if ([bundleClass conformsToProtocol:@protocol(CogMetadataReader)]) {
|
if ([bundleClass conformsToProtocol:@protocol(CogMetadataReader)]) {
|
||||||
[self setupMetadataReader:className];
|
[self setupMetadataReader:className];
|
||||||
}
|
}
|
||||||
else if ([bundleClass conformsToProtocol:@protocol(CogPropertiesReader)]) {
|
if ([bundleClass conformsToProtocol:@protocol(CogPropertiesReader)]) {
|
||||||
[self setupPropertiesReader:className];
|
[self setupPropertiesReader:className];
|
||||||
}
|
}
|
||||||
else if ([bundleClass conformsToProtocol:@protocol(CogSource)]) {
|
if ([bundleClass conformsToProtocol:@protocol(CogSource)]) {
|
||||||
[self setupSource:className];
|
[self setupSource:className];
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
NSLog(@"Unknown plugin type!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue