Samond Classes Library 1.1.6-RELEASE build 132

SCObject Class Reference

Common ancestor of all library classes. More...

#import <SCObject.h>

Inheritance diagram for SCObject:
<SCDictionaryObjectProtocol> <SCCodingProtocol> <SCStreamProtocol> <SCCollectionProtocol> SCCollection SCCommon SCConfig SCDelegateObject SCLog SCNetObject SCServiceObject SCSortingAlgorithm SCStream SCStrings

List of all members.

Public Member Functions

Supporting Data Dictionaries
(id) - initWithDataDictionary:
(id) - initWithDataDictionaryFromFile:
(void) - writeToDataDictionary:
(void) - writeToDataDictionaryFile:atomically:
(void) - writeToDataDictionaryFile:
(NSDictionary *) - dataDictionary
Supporting Coders and Serialized Files
(id) - initWithCoder:
(id) - initWithContentsOfSerializedFile:
(void) - encodeWithCoder:
(BOOL) - writeContentsToSerializedFile:
Supporting Streams
(id) - initWithStream:
(id) - initWithFileStream:
(void) - writeToStream:
(void) - writeToFileStream:
(void) - appendToFileStream:
Supporting Collections
(id< SCCollectionProtocol >) - copyObject
(SCComparisonResult- compareWithObject:
(NSString *) - className
Comparing Objects
(BOOL) - isEqual:

Detailed Description

Common ancestor of all library classes.

Is the common ancestor of all other library classes except classes of the exceptional situations.
Introduced to the library in order to organize library classes tree.
Class was introduced in version 1.1.3.

Class declared 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

Reimplemented from <SCStreamProtocol>.

- (NSString *) className

Returns the receiver's instance class name.

Returns:
Class name

Reimplemented from <SCCodingProtocol>.

- (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

Reimplemented from <SCCollectionProtocol>.

- (id< SCCollectionProtocol >) copyObject

Returns the copy of receiver's instance.
Abstract method must be reimplemented in child classes.

Returns:
Copy of receiver's instance

Reimplemented from <SCCollectionProtocol>.

- (NSDictionary *) dataDictionary

Returns the dictionary with the receiver's data.

Returns:
Dictionary with the receiver's data

Reimplemented from <SCDictionaryObjectProtocol>.

- (void) encodeWithCoder: (NSCoder *)  coder

Encodes the receiver's data to the specified coder.

Parameters:
coder- destination coder
- (id) initWithCoder: (NSCoder *)  coder

Initializes the class instance using the specified coder.
To support interaction with a coder, this method should be overriden.

Parameters:
coder- source coder
Returns:
A newly initialized class instance
- (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

Reimplemented from <SCCodingProtocol>.

- (id) initWithDataDictionary: (NSDictionary *)  dictionary

Initializes the class instance using the specified dictionary.
To support interaction with a dictionary, this method should be overridden.

Parameters:
dictionary- source dictionary
Returns:
A newly initialized class instance

Reimplemented from <SCDictionaryObjectProtocol>.

- (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

Reimplemented from <SCDictionaryObjectProtocol>.

- (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

Reimplemented from <SCStreamProtocol>.

- (id) initWithStream: (SCStream *)  stream

Initializes 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

Reimplemented from <SCStreamProtocol>.

- (BOOL) isEqual: (id)  object

Returns a boolean value that indicates whether the receiver and a given object are equal.

Parameters:
object- object to be compared to the receiver
Returns:
YES if the objects are equal, otherwise NO

Reimplemented in SCCollection, SCConfig, SCConfigRecord, SCIPAddress, SCStrings, SCSubnet, SCSubnetMask, and SCTextIndex.

- (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

Reimplemented from <SCCodingProtocol>.

- (void) writeToDataDictionary: (NSMutableDictionary *)  dictionary

Writes the receiver's data into the specified dictionary.

Parameters:
dictionary- destination dictionary

Reimplemented from <SCDictionaryObjectProtocol>.

- (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

Reimplemented from <SCDictionaryObjectProtocol>.

- (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

Reimplemented from <SCDictionaryObjectProtocol>.

- (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

Reimplemented from <SCStreamProtocol>.

- (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

Reimplemented from <SCStreamProtocol>.


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