Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <OperationQueue.h>
OperationQueues provide a thread of execution for Operations.
Definition at line 44 of file OperationQueue.h.
Properties | |
_Bool | isSuspended |
When true , the queue will not start any new Operations. More... | |
Object | object |
The superclass. More... | |
Condition * | condition |
A condition signaled on addOperation and removeOperation . More... | |
MutableArray * | operations |
The Operations. More... | |
Thread * | thread |
The backing Thread. More... | |
![]() | |
Class * | clazz |
Every instance of Object begins with a pointer to its Class. More... | |
Methods | |
Class * | _OperationQueue (void) |
The OperationQueue archetype. More... | |
void | addOperation (OperationQueue *self, Operation *operation) |
Adds an Operation to this queue. More... | |
void | cancelAllOperations (OperationQueue *self) |
Cancels all pending Operations residing within this Queue. More... | |
OperationQueue * | currentQueue (void) |
OperationQueue * | init (OperationQueue *self) |
Initializes this OperationQueue. More... | |
size_t | operationCount (const OperationQueue *self) |
Array * | operations (const OperationQueue *self) |
void | removeOperation (OperationQueue *self, Operation *operation) |
Removes the Operation from this queue. More... | |
void | waitUntilAllOperationsAreFinished (OperationQueue *self) |
Waits until all Operations submitted to this queue have finished. More... | |
![]() | |
Class * | _Object (void) |
The Object archetype. More... | |
Object * | copy (const Object *self) |
Creates a shallow copy of this Object. More... | |
void | dealloc (Object *self) |
Frees all resources held by this Object. More... | |
String * | description (const Object *self) |
int | hash (const Object *self) |
Object * | init (Object *self) |
Initializes this Object. More... | |
_Bool | isEqual (const Object *self, const Object *other) |
Tests equality of the other Object. More... | |
_Bool | isKindOfClass (const Object *self, const Class *clazz) |
Tests for Class hierarchy membership. More... | |
Protected Attributes | |
OperationQueueInterface * | interface |
The interface. More... | |
![]() | |
ObjectInterface * | interface |
The interface. More... | |
Condition* OperationQueue::condition |
A condition signaled on addOperation
and removeOperation
.
Definition at line 65 of file OperationQueue.h.
|
protected |
The interface.
Definition at line 55 of file OperationQueue.h.
_Bool OperationQueue::isSuspended |
When true
, the queue will not start
any new Operations.
Definition at line 82 of file OperationQueue.h.
Object OperationQueue::object |
The superclass.
Definition at line 49 of file OperationQueue.h.
MutableArray* OperationQueue::operations |
The Operations.
Definition at line 70 of file OperationQueue.h.
Thread* OperationQueue::thread |
The backing Thread.
Definition at line 75 of file OperationQueue.h.
Class * _OperationQueue | ( | void | ) |
The OperationQueue archetype.
Definition at line 252 of file OperationQueue.c.
void addOperation | ( | OperationQueue * | self, |
Operation * | operation | ||
) |
Adds an Operation to this queue.
self | The OperationQueue. |
operation | The Operation to add. |
Definition at line 63 of file OperationQueue.c.
void cancelAllOperations | ( | OperationQueue * | self | ) |
Cancels all pending Operations residing within this Queue.
self | The OperationQueue. |
Definition at line 80 of file OperationQueue.c.
OperationQueue * currentQueue | ( | void | ) |
NULL
if none can be determined. Definition at line 97 of file OperationQueue.c.
OperationQueue * init | ( | OperationQueue * | self | ) |
Initializes this OperationQueue.
self | The OperationQueue. |
NULL
on error. Definition at line 148 of file OperationQueue.c.
size_t operationCount | ( | const OperationQueue * | self | ) |
self | The OperationQueue. |
count
of this OperationQueue's Operations. Definition at line 172 of file OperationQueue.c.
Array * operations | ( | const OperationQueue * | self | ) |
self | The OperationQueue. |
Definition at line 187 of file OperationQueue.c.
void removeOperation | ( | OperationQueue * | self, |
Operation * | operation | ||
) |
Removes the Operation from this queue.
self | The OperationQueue. |
operation | The Operation to remove. |
Definition at line 202 of file OperationQueue.c.
void waitUntilAllOperationsAreFinished | ( | OperationQueue * | self | ) |
Waits until all Operations submitted to this queue have finished.
self | The OperationQueue. |
Definition at line 217 of file OperationQueue.c.