Class for support the bidirectional lists of objects.
More...
#import <SCBidirectionalList.h>
Class for support the bidirectional lists of objects.
- Since
- version 1.1.3
In the bidirectional list each object node contains, besides the next-node link, a seconf link field pointing to the previous node in the sequence. The two links may be called forwards and backwards, or next and prev.
Class SCBidirectionalList provides changing the current object pointer in two directions - from current object to the next object and from current to the previous object. Additionally, class SCBidirectionalList declares the methods for accessing to the list last object.
Class instances can thrown the following exceptions:
- (void) duplicateLastObject |
|
|
|
Duplicates the first object within the receiving list.
- Exceptions
-
- (void) insertLastBool: |
|
(BOOL) |
value |
|
Inserts a given boolean value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastByte: |
|
(SCByte) |
value |
|
Inserts a given signed 8-bit integer value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastChar: |
|
(char) |
value |
|
Inserts a given character into the receiving list before the last object.
- Parameters
-
value | - the character to add into the list |
- Exceptions
-
- See also
- - insertLastUnichar:
- (void) insertLastCharString: |
|
(const char *) |
string |
|
Inserts a given character string into the receiving list before the last object.
- Parameters
-
string | - the character string to add into the list |
- Exceptions
-
- (void) insertLastCollection: |
|
(id) |
collection |
|
Inserts the objects from the specified collection into the receiving list before the last object.
- Parameters
-
collection | - the collection of objects to add into the receiving list |
- Exceptions
-
- (void) insertLastDouble: |
|
(SCDouble) |
value |
|
Inserts a given double value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastFloat: |
|
(SCFloat) |
value |
|
Inserts a given float value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastInteger: |
|
(SCInteger) |
value |
|
Inserts a given signed 32-bit integer value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastLong: |
|
(SCLong) |
value |
|
Inserts a given signed 64-bit integer value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastObject: |
|
(id) |
object |
|
Inserts a given object into the receiving list before the last object.
- Parameters
-
object | - the object to add into the list |
- Exceptions
-
- (void) insertLastObjects: |
|
(id) |
object |
, |
|
|
NS_REQUIRES_NIL_TERMINATION |
|
|
| |
Inserts the objects from the specified null-terminated list into the receiving list before the last object.
- Parameters
-
object | - the first object to add into the list |
... | - other objects from the null-terminated list to add into the receiving list |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
- Exceptions
-
- (void) insertLastShort: |
|
(SCShort) |
value |
|
Inserts a given signed 16-bit integer value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastUByte: |
|
(SCUByte) |
value |
|
Inserts a given unsigned 8-bit integer value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
Inserts a given unsigned 32-bit integer value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastULong: |
|
(SCULong) |
value |
|
Inserts a given unsigned 64-bit integer value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
- (void) insertLastUnichar: |
|
(unichar) |
value |
|
Inserts a given character into the receiving list before the last object.
- Parameters
-
value | - the character to add into the list |
- Exceptions
-
- See also
- - insertLastChar:
- (void) insertLastUShort: |
|
(SCUShort) |
value |
|
Inserts a given unsigned 16-bit integer value into the receiving list before the last object.
- Parameters
-
value | - the value to add into the list |
- Exceptions
-
Returns the last object within the receiving list as a boolean value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as a signed 8-bit integer value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as a character.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
- See also
- - lastUnichar
- (const char *) lastCharString |
|
|
|
Returns the last object within the receiving list as a character string.
- Returns
- A last object or nil if the list is empty
- Exceptions
-
Returns the last object within the receiving list as a double value.
- Returns
- A last object or 0.0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as a float value.
- Returns
- A last object or 0.0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as a signed 32-bit integer value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as a signed 64-bit integer value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as a signed 16-bit integer value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as an unsigned 8-bit integer value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as an unsigned 32-bit integer value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as an unsigned 64-bit integer value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Returns the last object within the receiving list as a character.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
- See also
- - lastChar
Returns the last object within the receiving list as an unsigned 16-bit integer value.
- Returns
- A last object or 0 if the list is empty
- Exceptions
-
Creates and returns an unnamed empty bidirectional list.
- Returns
- A created bidirectional list
Returns a bidirectional list created by using the specified coder.
- Parameters
-
- Returns
- A created bidirectional list
Returns a bidirectional list created by using the objects from the specified collection of any supported type.
- Parameters
-
collection | - the existing source collection |
- Returns
- A created bidirectional list
- Exceptions
-
Returns a bidirectional list created by using the content of the serialized file with the specified path.
- Parameters
-
path | - the path to the source serialized file |
- Returns
- A created bidirectional list
Returns a bidirectional list created by using the specified data dictionary.
- Parameters
-
dictionary | - the source data dictionary |
- Returns
- A created bidirectional list
Returns a bidirectional list created by using the data dictionary from the specified file.
- Parameters
-
path | - the path to the source data dictionary file |
- Returns
- A created bidirectional list
Returns a bidirectional list created by using the data from the file stream with the specified file.
- Parameters
-
path | - the path to the source file stream |
- Returns
- A created bidirectional list
- Exceptions
-
Creates and returns a bidirectional list containing objects from another given list.
- Parameters
-
list | - a list containing the objects with which to initialize the new bidirectional list |
- Returns
- A new bidirectional list containing the objects found in the specified list
- Exceptions
-
Returns an empty bidirectional list created by using the specified list name.
- Parameters
-
name | - the name of the new bidirectional list |
- Returns
- A created bidirectional list
Creates and returns a bidirectional list containing a given object.
- Parameters
-
object | - the object to adding into the bidirectional list |
- Returns
- A new bidirectional list containing a signe object
Creates and returns a bidirectional list containing the objects from the specified list.
- Parameters
-
object | - the first object to add into the new bidirectional list |
... | - a null-terminated list of alternating objects to add into the new list |
NS_REQUIRES_NIL_TERMINATION | - the mandatory nil pointer |
- Returns
- A new bidirectional list containing the specified objects
Returns a bidirectional list created by using the data from the specified stream.
- Parameters
-
stream | - the source stream |
- Returns
- A created bidirectional list
- Exceptions
-
Shifts the current object to the previous object in the receiving list and returns a pointer to the previous object.
- Returns
- A previous object or nil if the current object is a fist object within the list
- (void) removeLastObject |
|
|
|
Removes the last object from the receiving list.
- Exceptions
-
- (void) replaceLastObjectWithBool: |
|
(BOOL) |
value |
|
Replaces the last object with a given boolean value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithByte: |
|
(SCByte) |
value |
|
Replaces the last object with a given signed 8-bit integer value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithChar: |
|
(char) |
value |
|
Replaces the last object with a given character.
- Parameters
-
value | - the character with which to replace the last object |
- Exceptions
-
- See also
- - replaceLastObjectWithUnichar:
- (void) replaceLastObjectWithCharString: |
|
(const char *) |
string |
|
Replaces the last object with a given character string.
- Parameters
-
string | - the character string with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithDouble: |
|
(SCDouble) |
value |
|
Replaces the last object with a given double value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithFloat: |
|
(SCFloat) |
value |
|
Replaces the last object with a given float value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithInteger: |
|
(SCInteger) |
value |
|
Replaces the last object with a given signed 32-bit integer value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithLong: |
|
(SCLong) |
value |
|
Replaces the last object with a given signed 64-bit integer value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithObject: |
|
(id) |
object |
|
Replaces the last object with a given object.
- Parameters
-
object | - the object with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithShort: |
|
(SCShort) |
value |
|
Replaces the last object with a given signed 16-bit integer value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithUByte: |
|
(SCUByte) |
value |
|
Replaces the last object with a given unsigned 8-bit integer value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithUInteger: |
|
(SCUInteger) |
value |
|
Replaces the last object with a given unsigned 32-bit integer value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithULong: |
|
(SCULong) |
value |
|
Replaces the last object with a given unsigned 64-bit integer value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (void) replaceLastObjectWithUnichar: |
|
(unichar) |
value |
|
Replaces the last object with a given character.
- Parameters
-
value | - the character with which to replace the last object |
- Exceptions
-
- See also
- - replaceLastObjectWithChar:
- (void) replaceLastObjectWithUShort: |
|
(SCUShort) |
value |
|
Replaces the last object with a given unsigned 16-bit integer value.
- Parameters
-
value | - the value with which to replace the last object |
- Exceptions
-
- (NSNumber *) lastNumber |
|
readnonatomicretain |
The last object withing the list as a number
The last object within the list or nil if the list is empty
- (NSString *) lastString |
|
readnonatomicretain |
The last object within the list as a string
The documentation for this class was generated from the following files: