ALViewPluginComposite Class Reference
Inherits from | NSObject |
---|---|
Conforms to | ALScanViewPluginBase |
Declared in | ALViewPluginComposite.h |
Overview
A plugin composite holds children scan view plugins to run them simultaneously or in sequence. Once all results for children plugins have been reported, its delegate would be called to find the aggregated scan results.
delegate
Delegate informing the user when the scanning has concluded for all of the children, or if there is an error encountered.
@property (nonatomic, weak) id<ALViewPluginCompositeDelegate> delegate
Declared In
ALViewPluginComposite.h
processingMode
The processing mode of the composite
@property (nonatomic, readonly) ALCompositeProcessingMode processingMode
Declared In
ALViewPluginComposite.h
isStarted
Indicates whether the plugin composite has started or not
@property (nonatomic, readonly) BOOL isStarted
Declared In
ALViewPluginComposite.h
pluginID
The unique ID of the composite (note: each child plugin should have unique IDs as well)
@property (nonatomic, readonly) NSString *pluginID
Declared In
ALViewPluginComposite.h
children
A list of the children plugins added to this composite
@property (nonatomic, readonly) NSArray<NSObject<ALScanViewPluginBase> *> *children
Declared In
ALViewPluginComposite.h
activeChild
The child ScanViewPlugin currently running
@property (nonatomic, readonly, nullable) ALScanViewPlugin *activeChild
Declared In
ALViewPluginComposite.h
pluginConfigs
A map of the scan view plugin configs of each child
@property (nonatomic, readonly) NSDictionary<NSString*ALScanViewPluginConfig*> *pluginConfigs
Declared In
ALViewPluginComposite.h
JSONDictionary
An NSDictionary
representation of the composite, that can be used to initialize another
@property (nonatomic, readonly) NSDictionary *JSONDictionary
Declared In
ALViewPluginComposite.h
– initWithJSONDictionary:error:
Initializes an ALViewPluginComposite
with a suitably-structured dictionary
- (instancetype _Nullable)initWithJSONDictionary:(NSDictionary *_Nonnull)JSONDictionary error:(NSError *_Nullable *_Nullable)error
Parameters
JSONDictionary |
a dictionary holding a representation of the composite, including child scan view plugins |
---|---|
error |
an error object that is filled if the initialization fails |
Return Value
the ALViewPluginComposite
object
Declared In
ALViewPluginComposite.h
– initWithID:mode:children:error:
Initializes an ALViewPluginComposite
- (instancetype _Nullable)initWithID:(NSString *)ID mode:(ALCompositeProcessingMode)mode children:(NSArray<NSObject<ALScanViewPluginBase> *> *)children error:(NSError **)error
Parameters
ID |
the ID of the composite |
---|---|
mode |
the processing mode of the composite |
children |
a list of the children scan view plugins |
error |
an error object that is filled if the initialization fails |
Return Value
the ALViewPluginComposite
object
Declared In
ALViewPluginComposite.h
– pluginWithID:
Returns a child scan view plugin given its ID, or null
- (NSObject<ALScanViewPluginBase> *_Nullable)pluginWithID:(NSString *)pluginID
Parameters
pluginID |
the ID of the child scan view plugin |
---|
Return Value
the ScanViewPlugin of the child when found, otherwise null
Declared In
ALViewPluginComposite.h
– startWithError:
Starts the plugin
- (BOOL)startWithError:(NSError *_Nullable *_Nullable)error
Parameters
error |
if an error is encountered, this will be filled with the necessary information |
---|
Return Value
a boolean indicating whether or not the plugin was started successfully
Declared In
ALViewPluginComposite.h