API  1.0.0
CPOperationQueue Class Reference

Represents an operation queue that can run CPOperations. More...

#import <CPOperationQueue.h>

+ Inheritance diagram for CPOperationQueue:

Instance Methods

(void) - addOperation:
 
(void) - addOperations:waitUntilFinished:
 
(void) - addOperationWithFunction:
 
(void) - cancelAllOperations
 
(id) - init
 
(BOOL) - isSuspended
 
(int) - maxConcurrentOperationCount
 
(CPString- name
 
(int) - operationCount
 
(CPArray) - operations
 
(void) - setName:
 
(void) - setSuspended:
 
(void) - waitUntilAllOperationsAreFinished
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPOperationQueue+ currentQueue
 
(CPOperationQueue+ mainQueue
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

Represents an operation queue that can run CPOperations.

Definition at line 2 of file CPOperationQueue.h.

Method Documentation

◆ addOperation:()

- (void) addOperation: (CPOperation anOperation
implementation

Adds the specified operation object to the receiver.

Parameters
anOperationthe operation that should be scheduled for execution

Definition at line 100 of file CPOperationQueue.j.

◆ addOperations:waitUntilFinished:()

- (void) addOperations: (CPArray)  ops
waitUntilFinished: (BOOL)  wait 
implementation

Adds the specified array of operations to the queue.

Parameters
opsThe array of CPOperation objects that you want to add to the receiver.
waitIf YES, the method only returns once all of the specified operations finish executing. If NO, the operations are added to the queue and control returns immediately to the caller.

Definition at line 115 of file CPOperationQueue.j.

◆ addOperationWithFunction:()

- (void) addOperationWithFunction: (JSObject)  aFunction
implementation

Wraps the given js function in a CPOperation and adds it to the queue

Parameters
aFunctionthe JS function to add

Definition at line 134 of file CPOperationQueue.j.

◆ cancelAllOperations()

- (void) cancelAllOperations
implementation

Cancels all queued and executing operations.

Definition at line 157 of file CPOperationQueue.j.

◆ currentQueue()

+ (CPOperationQueue) currentQueue
implementation

Convenience method for one system wide singleton queue. Returns the same queue as mainQueue.

Definition at line 291 of file CPOperationQueue.j.

◆ init()

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 37 of file CPOperationQueue.j.

◆ isSuspended()

- (BOOL) isSuspended
implementation

Returns a Boolean value indicating whether the receiver is scheduling queued operations for execution.

Definition at line 208 of file CPOperationQueue.j.

◆ mainQueue()

+ (CPOperationQueue) mainQueue
implementation

Convenience method for one system wide singleton queue. Returns the same queue as currentQueue.

Definition at line 277 of file CPOperationQueue.j.

◆ maxConcurrentOperationCount()

- (int) maxConcurrentOperationCount
implementation

Returns the maximum number of concurrent operations that the receiver can execute. Always returns 1 because JS doesn't have threads

Definition at line 190 of file CPOperationQueue.j.

◆ name()

- (CPString) name
implementation

Synthesized accessor method.

Provided by category CPOperationQueue(CPSynthesizedAccessors).

Definition at line 303 of file CPOperationQueue.j.

◆ operationCount()

- (int) operationCount
implementation

Definition at line 144 of file CPOperationQueue.j.

◆ operations()

- (CPArray) operations
implementation

Definition at line 139 of file CPOperationQueue.j.

◆ setName:()

- (void) setName: (CPString aValue
implementation

Synthesized accessor method.

Provided by category CPOperationQueue(CPSynthesizedAccessors).

Definition at line 311 of file CPOperationQueue.j.

◆ setSuspended:()

- (void) setSuspended: (BOOL)  suspend
implementation

Modifies the execution of pending operations

Parameters
suspendif YES, queue execution is suspended. If NO, it is resumed

Definition at line 199 of file CPOperationQueue.j.

◆ waitUntilAllOperationsAreFinished()

- (void) waitUntilAllOperationsAreFinished
implementation

Blocks until all of the receiver’s queued and executing operations finish executing.

Definition at line 174 of file CPOperationQueue.j.


The documentation for this class was generated from the following files: