|
Samond Classes Library 1.1.6-RELEASE build 132
|
00001 // 00002 // SCSet.h 00003 // scl 00004 // 00005 // Created by Viacheslav Smolensky on 13.04.12. 00006 // Copyright (c) 2007 - 2014 by Samond Development Corporation. All rights reserved. 00007 // 00008 00015 #import <scl/SCCollection.h> 00016 00017 #define SCSetClass @"SCSet" ///< SCSet class name 00018 00029 @interface SCSet : SCCollection { 00030 NSMutableSet *fSet; // Internal set 00031 } 00032 #pragma mark - 00033 #pragma mark Class properties 00034 #if (__MAC_OS_X_VERSION_MIN_REQUIRED > 1040) || IOS_TARGET 00035 // Set name property 00036 @property (retain, getter=setName, setter=setSetName:) NSString *setName; 00037 #endif 00038 00039 #pragma mark - 00040 #pragma mark Creating Set 00041 00047 + (SCSet *)setWithDataDictionary:(NSDictionary *)dictionary; 00048 00054 + (SCSet *)setWithDataDictionaryFromFile:(NSString *)path; 00055 00061 + (SCSet *)setWithCoder:(NSCoder *)coder; 00062 00068 + (SCSet *)setWithContentsOfSerializedFile:(NSString *)path; 00069 00077 + (SCSet *)setWithStream:(SCStream *)stream; 00078 00085 + (SCSet *)setWithFileStream:(NSString *)path; 00086 00091 + (SCSet *)set; 00092 00099 + (SCSet *)setWithSetName:(NSString *)name capacity:(SCULong)capacity; 00100 00106 + (SCSet *)setWithSetName:(NSString *)name; 00107 00113 + (SCSet *)setWithCapacity:(SCULong)capacity; 00114 00120 + (SCSet *)setWithDelegate:(id<SCCollectionDelegate>)delegate; 00121 00129 + (SCSet *)setWithDelegate:(id<SCCollectionDelegate>)delegate collection:(id)collection; 00130 00137 + (SCSet *)setWithCollection:(id)collection; 00138 00146 + (SCSet *)setWithDelegate:(id<SCCollectionDelegate>)delegate object:(id)object; 00147 00154 + (SCSet *)setWithObject:(id)object; 00155 00165 + (SCSet *)setWithDelegate:(id<SCCollectionDelegate>)delegate objects:(id)object, ...; 00166 00174 + (SCSet *)setWithObjects:(id)object, ...; 00175 00182 + (SCSet *)setWithSet:(SCSet *)set; 00183 00184 #pragma mark - 00185 #pragma mark Initializing Set 00186 00191 - (id)init; 00192 00199 - (id)initWithSetName:(NSString *)name capacity:(SCULong)capacity; 00200 00206 - (id)initWithSetName:(NSString *)name; 00207 00213 - (id)initWithCapacity:(SCULong)capacity; 00214 00220 - (id)initWithDelegate:(id<SCCollectionDelegate>)delegate; 00221 00229 - (id)initWithDelegate:(id<SCCollectionDelegate>)delegate collection:(id)collection; 00230 00237 - (id)initWithCollection:(id)collection; 00238 00246 - (id)initWithDelegate:(id<SCCollectionDelegate>)delegate object:(id)object; 00247 00254 - (id)initWithObject:(id)object; 00255 00265 - (id)initWithDelegate:(id<SCCollectionDelegate>)delegate objects:(id)object, ...; 00266 00274 - (id)initWithObjects:(id)object, ...; 00275 00282 - (id)initWithSet:(SCSet *)set; 00283 00284 #pragma mark - 00285 #pragma mark Querying and Setting Set Properties 00286 00291 - (NSString *)setName; 00292 00297 - (void)setSetName:(NSString *)name; 00298 00299 #pragma mark - 00300 #pragma mark Querying Set 00301 00306 - (SCArray *)allObjects; 00307 00312 - (id)anyObject; 00313 00314 #pragma mark - 00315 #pragma mark Comparing Sets 00316 00324 - (BOOL)isSubsetOfCollection:(id)collection; 00325 00333 - (BOOL)intersectsCollection:(id)collection; 00334 00335 #pragma mark - 00336 #pragma mark Removing Objects 00337 00343 - (void)removeObject:(id)object; 00344 00350 - (void)removeByte:(SCByte)byte; 00351 00357 - (void)removeUByte:(SCUByte)byte; 00358 00364 - (void)removeShort:(SCShort)shortint; 00365 00371 - (void)removeUShort:(SCUShort)shortint; 00372 00378 - (void)removeInteger:(SCInteger)integer; 00379 00385 - (void)removeUInteger:(SCUInteger)integer; 00386 00392 - (void)removeLong:(SCLong)longint; 00393 00399 - (void)removeULong:(SCULong)longint; 00400 00406 - (void)removeChar:(char)chr; 00407 00413 - (void)removeUnichar:(unichar)chr; 00414 00420 - (void)removeCharString:(const char *)string; 00421 00427 - (void)removeBool:(BOOL)boolean; 00428 00434 - (void)removeFloat:(SCFloat)flt; 00435 00441 - (void)removeDouble:(SCDouble)dbl; 00442 00449 - (void)removeObjects:(id)object, ...; 00450 00456 - (void)removeObjectsInCollection:(id)collection; 00457 00463 - (void)removeObjectsEqualTo:(id)object; 00464 00465 #pragma mark - 00466 #pragma mark Combining and Recombining Sets 00467 00473 - (void)unionCollection:(id)collection; 00474 00480 - (void)minusCollection:(id)collection; 00481 00487 - (void)intersectCollection:(id)collection; 00488 00489 @end
1.7.3