Samond Classes Library 1.1.6-RELEASE build 132

SCObject.h

Go to the documentation of this file.
00001 //
00002 //  SCObject.h
00003 //  scl
00004 //
00005 //  Created by Viacheslav Smolensky on 02.11.11.
00006 //  Copyright (c) 2007 - 2014 by Samond Development Corporation. All rights reserved.
00007 //
00008 
00016 #import <Foundation/Foundation.h>
00017 #import <scl/SCDictionaryObjectProtocol.h>
00018 #import <scl/SCCodingProtocol.h>
00019 #import <scl/SCStreamProtocol.h>
00020 #import <scl/SCCollectionProtocol.h>
00021 
00022 #define SCObjectClass @"SCObject" ///< SCObject class name
00023 
00024 #pragma mark -
00025 #pragma mark Class related constants
00026 
00027 #define SC_KEY_CLASS_NAME   @"OBJC_ClassName"   ///< Class instance class name key
00028 
00029 #pragma mark -
00030 
00041 @interface SCObject : NSObject <SCDictionaryObjectProtocol, SCCodingProtocol, SCStreamProtocol,
00042                                 SCCollectionProtocol>
00043 {
00044 
00045 }
00046 #pragma mark -
00047 #pragma mark Class properties
00048 #if (__MAC_OS_X_VERSION_MIN_REQUIRED > 1040) || IOS_TARGET
00049 // Instance class name property
00050 @property (retain, readonly, getter=className) NSString *className;
00051 #endif
00052 
00053 #pragma mark -
00054 #pragma mark Supporting Data Dictionaries
00055 
00062 - (id)initWithDataDictionary:(NSDictionary *)dictionary;
00063 
00069 - (id)initWithDataDictionaryFromFile:(NSString *)path;
00070 
00075 - (void)writeToDataDictionary:(NSMutableDictionary *)dictionary;
00076 
00083 - (void)writeToDataDictionaryFile:(NSString *)path atomically:(BOOL)atomically;
00084 
00089 - (void)writeToDataDictionaryFile:(NSString *)path;
00090 
00095 - (NSDictionary *)dataDictionary;
00096 
00097 #pragma mark -
00098 #pragma mark Supporting Coders and Serialized Files
00099 
00106 - (id)initWithCoder:(NSCoder *)coder;
00107 
00113 - (id)initWithContentsOfSerializedFile:(NSString *)path;
00114 
00119 - (void)encodeWithCoder:(NSCoder *)coder;
00120 
00126 - (BOOL)writeContentsToSerializedFile:(NSString *)path;
00127 
00128 #pragma mark -
00129 #pragma mark Supporting Streams
00130 
00138 - (id)initWithStream:(SCStream *)stream;
00139 
00146 - (id)initWithFileStream:(NSString *)path;
00147 
00154 - (void)writeToStream:(SCStream *)stream;
00155 
00161 - (void)writeToFileStream:(NSString *)path;
00162 
00168 - (void)appendToFileStream:(NSString *)path;
00169 
00170 #pragma mark -
00171 #pragma mark Supporting Collections
00172 
00178 - (id<SCCollectionProtocol>)copyObject;
00179 
00190 - (SCComparisonResult)compareWithObject:(id<SCCollectionProtocol>)object;
00191 
00196 - (NSString *)className;
00197 
00198 #pragma mark -
00199 #pragma mark Comparing Objects
00200 
00201 - (BOOL)isEqual:(id)object;
00202 
00203 @end
 All Classes Files Functions Typedefs Enumerations Enumerator Defines