Samond Classes Library 1.1.6-RELEASE build 132

SCQueue Class Reference

Objects queue class. More...

#import <SCQueue.h>

Inheritance diagram for SCQueue:
SCCollection SCObject <SCDictionaryObjectProtocol> <SCCodingProtocol> <SCStreamProtocol> <SCCollectionProtocol>

List of all members.

Public Member Functions

Initializing Queue
(id) - init
(id) - initWithQueueName:capacity:reusable:
(id) - initWithQueueName:capacity:
(id) - initWithQueueName:
(id) - initWithCapacity:reusable:
(id) - initWithCapacity:
(id) - initWithDelegate:
(id) - initWithDelegate:collection:
(id) - initWithCollection:
(id) - initWithDelegate:object:
(id) - initWithObject:
(id) - initWithDelegate:objects:
(id) - initWithObjects:
(id) - initWithQueue:
Querying and Setting Queue Properties
(NSString *) - queueName
(BOOL) - isReusable
(void) - setQueueName:
(void) - setReusable:
Querying Queue
(id) - firstObject
(NSString *) - firstString
(NSNumber *) - firstNumber
(SCByte- firstByte
(SCUByte- firstUByte
(SCShort- firstShort
(SCUShort- firstUShort
(SCInteger- firstInteger
(SCUInteger- firstUInteger
(SCLong- firstLong
(SCULong- firstULong
(char) - firstChar
(unichar) - firstUnichar
(const char *) - firstCharString
(BOOL) - firstBool
(SCFloat- firstFloat
(SCDouble- firstDouble
Getting and Removing Objects
(id) - getAndRemoveObject
(NSString *) - getAndRemoveString
(NSNumber *) - getAndRemoveNumber
(SCByte- getAndRemoveByte
(SCUByte- getAndRemoveUByte
(SCShort- getAndRemoveShort
(SCUShort- getAndRemoveUShort
(SCInteger- getAndRemoveInteger
(SCUInteger- getAndRemoveUInteger
(SCLong- getAndRemoveLong
(SCULong- getAndRemoveULong
(char) - getAndRemoveChar
(unichar) - getAndRemoveUnichar
(const char *) - getAndRemoveCharString
(BOOL) - getAndRemoveBool
(SCFloat- getAndRemoveFloat
(SCDouble- getAndRemoveDouble
Removing Objects
(void) - removeFirstObject
(void) - removeLastObject
Copying Objects
(void) - duplicateFirstObject
(void) - duplicateLastObject

Static Public Member Functions

Creating Queue
(SCQueue *) + queueWithDataDictionary:
(SCQueue *) + queueWithDataDictionaryFromFile:
(SCQueue *) + queueWithCoder:
(SCQueue *) + queueWithContentsOfSerializedFile:
(SCQueue *) + queueWithStream:
(SCQueue *) + queueWithFileStream:
(SCQueue *) + queue
(SCQueue *) + queueWithQueueName:capacity:reusable:
(SCQueue *) + queueWithQueueName:capacity:
(SCQueue *) + queueWithQueueName:
(SCQueue *) + queueWithCapacity:reusable:
(SCQueue *) + queueWithCapacity:
(SCQueue *) + queueWithDelegate:
(SCQueue *) + queueWithDelegate:collection:
(SCQueue *) + queueWithCollection:
(SCQueue *) + queueWithDelegate:object:
(SCQueue *) + queueWithObject:
(SCQueue *) + queueWithDelegate:objects:
(SCQueue *) + queueWithObjects:
(SCQueue *) + queueWithQueue:

Detailed Description

Objects queue class.

Class represents the objects queue - collection, in which the items are stored in a manner discordant with the order of adding, with access only to the first of the added items.
Class was intriduced in version 1.1.3.

Class declares the following properties:


Member Function Documentation

- (void) duplicateFirstObject

Duplicates the first object within the receiving queue.

Exceptions:
SCCollectionException- queue error detected
- (void) duplicateLastObject

Duplicates the last object within the receiving queue.

Exceptions:
SCCollectionException- queue error detected
- (BOOL) firstBool

Returns as a boolean value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCByte) firstByte

Returns as a signed 8-bit integer value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (char) firstChar

Returns as a char value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (const char *) firstCharString

Returns as a char string the first object from the receiving queue.

Returns:
First string from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCDouble) firstDouble

Returns as a double precision float value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCFloat) firstFloat

Returns as a single precision float value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCInteger) firstInteger

Returns as a signed 32-bit integer value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCLong) firstLong

Returns as a signed 64-bit integer value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (NSNumber *) firstNumber

Returns as a number the first object from the receiving queue.

Returns:
First number or nil if queue is empty
Exceptions:
SCCollectionException- queue error detected
- (id) firstObject

Returns the first object from the receiving queue.

Returns:
First object or nil if queue is empty
- (SCShort) firstShort

Returns as a signed 16-bit integer value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (NSString *) firstString

Returns as a string the first object from the receiving queue.

Returns:
First string or nil if queue is empty
Exceptions:
SCCollectionException- queue error detected
- (SCUByte) firstUByte

Returns as an unsigned 8-bit integer value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCUInteger) firstUInteger

Returns as an unsigned 32-bit integer value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCULong) firstULong

Returns as an unsigned 64-bit integer value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (unichar) firstUnichar

Returns as an unichar value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCUShort) firstUShort

Returns as an unsigned 16-bit integer value the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (BOOL) getAndRemoveBool

Returns as a boolean value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCByte) getAndRemoveByte

Returns as a signed 8-bit integer value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (char) getAndRemoveChar

Returns as a char value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (const char *) getAndRemoveCharString

Returns as a char string and removes the first object from the receiving queue.

Returns:
First string from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCDouble) getAndRemoveDouble

Returns as a double precision float value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCFloat) getAndRemoveFloat

Returns as a single precision float value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCInteger) getAndRemoveInteger

Returns as a signed 32-bit integer value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCLong) getAndRemoveLong

Returns as a signed 64-bit integer value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (NSNumber *) getAndRemoveNumber

Returns as a number and removes the first object from the receiving queue.

Returns:
First number or nil if queue is empty
Exceptions:
SCCollectionException- queue error detected
- (id) getAndRemoveObject

Returns and removes the first object from the receiving queue.

Returns:
First object or nil if queue is empty
Exceptions:
SCCollectionException- queue error detected
- (SCShort) getAndRemoveShort

Returns as a signed 16-bit integer value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (NSString *) getAndRemoveString

Returns as a string and removes the first object from the receiving queue.

Returns:
First string or nil if queue is empty
Exceptions:
SCCollectionException- queue error detected
- (SCUByte) getAndRemoveUByte

Returns as an unsigned 8-bit integer value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCUInteger) getAndRemoveUInteger

Returns as an unsigned 32-bit integer value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCULong) getAndRemoveULong

Returns as an unsigned 64-bit integer value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (unichar) getAndRemoveUnichar

Returns as an unichar value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (SCUShort) getAndRemoveUShort

Returns as an unsigned 16-bit integer value and removes the first object from the receiving queue.

Returns:
First value from the receiving queue
Exceptions:
SCCollectionException- queue error detected
- (id) init

Initializes the queue using the default settings.

Returns:
A newly initialized queue

Reimplemented from SCCollection.

- (id) initWithCapacity: (SCULong capacity

Initializes the queue using the specified queue capacity.

Parameters:
capacity- queue capacity
Returns:
A newly initialized queue
- (id) initWithCapacity: (SCULong capacity
reusable: (BOOL)  reusable 

Initializes the queue using the specified queue capacity and reusing flag.

Parameters:
capacity- queue capacity
reusable- reusing flag
Returns:
A newly initialized queue
- (id) initWithCollection: (id)  collection

Initializes the queue using the specified existing collection.

Parameters:
collection- existing source collection
Returns:
A newly initialized queue
Exceptions:
SCCollectionException- queue error detected
- (id) initWithDelegate: (id<SCCollectionDelegate>)  delegate

Initializes the queue using the specified delegate object.

Parameters:
delegate- delegate object
Returns:
A newly initialized queue
- (id) initWithDelegate: (id<SCCollectionDelegate>)  delegate
collection: (id)  collection 

Initializes the queue using the specified delegate object and existing collection.

Parameters:
delegate- delegate object
collection- existing source collection
Returns:
A newly initialized queue
Exceptions:
SCCollectionException- queue error detected
- (id) initWithDelegate: (id<SCCollectionDelegate>)  delegate
object: (id)  object 

Initializes the queue using the specified delegate object and existing object.

Parameters:
delegate- delegate object
object- existing source object
Returns:
A newly initialized queue
Exceptions:
SCCollectionException- queue error detected
- (id) initWithDelegate: (id<SCCollectionDelegate>)  delegate
objects: (id)  object
,   ... 

Initializes the queue using the specified delegate objects and nil terminated list of existing objects.

Parameters:
delegate- delegate object
object- first object
...- other objects
Returns:
A newly initialized queue
Exceptions:
SCCollectionException- queue error detected
- (id) initWithObject: (id)  object

Initializes the queue using the specified existing object.

Parameters:
object- existing source object
Returns:
A newly initialized queue
Exceptions:
SCCollectionException- queue error detected
- (id) initWithObjects: (id)  object
,   ... 

Initializes the queue using the specified nil terminated list of existing objects.

Parameters:
object- first object
...- other objects
Returns:
A newly initialized queue
Exceptions:
SCCollectionException- queue error detected
- (id) initWithQueue: (SCQueue *)  queue

Initializes the queue using the specified existing queue.

Parameters:
queue- existing source queue
Returns:
A newly initialized queue
Exceptions:
SCCollectionException- queue error detected
- (id) initWithQueueName: (NSString *)  name

Initializes the queue using the specified queue name.

Parameters:
name- queue name
Returns:
A newly initialized queue
- (id) initWithQueueName: (NSString *)  name
capacity: (SCULong capacity 

Initializes the queue using the specified queue name and capacity.

Parameters:
name- queue name
capacity- queue capacity
Returns:
A newly initialized queue
- (id) initWithQueueName: (NSString *)  name
capacity: (SCULong capacity
reusable: (BOOL)  reusable 

Initializes the queue using the specified queue name, capacity and reusing flag.

Parameters:
name- queue name
capacity- queue capacity
reusable- reusing flag
Returns:
A newly initialized queue
- (BOOL) isReusable

Returns the receiver's queue reusing flag.

Returns:
YES if the queue supports reusing, otherwise NO
+ (SCQueue *) queue

Returns the queue created by using the default settings.

Returns:
A created queue

Reimplemented from SCCollection.

- (NSString *) queueName

Returns the receiving queue name.

Returns:
Queue name
+ (SCQueue *) queueWithCapacity: (SCULong capacity

Returns the queue created by using the specified queue capacity.

Parameters:
capacity- queue capacity
Returns:
A created queue
+ (SCQueue *) queueWithCapacity: (SCULong capacity
reusable: (BOOL)  reusable 

Returns the queue created by using the specified queue capacity and reusing flag.

Parameters:
capacity- queue capacity
reusable- reusing flag
Returns:
A created queue
+ (SCQueue *) queueWithCoder: (NSCoder *)  coder

Returns a queue created by using the specified coder.

Parameters:
coder- source coder
Returns:
A created queue
+ (SCQueue *) queueWithCollection: (id)  collection

Returns the queue created by using the specified existing collection.

Parameters:
collection- existing source collection
Returns:
A created queue
Exceptions:
SCCollectionException- queue error detected
+ (SCQueue *) queueWithContentsOfSerializedFile: (NSString *)  path

Returns a queue created by using the contents of serialized file with the specified path.

Parameters:
path- source serialized file path
Returns:
A created queue
+ (SCQueue *) queueWithDataDictionary: (NSDictionary *)  dictionary

Returns a queue created by using the specified dictionary.

Parameters:
dictionary- source dictionary
Returns:
A created queue
+ (SCQueue *) queueWithDataDictionaryFromFile: (NSString *)  path

Returns a queue created by using the dictionary from the specified file.

Parameters:
path- source dictionary file path
Returns:
A created queue
+ (SCQueue *) queueWithDelegate: (id<SCCollectionDelegate>)  delegate

Returns the queue created by using the specified delegate object.

Parameters:
delegate- delegate object
Returns:
A created queue
+ (SCQueue *) queueWithDelegate: (id<SCCollectionDelegate>)  delegate
collection: (id)  collection 

Returns the queue created by using the specified delegate object and existing collection.

Parameters:
delegate- delegate object
collection- existing source collection
Returns:
A created queue
Exceptions:
SCCollectionException- queue error detected
+ (SCQueue *) queueWithDelegate: (id<SCCollectionDelegate>)  delegate
object: (id)  object 

Returns the queue created by using the specified delegate object and existing object.

Parameters:
delegate- delegate object
object- existing source object
Returns:
A created queue
Exceptions:
SCCollectionException- queue error detected
+ (SCQueue *) queueWithDelegate: (id<SCCollectionDelegate>)  delegate
objects: (id)  object
,   ... 

Returns the queue created by using the specified delegate objects and nil terminated list of existing objects.

Parameters:
delegate- delegate object
object- first object
...- other objects
Returns:
A created queue
Exceptions:
SCCollectionException- queue error detected
+ (SCQueue *) queueWithFileStream: (NSString *)  path

Returns a queue created from the stream file with the specified path.

Parameters:
path- stream file path
Returns:
A created queue
Exceptions:
SCStreamException- stream operation error detected
+ (SCQueue *) queueWithObject: (id)  object

Returns the queue created by using the specified existing object.

Parameters:
object- existing source object
Returns:
A created queue
Exceptions:
SCCollectionException- queue error detected
+ (SCQueue *) queueWithObjects: (id)  object
,   ... 

Returns the queue created by using the specified nil terminated list of existing objects.

Parameters:
object- first object
...- other objects
Returns:
A created queue
Exceptions:
SCCollectionException- queue error detected
+ (SCQueue *) queueWithQueue: (SCQueue *)  queue

Returns the queue created by using the specified existing queue.

Parameters:
queue- existing source queue
Returns:
A created queue
Exceptions:
SCCollectionException- queue error detected
+ (SCQueue *) queueWithQueueName: (NSString *)  name

Returns the queue created by using the specified queue name.

Parameters:
name- queue name
Returns:
A created queue
+ (SCQueue *) queueWithQueueName: (NSString *)  name
capacity: (SCULong capacity 

Returns the queue created by using the specified queue name and capacity.

Parameters:
name- queue name
capacity- queue capacity
Returns:
A created queue
+ (SCQueue *) queueWithQueueName: (NSString *)  name
capacity: (SCULong capacity
reusable: (BOOL)  reusable 

Returns the queue created by using the specified queue name, capacity and reusing flag.

Parameters:
name- queue name
capacity- queue capacity
reusable- reusing flag
Returns:
A created queue
+ (SCQueue *) queueWithStream: (SCStream *)  stream

Returns a queue created from the specified stream.

Parameters:
stream- stream for reading queue
Returns:
A created queue
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (void) removeFirstObject

Remove the first object from the receiving queue.

Exceptions:
SCCollectionException- queue error detected
- (void) removeLastObject

Remove the last object from the receiving queue.

Exceptions:
SCCollectionException- queue error detected
- (void) setQueueName: (NSString *)  name

Sets the receiving queue name.

Parameters:
name- queue name
- (void) setReusable: (BOOL)  reusable

Sets the receiver's queue reusing flag.

Parameters:
reusableYES for reusing supporting, otherwise NO

The documentation for this class was generated from the following files:
 All Classes Files Functions Typedefs Enumerations Enumerator Defines