Barcode Xpress Mobile for iOS
|
Defines a class that manages the threads using Barcode Xpress to perform recognition and decoding of images. More...
#import <BXThreadQueue.h>
Public Member Functions | |
(id) | - init |
Initialize an empty thread queue. | |
(id) | - initWithInfo::::: |
Initialize the thread control data structures. | |
(void) | - dispatch: |
Create a new thread to perform recognition on an image, if a thread in the queue is available. | |
(bool) | - canDispatch |
Test to see if there is a slot in the thread queue that is not being used by an active thread. | |
(bool) | - canDispatch: |
Test to see if there is a slot in the thread queue that is not being used by an active thread. | |
Protected Attributes | |
int | m_threadCount |
The maximum number of threads to use. | |
bool * | m_threadUsed |
Boolean array of length m_threadCount. | |
NSLock * | m_captureMutex |
Mutex used to synchronize access to thread control data structures. | |
id | m_sender |
Object instance that will execute callbacks. | |
NSString * | m_name |
Name of the thread queue. Set any arbitrary name. | |
SEL | m_executionCallback |
Callback executed to perform recognition. | |
SEL | m_processingCallback |
Callback executed before recognition is performed. |
Defines a class that manages the threads using Barcode Xpress to perform recognition and decoding of images.
- (bool) canDispatch |
Test to see if there is a slot in the thread queue that is not being used by an active thread.
- (bool) canDispatch: | (int*) | pIndex |
Test to see if there is a slot in the thread queue that is not being used by an active thread.
pIndex | Address of an int that will contain the first available queue slot number if any are not being used by active threads. This return parameter will not be changed if the method returns FALSE. |
- (void) dispatch: | (BXThreadData*) | threadData |
Create a new thread to perform recognition on an image, if a thread in the queue is available.
threadData | This object contains a pointer to an image captured from the video camera, information about the image, and the ID of the thread that this is executing on. See BXThreadData. The image is byte data in YUV420p (planar) format. This format provides grayscale data without having to perform a conversion before calling the Barcode Xpress recognition methods. |
- (id) init |
Initialize an empty thread queue.
Without any callbacks, and with a maximum thread count of zero, it won't be useful. There's no reason to call this method. Call -initWithInfo instead.
- (id) : | (NSString*) | name | |
: | (int) | threadCount | |
: | (id) | sender | |
: | (SEL) | executionCallback | |
: | (SEL) | processingCallback | |
Initialize the thread control data structures.
name | An abitrary name for the thread queue. |
threadCount | Maximum number of active threads. |
sender | Object instance that will execute callbacks. |
executionCallback | Callback executed to perform recognition. |
processingCallback | Callback executed before recognition is performed. |
- (bool*) m_threadUsed [protected] |
Boolean array of length m_threadCount.
Each boolean is TRUE if a thread is currently performing an executionCallback.