Samond Classes Library 1.2.0-RELEASE build 166
|
Queue of objects class. More...
#import <SCQueue.h>
Creating Queues | |
(SCQueue *) | + queueWithCoder: |
(SCQueue *) | + queueWithContentsOfSerializedFile: |
(SCQueue *) | + queueWithDataDictionary: |
(SCQueue *) | + queueWithDataDictionaryFromFile: |
(SCQueue *) | + queueWithStream: |
(SCQueue *) | + queueWithFileStream: |
(SCQueue *) | + queueWithName: |
(SCQueue *) | + queueWithObject: |
(SCQueue *) | + queueWithObjects: |
(SCQueue *) | + queueWithCollection: |
(SCQueue *) | + queueWithQueue: |
(SCQueue *) | + queue |
Initializing Queues | |
(id) | - initWithName: |
(id) | - initWithObject: |
(id) | - initWithObjects: |
(id) | - initWithCollection: |
(id) | - initWithQueue: |
(id) | - init |
Copying Queues | |
(void) | - setQueue: |
Comparing Queues | |
(BOOL) | - isEqualToQueue: |
(BOOL) | - isEqualToContentsOfQueue: |
Getting Objects | |
(id) | - getObject |
(NSString *) | - getString |
(NSNumber *) | - getNumber |
(SCByte) | - getByte |
(SCUByte) | - getUByte |
(SCShort) | - getShort |
(SCUShort) | - getUShort |
(SCInteger) | - getInteger |
(SCUInteger) | - getUInteger |
(SCLong) | - getLong |
(SCULong) | - getULong |
(char) | - getChar |
(unichar) | - getUnichar |
(const char *) | - getCharString |
(BOOL) | - getBool |
(SCFloat) | - getFloat |
(SCDouble) | - getDouble |
Removing Objects | |
(void) | - removeFirstObject |
(void) | - removeLastObject |
Copying Objects | |
(void) | - duplicateFirstObject |
(void) | - duplicateLastObject |
Querying a Queue | |
id | firstObject |
NSString * | firstString |
NSNumber * | firstNumber |
Queue of objects class.
Queue is a collection in which to objects in collection are kept in order and the principal (or only) operations on the collection are the addition of objects to the rear terminal position, known as enqueue, and removal of objects from the front terminal position, known as desqueue.
This makes the queue a First-In-First-Out (FIFO) collection. In queue, the first object added to the queue will be the first one to be removed. This is equivalent to the requirement that once a new object is added, all objects that were added before have to be removed before the new object can be removed.
Often a peek, front or get operation is also entered, returning the value of the front object without dequeuing it. A queue is an example of an abstractly a sequental collection.
Class instances can thrown the following exceptions:
- (void) duplicateFirstObject |
Duplicates the first object within the receiving queue.
SCCollectionException | - collection error detected |
- (void) duplicateLastObject |
Duplicates the last added into the receiving queue object.
SCCollectionException | - collection error detected |
- (BOOL) getBool |
Returns and removes the first object from the receiving queue as a boolean value.
SCCollectionException | - collection error detected |
- (SCByte) getByte |
Returns and removes the first object from the receiving queue as a signed 8-bit integer value.
SCCollectionException | - collection error detected |
- (char) getChar |
Returns and removes the first object from the receiving queue as a character.
SCCollectionException | - collection error detected |
- (const char *) getCharString |
Returns and removes the first object from the receiving queue as a character string.
SCCollectionException | - collection error detected |
- (SCDouble) getDouble |
Returns and removes the first object from the receiving queue as a double value.
SCCollectionException | - collection error detected |
- (SCFloat) getFloat |
Returns and removes the first object from the receiving queue as a float value.
SCCollectionException | - collection error detected |
- (SCInteger) getInteger |
Returns and removes the first object from the receiving queue as a signed 32-bit integer value.
SCCollectionException | - collection error detected |
- (SCLong) getLong |
Returns and removes the first object from the receiving queue as a signed 64-bit integer value.
SCCollectionException | - collection error detected |
- (NSNumber *) getNumber |
Returns and removes the first object from the receiving queue as a number.
SCCollectionException | - collection error detected |
- (id) getObject |
Returns and removes the first object from the receiving queue.
SCCollectionException | - collection error detected |
- (SCShort) getShort |
Returns and removes the first object from the receiving queue as a signed 16-bit integer value.
SCCollectionException | - collection error detected |
- (NSString *) getString |
Returns and removes the first object from the receiving queue as a string.
SCCollectionException | - collection error detected |
- (SCUByte) getUByte |
Returns and removes the first object from the receiving queue as an unsigned 8-bit integer value.
SCCollectionException | - collection error detected |
- (SCUInteger) getUInteger |
Returns and removes the first object from the receiving queue as an unsigned 32-bit integer value.
SCCollectionException | - collection error detected |
- (SCULong) getULong |
Returns and removes the first object from the receiving queue as an unsigned 64-bit integer value.
SCCollectionException | - collection error detected |
- (unichar) getUnichar |
Returns and removes the first object from the receiving queue as a character.
SCCollectionException | - collection error detected |
- (SCUShort) getUShort |
Returns and removes the first object from the receiving queue as an unsigned 16-bit integer value.
SCCollectionException | - collection error detected |
- (id) init |
Initializes an empty unnamed queue.
- (id) initWithCollection: | (id) | collection |
Initializes a newly allocated queue with objects from the specified collection of any supported type.
collection | - a collection with objects to add into the queue |
SCCollectionException | - collection error detected |
Reimplemented from SCCollection.
- (id) initWithName: | (NSString *) | name |
Initializes an empty queue using the specified queue name.
name | - the queue name |
- (id) initWithObject: | (id) | object |
Initializes a newly allocated queue containing a given object.
object | - the object to adding into the queue |
- (id) initWithObjects: | (id) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Initializes a newly allocated queue containing objects from the specified list.
object | - the first object to add into the queue |
... | - a null-terminated list of alternating object to add into the queue |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
- (id) initWithQueue: | (SCQueue *) | queue |
Initializes a newly allocated queue by placing in it the objects contained in another given queue.
queue | - a queue containing the objects with which to initialized the new queue |
SCCollectionException | - collection error detected |
- (BOOL) isEqualToContentsOfQueue: | (SCQueue *) | queue |
Returns a boolean value that indicates whether the contents of the receiving queue are equal to the contents of another given queue.
queue | - the queue with which to compate the receiving queue |
- (BOOL) isEqualToQueue: | (SCQueue *) | queue |
Returns a boolean value that indicates whether the settings and contents of the receiving queue are equal to the settings and contents of another given queue.
queue | - the queue with which to compare the receiving queue |
+ (SCQueue *) queue |
+ (SCQueue *) queueWithCoder: | (NSCoder *) | coder |
Returns a queue created by using the specified coder.
coder | - the source coder |
+ (SCQueue *) queueWithCollection: | (id) | collection |
Returns a queue created by using the objects from the specified collection of any supported type.
collection | - the existing source collection |
SCCollectionException | - collection error detected |
+ (SCQueue *) queueWithContentsOfSerializedFile: | (NSString *) | path |
Returns a queue created by using the content of the serialized file with the specified file.
path | - the path of the source serialized file |
+ (SCQueue *) queueWithDataDictionary: | (NSDictionary *) | dictionary |
Returns a queue created by using the specified data dictionary.
dictionary | - the source data dictionary |
+ (SCQueue *) queueWithDataDictionaryFromFile: | (NSString *) | path |
Returns a queue created by using the data dictionary from the specified file.
path | - the path of the source data dictionary file |
+ (SCQueue *) queueWithFileStream: | (NSString *) | path |
Returns a queue created by using the data from the file stream with the specified path.
path | - the path to the source file stream |
SCStreamException | - stream error detected |
SCSystemException | - system error detected |
+ (SCQueue *) queueWithName: | (NSString *) | name |
Returns an empty queue created by using the specified queue name.
name | - the name of the new queue |
+ (SCQueue *) queueWithObject: | (id) | object |
Creates and returns a queue containing a given object.
object | - the object to adding into the queue |
+ (SCQueue *) queueWithObjects: | (id) | object | |
, | NS_REQUIRES_NIL_TERMINATION | ||
Creates and returns a queue containing the objects from the specified list.
object | - the first object to add into the new queue |
... | - a null-terminated list of alternating objects to add into the new queue |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
Creates and returns a queue containing objects from another given queue.
queue | - a queue containing the objects with which to initializes a new queue |
SCCollectionException | - collection error detected |
Returns a queue created by using the data from the specified stream.
stream | - the source stream |
SCStreamException | - stream error detected |
SCSystemException | - system error detected |
- (void) removeFirstObject |
Removes the first object from the receiving queue.
SCCollectionException | - collection error detected |
- (void) removeLastObject |
Removes the last added object from the receiving queue.
SCCollectionException | - collection error detected |
- (void) setQueue: | (SCQueue *) | queue |
Sets the settings and contents of the receiving queue to settings and objects in a given queue.
queue | - the source queue |
SCCollectionException | - collection error detected |
|
readnonatomicretain |
The first object within the queue as a number
|
readnonatomicretain |
The first object within the queue
|
readnonatomicretain |
The first object within the queue as a string