CPOperation Class Reference

Represents an operation that can be run in an CPOperationQueue. More...

List of all members.

Public Member Functions

(void) - addDependency: [implementation]
(void) - cancel [implementation]
(JSObject) - completionFunction [implementation]
(CPArray- dependencies [implementation]
(id) - init [implementation]
(BOOL) - isCancelled [implementation]
(BOOL) - isConcurrent [implementation]
(BOOL) - isExecuting [implementation]
(BOOL) - isFinished [implementation]
(BOOL) - isReady [implementation]
(void) - main [implementation]
(void) - observeValueForKeyPath:ofObject:change:context: [implementation]
(int) - queuePriority [implementation]
(void) - removeDependency: [implementation]
(void) - setCompletionFunction: [implementation]
(void) - setQueuePriority: [implementation]
(void) - start [implementation]
(void) - waitUntilFinished [implementation]

Detailed Description

Represents an operation that can be run in an CPOperationQueue.

It should be subclassed an the subclass should implement its own main method to do the actual work.

Definition at line 66 of file CPOperation.j.


Member Function Documentation

- (void) addDependency: (CPOperation anOperation   [implementation]

Makes the receiver dependent on the completion of the specified operation.

Parameters:
anOperation the operation that the receiver should depend on

Definition at line 188 of file CPOperation.j.

- (void) cancel   [implementation]

Advises the operation object that it should stop executing its task.

Definition at line 233 of file CPOperation.j.

- (JSObject) completionFunction   [implementation]

The JS function that should be run after the main method

Returns:
JS function

Definition at line 171 of file CPOperation.j.

- (CPArray) dependencies   [implementation]

The operations that the receiver depends on

Returns:
array of operations

Definition at line 218 of file CPOperation.j.

- (id) init   [implementation]

Definition at line 84 of file CPOperation.j.

- (BOOL) isCancelled   [implementation]

Indicates if this operation has been cancelled

Returns:
if this operation has been cancelled

Definition at line 126 of file CPOperation.j.

- (BOOL) isConcurrent   [implementation]

Just added for Cocoa compatibility

Returns:
always false

Definition at line 153 of file CPOperation.j.

- (BOOL) isExecuting   [implementation]

Indicates if this operation is currently executing

Returns:
if this operation is currently executing

Definition at line 135 of file CPOperation.j.

- (BOOL) isFinished   [implementation]

Indicates if this operation has finished running

Returns:
if this operation has finished running

Definition at line 144 of file CPOperation.j.

- (BOOL) isReady   [implementation]

Indicates if this operation is ready to be executed. Takes the "isFinished" state of dependent operations into account

Returns:
if this operation is ready to run

Definition at line 162 of file CPOperation.j.

- (void) main   [implementation]

Definition at line 79 of file CPOperation.j.

- (void) observeValueForKeyPath: (CPString keyPath
ofObject: (id)  object
change: (CPDictionary change
context: (void)  context 
[implementation]

Definition at line 259 of file CPOperation.j.

- (int) queuePriority   [implementation]

The priority of the operation when used in an operation queue.

Returns:
the priority

Definition at line 253 of file CPOperation.j.

- (void) removeDependency: (CPOperation anOperation   [implementation]

Removes the receiver’s dependence on the specified operation.

Parameters:
anOperation the operation that the receiver should no longer depend on

Definition at line 204 of file CPOperation.j.

- (void) setCompletionFunction: (JSObject)  aJavaScriptFunction   [implementation]

Sets the JS function that should be run after the main method

Definition at line 179 of file CPOperation.j.

- (void) setQueuePriority: (int)  priority   [implementation]

Sets the priority of the operation when used in an operation queue.

Parameters:
priority the priority

Definition at line 244 of file CPOperation.j.

- (void) start   [implementation]

Starts the operation (runs the main method), sets all the status flags and runs the completion function if it's set

Definition at line 101 of file CPOperation.j.

- (void) waitUntilFinished   [implementation]

Just added for Cocoa compatibility, doesn't do anything

Definition at line 226 of file CPOperation.j.


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

Generated on Fri Apr 9 11:04:21 2010 for Cappuccino API by  doxygen 1.6.1