|
Samond Classes Library 1.1.6-RELEASE build 132
|
00001 // 00002 // SCList.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 SCListClass @"SCList" ///< SCList class name 00018 00030 @interface SCList : SCCollection { 00031 NSMutableArray *fList; // Internal list representation 00032 SCIndex fCurrentObject; // Index of the current object 00033 } 00034 #pragma mark - 00035 #pragma mark Class properties 00036 #if (__MAC_OS_X_VERSION_MIN_REQUIRED > 1040) || IOS_TARGET 00037 // List name property 00038 @property (retain, getter=listName, setter=setListName:) NSString *listName; 00039 // Current object property 00040 @property (retain, readonly, getter=currentObject) id currentObject; 00041 // First object property 00042 @property (retain, readonly, getter=firstObject) id firstObject; 00043 #endif 00044 00045 #pragma mark - 00046 #pragma mark Initializing List 00047 00054 - (id)initWithListName:(NSString *)name capacity:(SCULong)capacity; 00055 00061 - (id)initWithListName:(NSString *)name; 00062 00068 - (id)initWithCapacity:(SCULong)capacity; 00069 00075 - (id)initWithDelegate:(id<SCCollectionDelegate>)delegate; 00076 00084 - (id)initWithDelegate:(id<SCCollectionDelegate>)delegate collection:(id)collection; 00085 00092 - (id)initWithCollection:(id)collection; 00093 00101 - (id)initWithDelegate:(id<SCCollectionDelegate>)delegate object:(id)object; 00102 00109 - (id)initWithObject:(id)object; 00110 00119 - (id)initWithDelegate:(id<SCCollectionDelegate>)delegate objects:(id)object, ...; 00120 00128 - (id)initWithObjects:(id)object, ...; 00129 00136 - (id)initWithList:(SCList *)list; 00137 00138 #pragma mark - 00139 #pragma mark Querying and Setting List Properties 00140 00145 - (NSString *)listName; 00146 00151 - (void)setListName:(NSString *)listName; 00152 00153 #pragma mark - 00154 #pragma mark Querying List 00155 00160 - (id)firstObject; 00161 00167 - (NSString *)firstString; 00168 00174 - (NSNumber *)firstNumber; 00175 00181 - (SCByte)firstByte; 00182 00188 - (SCUByte)firstUByte; 00189 00195 - (SCShort)firstShort; 00196 00202 - (SCUShort)firstUShort; 00203 00209 - (SCInteger)firstInteger; 00210 00216 - (SCUInteger)firstUInteger; 00217 00223 - (SCLong)firstLong; 00224 00230 - (SCULong)firstULong; 00231 00237 - (char)firstChar; 00238 00244 - (unichar)firstUnichar; 00245 00251 - (const char *)firstCharString; 00252 00258 - (BOOL)firstBool; 00259 00265 - (SCFloat)firstFloat; 00266 00272 - (SCDouble)firstDouble; 00273 00278 - (id)currentObject; 00279 00285 - (NSString *)currentString; 00286 00292 - (NSNumber *)currentNumber; 00293 00299 - (SCByte)currentByte; 00300 00306 - (SCUByte)currentUByte; 00307 00313 - (SCShort)currentShort; 00314 00320 - (SCUShort)currentUShort; 00321 00327 - (SCInteger)currentInteger; 00328 00334 - (SCUInteger)currentUInteger; 00335 00341 - (SCLong)currentLong; 00342 00348 - (SCULong)currentULong; 00349 00355 - (char)currentChar; 00356 00362 - (unichar)currentUnichar; 00363 00369 - (const char *)currentCharString; 00370 00376 - (BOOL)currentBool; 00377 00383 - (SCFloat)currentFloat; 00384 00390 - (SCDouble)currentDouble; 00391 00392 #pragma mark - 00393 #pragma mark Controlling List 00394 00400 - (id)nextObject; 00401 00402 #pragma mark - 00403 #pragma mark Inserting Objects 00404 00410 - (void)insertFirstObject:(id)object; 00411 00417 - (void)insertFirstByte:(SCByte)byte; 00418 00424 - (void)insertFirstUByte:(SCUByte)byte; 00425 00431 - (void)insertFirstShort:(SCShort)shortint; 00432 00438 - (void)insertFirstUShort:(SCUShort)shortint; 00439 00445 - (void)insertFirstInteger:(SCInteger)integer; 00446 00452 - (void)insertFirstUInteger:(SCUInteger)integer; 00453 00459 - (void)insertFirstLong:(SCLong)longint; 00460 00466 - (void)insertFirstULong:(SCULong)longint; 00467 00473 - (void)insertFirstChar:(char)chr; 00474 00480 - (void)insertFirstUnichar:(unichar)chr; 00481 00487 - (void)insertFirstCharString:(const char *)string; 00488 00494 - (void)insertFirstBool:(BOOL)boolean; 00495 00501 - (void)insertFirstFloat:(SCFloat)flt; 00502 00508 - (void)insertFirstDouble:(SCDouble)dbl; 00509 00516 - (void)insertFirstObjects:(id)object, ...; 00517 00523 - (void)insertFirstObjectsFromCollection:(id)collection; 00524 00530 - (void)insertCurrentObject:(id)object; 00531 00537 - (void)insertCurrentByte:(SCByte)byte; 00538 00544 - (void)insertCurrentUByte:(SCUByte)byte; 00545 00551 - (void)insertCurrentShort:(SCShort)shortint; 00552 00559 - (void)insertCurrentUShort:(SCUShort)shortint; 00560 00566 - (void)insertCurrentInteger:(SCInteger)integer; 00567 00574 - (void)insertCurrentUInteger:(SCUInteger)integer; 00575 00581 - (void)insertCurrentLong:(SCLong)longint; 00582 00589 - (void)insertCurrentULong:(SCULong)longint; 00590 00596 - (void)insertCurrentChar:(char)chr; 00597 00603 - (void)insertCurrentUnichar:(unichar)chr; 00604 00610 - (void)insertCurrentCharString:(const char *)string; 00611 00617 - (void)insertCurrentBool:(BOOL)boolean; 00618 00624 - (void)insertCurrentFloat:(SCFloat)flt; 00625 00631 - (void)insertCurrentDouble:(SCDouble)dbl; 00632 00639 - (void)insertCurrentObjects:(id)object, ...; 00640 00646 - (void)insertCurrentObjectsFromCollection:(id)collection; 00647 00648 #pragma mark - 00649 #pragma mark Removing Objects 00650 00655 - (void)removeFirstObject; 00656 00661 - (void)removeCurrentObject; 00662 00663 #pragma mark - 00664 #pragma mark Replacing Objects 00665 00671 - (void)replaceFirstObjectWithObject:(id)object; 00672 00678 - (void)replaceFirstObjectWithByte:(SCByte)byte; 00679 00685 - (void)replaceFirstObjectWithUByte:(SCUByte)byte; 00686 00692 - (void)replaceFirstObjectWithShort:(SCShort)shortint; 00693 00699 - (void)replaceFirstObjectWithUShort:(SCUShort)shortint; 00700 00706 - (void)replaceFirstObjectWithInteger:(SCInteger)integer; 00707 00713 - (void)replaceFirstObjectWithUInteger:(SCUInteger)integer; 00714 00720 - (void)replaceFirstObjectWithLong:(SCLong)longint; 00721 00727 - (void)replaceFirstObjectWithULong:(SCULong)longint; 00728 00734 - (void)replaceFirstObjectWithChar:(char)chr; 00735 00741 - (void)replaceFirstObjectWithUnichar:(unichar)chr; 00742 00748 - (void)replaceFirstObjectWithCharString:(const char *)string; 00749 00755 - (void)replaceFirstObjectWithBool:(BOOL)boolean; 00756 00762 - (void)replaceFirstObjectWithFloat:(SCFloat)flt; 00763 00769 - (void)replaceFirstObjectWithDouble:(SCDouble)dbl; 00770 00776 - (void)replaceCurrentObjectWithObject:(id)object; 00777 00783 - (void)replaceCurrentObjectWithByte:(SCByte)byte; 00784 00790 - (void)replaceCurrentObjectWithUByte:(SCUByte)byte; 00791 00797 - (void)replaceCurrentObjectWithShort:(SCShort)shortint; 00798 00804 - (void)replaceCurrentObjectWithUShort:(SCUShort)shortint; 00805 00811 - (void)replaceCurrentObjectWithInteger:(SCInteger)integer; 00812 00818 - (void)replaceCurrentObjectWithUInteger:(SCUInteger)integer; 00819 00825 - (void)replaceCurrentObjectWithLong:(SCLong)longint; 00826 00832 - (void)replaceCurrentObjectWithULong:(SCULong)longint; 00833 00839 - (void)replaceCurrentObjectWithChar:(char)chr; 00840 00846 - (void)replaceCurrentObjectWithUnichar:(unichar)chr; 00847 00853 - (void)replaceCurrentObjectWithCharString:(const char *)string; 00854 00860 - (void)replaceCurrentObjectWithBool:(BOOL)boolean; 00861 00867 - (void)replaceCurrentObjectWithFloat:(SCFloat)flt; 00868 00874 - (void)replaceCurrentObjectWithDouble:(SCDouble)dbl; 00875 00876 #pragma mark - 00877 #pragma mark Copying Objects 00878 00883 - (void)duplicateFirstObject; 00884 00889 - (void)duplicateCurrentObject; 00890 00891 @end
1.7.3