Samond Classes Library 1.1.6-RELEASE build 132

NSDate(SCDate) Category Reference

Additional functionality for class NSDate. More...

#import <SCDate.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:
(NSString *) - className
Supporting Streams
(void) - writeToStream:
(void) - writeToFileStream:
(void) - appendToFileStream:

Creating and Initializing Class Instance

(NSDate *) + dateWithContentsOfSerializedFile:
(NSDate *) + dateWithDataDictionary:
(NSDate *) + dateWithDataDictionaryFromFile:
(NSDate *) + dateWithCoder:
(NSDate *) + dateWithStream:
(NSDate *) + dateWithFileStream:
(id) - initWithContentsOfSerializedFile:
(id) - initWithDataDictionary:
(id) - initWithDataDictionaryFromFile:
(id) - initWithStream:
(id) - initWithFileStream:

Detailed Description

Additional functionality for class NSDate.

Category SCDate extends functionality of standard class NSDate.
This category was introduced in version 1.2.0.

Category declares the following properties:


Member Function Documentation

- (void) appendToFileStream: (NSString *)  path

Appends the receiver's class instance 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 instance class name.

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

Returns the result of comparison receiver's instance with the specified instance.

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

Returns the copy of receiver's instance.

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

Returns the dictionary with the receiver's data.

Returns:
Dictionary with the receiver's data
+ (NSDate *) dateWithCoder: (NSCoder *)  coder

Returns the class instance created by using the specified coder.

Parameters:
coder- source coder
Returns:
A created class instance
+ (NSDate *) dateWithContentsOfSerializedFile: (NSString *)  path

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

Parameters:
path- source serialized file path
Returns:
A created class instance
+ (NSDate *) dateWithDataDictionary: (NSDictionary *)  dictionary

Returns the class instance created by using the specified dictionary.

Parameters:
dictionary- source dictionary
Returns:
A created class instance
+ (NSDate *) dateWithDataDictionaryFromFile: (NSString *)  path

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

Parameters:
path- source dictionary file path
Returns:
A created class instance
+ (NSDate *) dateWithFileStream: (NSString *)  path

Returns the class instance created from the stream file with the specified path.

Parameters:
path- stream file path
Returns:
A created class instance
Exceptions:
SCStreamException- stream operation error detected
+ (NSDate *) dateWithStream: (SCStream *)  stream

Returns the class instance created from the specified stream.

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

Initializes the class instance using the contens of serialized file with the specified path.

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

Initializes the class instance using the specified dictionary.

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

Initializes the class instance using the dictionary from the specified file.

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

Initializes class instance from the stream file with the specified path.

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

Initializes the class instance from the specified stream.

Parameters:
stream- stream for reading class instance
Returns:
A newly initialized class instance
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
- (BOOL) writeContentsToSerializedFile: (NSString *)  path

Writes receiver's 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 receiver's data into the specified dictionary.

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

Atomically writes the receiver's 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 receiver's 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 receiver's class 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 receiver's class instance to the specified stream.

Parameters:
stream- stream for writing receiver's class instance
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