Samond Classes Library 1.1.6-RELEASE build 132

NSDictionary(SCNSDictionary) Category Reference

Additional functionality for class NSDictionary. More...

#import <SCNSDictionary.h>

List of all members.

Public Member Functions

Supporting Data Dictionaries
(void) - writeToDataDictionary:
(void) - writeToDataDictionaryFile:atomically:
(void) - writeToDataDictionaryFile:
(NSDictionary *) - dataDictionary
Supporting Coders and Serialized Files
(BOOL) - writeContentsToSerializedFile:
Supporting Collections
(id< SCCollectionProtocol >) - copyObject
(SCComparisonResult- compareWithObject:
Supporting Streams
(void) - writeToStream:
(void) - writeToFileStream:
(void) - appendToFileStream:
Other Methods
(NSString *) - className
Detecting Collection Type
(BOOL) - isCollection
(BOOL) - isLibraryCollection
(BOOL) - isFoundationCollection
(BOOL) - isArray
(BOOL) - isLibraryArray
(BOOL) - isFoundationArray
(BOOL) - isSet
(BOOL) - isLibrarySet
(BOOL) - isFoundationSet
(BOOL) - isOrderedSet
(BOOL) - isLibraryOrderedSet
(BOOL) - isFoundationOrderedSet
(BOOL) - isDictionary
(BOOL) - isLibraryDictionary
(BOOL) - isFoundationDictionary
(BOOL) - isStack
(BOOL) - isQueue
(BOOL) - isList
(BOOL) - isSortable

Creating and Initializing Class Instance

(NSDictionary *) + dictionaryWithContentsOfSerializedFile:
(NSDictionary *) + dictionaryWithDataDictionary:
(NSDictionary *) + dictionaryWithDataDictionaryFromFile:
(NSDictionary *) + dictionaryWithCoder:
(NSDictionary *) + dictionaryWithStream:
(NSDictionary *) + dictionaryWithFileStream:
(id) - initWithContentsOfSerializedFile:
(id) - initWithDataDictionary:
(id) - initWithDataDictionaryFromFile:
(id) - initWithStream:
(id) - initWithFileStream:

Detailed Description

Additional functionality for class NSDictionary.

Category SCNSDictionary extends functionality of standard class NSDictionary.
This category was introduced in version 1.1.3.

Category declares the following properties:


Member Function Documentation

- (void) appendToFileStream: (NSString *)  path

Appends the dictionary to the new or existing stream file with the specified path.

Parameters:
path- stream file path
Exceptions:
SCStreamException- stream operation error detected
- (NSString *) className

Returns the receiver's dictionary class name.

Returns:
Class name
- (SCComparisonResult) compareWithObject: (id<SCCollectionProtocol>)  object

Returns the result of comparison receiver's dictionary with the specified dictionarey.

Parameters:
object- second dictionary for comparison
Returns:
Result of comparison:
  • SCComparisonEqual - dictinaries are equal
  • SCComparisonLess - the receiver's dictionary is less than second dictionary
  • SCComparisonGreater - the receiver's dictionary is greater than second dictionary
  • SCComparisonNotAllowed - instances cannot be compared
Exceptions:
SCCollectionException- incompatible second dictionary detected
- (id< SCCollectionProtocol >) copyObject

Returns the copy of the dictionary.

Returns:
Copy of the receiver's dictionary
- (NSDictionary *) dataDictionary

Returns the dictionary with the dictionary data.

Returns:
Dictionary with the dictionary data
+ (NSDictionary *) dictionaryWithCoder: (NSCoder *)  coder

Returns the dictionary created by using the specified coder.

Parameters:
coder- source coder
Returns:
A created dictionary
+ (NSDictionary *) dictionaryWithContentsOfSerializedFile: (NSString *)  path

Returns the dictionary created by using the contens of serialized file with the specified path.

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

Returns the dictionary created by using the specified dictionary.

Parameters:
dictionary- source dictionary
Returns:
A created dictionary
+ (NSDictionary *) dictionaryWithDataDictionaryFromFile: (NSString *)  path

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

Parameters:
path- source dictionary file path
Returns:
A created dictionary
+ (NSDictionary *) dictionaryWithFileStream: (NSString *)  path

Returns the dictionary created from the stream file with the specified path.

Parameters:
path- stream file path
Returns:
A created dictionary
Exceptions:
SCStreamException- stream operation error detected
+ (NSDictionary *) dictionaryWithStream: (SCStream *)  stream

Returns the dictionary created from the specified stream.

Parameters:
stream- stream for reading class instance
Returns:
A created dictionary
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (id) initWithContentsOfSerializedFile: (NSString *)  path

Initializes the dictionary using the contens of serialized file with the specified path.

Parameters:
path- source serialized file path
Returns:
A newly initialized dictionary
- (id) initWithDataDictionary: (NSDictionary *)  dictionary

Initializes the dictionary using the specified dictionary.

Parameters:
dictionary- source dictionary
Returns:
A newly initialized dictionary
- (id) initWithDataDictionaryFromFile: (NSString *)  path

Initializes the dictionary using the dictionary from the specified file.

Parameters:
path- source dictionary file path
Returns:
A newly initialized dictionary
- (id) initWithFileStream: (NSString *)  path

Initializes dictionary from the stream file with the specified path.

Parameters:
path- stream file path
Returns:
A newly initialized dictionary
Exceptions:
SCStreamException- stream operation error detected
- (id) initWithStream: (SCStream *)  stream

Initializes the dictionary from the specified stream.

Parameters:
stream- stream for reading class instance
Returns:
A newly initialized dictionary
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (BOOL) isArray

Returns a boolean value that indicates whether a receiving instance is an array.

Returns:
YES if the receiving instance is an array of any type, otherwise NO
- (BOOL) isCollection

Returns a boolean value that indicates whether a receiving instance is a collection.

Returns:
YES if the receiving instance is a collection of any type, otherwise NO
- (BOOL) isDictionary

Returns a boolean value that indicates whether a receiving instance is a dictionary.

Returns:
YES if the receiving instance is a dictionary of any type, otherwise NO
- (BOOL) isFoundationArray

Returns a boolean value that indicates whether a receiving instance is a foundation array.

Returns:
YES if the receiving instance is a foundation array of any type, otherwise NO
- (BOOL) isFoundationCollection

Returns a boolean value that indicates whether a receiving instance is a foundation collection.

Returns:
YES if the receiving instance is a foundation collection of any type, otherwise NO
- (BOOL) isFoundationDictionary

Returns a boolean value that indicates whether a receiving instance is a foundation dictionary.

Returns:
YES if the receiving instance is a foundation dictionary of any type, otherwise NO
- (BOOL) isFoundationOrderedSet

Returns a boolean value that indicates whether a receiving instance is a foundation ordered set.

Returns:
YES if the receiving instance is a foundation ordered set of any type, otherwise NO
- (BOOL) isFoundationSet

Returns a boolean value that indicates whether a receiving instance is a foundation set.

Returns:
YES if the receiving instance is a foundation set of any type, otherwise NO
- (BOOL) isLibraryArray

Returns a boolean value that indicates whether a receiving instance is a library array.

Returns:
YES if the receiving instance is a library array of any type, otherwise NO
- (BOOL) isLibraryCollection

Returns a boolean value that indicates whether a receiving instance is a library collection.

Returns:
YES if the receiving instance is a library collection of any type, otherwise NO
- (BOOL) isLibraryDictionary

Returns a boolean value that indicates whether a receiving instance is a library dictionary.

Returns:
YES if the receiving instance is a library dictionary, otherwise NO
- (BOOL) isLibraryOrderedSet

Returns a boolean value that indicates whether a receiving instance is a library ordered set.

Returns:
YES if the receiving instance is a library ordered set, otherwise NO
- (BOOL) isLibrarySet

Returns a boolean value that indicates whether a receiving instance is a library set.

Returns:
YES if the receiving instance is a library set, otherwise NO
- (BOOL) isList

Returns a boolean value that indicates whether a receiving instance is a list.

Returns:
YES if the receiving instance is a list of any type, otherwise NO
- (BOOL) isOrderedSet

Returns a boolean value that indicates whether a receiving instance is an ordered set.

Returns:
YES if the receiving instance is an ordered set of any type, otherwise NO
- (BOOL) isQueue

Returns a boolean value that indicates whether a receiving instance is a queue.

Returns:
YES if the receiving instance is a queue, otherwise NO
- (BOOL) isSet

Returns a boolean value that indicates whether a receiving instance is a set.

Returns:
YES if the receiving instance is a set of any type, otherwise NO
- (BOOL) isSortable

Returns a boolean value that indicates whether a receiving instance is a sortable collection.

Returns:
YES if the receiving instance is a sortable collection of any type, otherwise NO
- (BOOL) isStack

Returns a boolean value that indicates whether a receiving instance is a stack.

Returns:
YES if the receiving instance is a stack, otherwise NO
- (BOOL) writeContentsToSerializedFile: (NSString *)  path

Writes dictionary encoded data into the serialized file with the specified path.

Parameters:
path- path at which to write the file
Returns:
YES if operation is successfully, otherwise NO
- (void) writeToDataDictionary: (NSMutableDictionary *)  dictionary

Writes the dictionary data into the specified dictionary.

Parameters:
dictionary- destination dictionary
- (void) writeToDataDictionaryFile: (NSString *)  path

Atomically writes the dictionary data into the dictionary file with the specified path.

Parameters:
path- path at which to write the file
- (void) writeToDataDictionaryFile: (NSString *)  path
atomically: (BOOL)  atomically 

Writes the dictionary data into the dictionary file with the specified path.

Parameters:
path- path at which to write the file
atomically- YES for writing data to an auxiliary file, and then the auxiliary file is renamed to path, NO for writing data directly to path
- (void) writeToFileStream: (NSString *)  path

Saves the dictionary instance to the created stream file with the specified path.

Parameters:
path- stream file path
Exceptions:
SCStreamException- stream operation error detected
- (void) writeToStream: (SCStream *)  stream

Saves the dictionary to the specified stream.

Parameters:
stream- stream for writing dictionary
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected

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