Samond Classes Library 1.1.6-RELEASE build 132

SCStack.h

Go to the documentation of this file.
00001 //
00002 //  SCStack.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 SCStackClass @"SCStack" ///< SCStack class name
00018 
00029 @interface SCStack : SCCollection {
00030     NSMutableArray *fStack; // Stack items array
00031 }
00032 #pragma mark -
00033 #pragma mark Class properties
00034 #if (__MAC_OS_X_VERSION_MIN_REQUIRED > 1040) || IOS_TARGET
00035 // Stack name property
00036 @property (retain, getter=stackName, setter=setStackName:) NSString *stackName;
00037 #endif
00038 
00039 #pragma mark -
00040 #pragma mark Creating Stack
00041 
00047 + (SCStack *)stackWithDataDictionary:(NSDictionary *)dictionary;
00048 
00054 + (SCStack *)stackWithDataDictionaryFromFile:(NSString *)path;
00055 
00061 + (SCStack *)stackWithCoder:(NSCoder *)coder;
00062 
00068 + (SCStack *)stackWithContentsOfSerializedFile:(NSString *)path;
00069 
00077 + (SCStack *)stackWithStream:(SCStream *)stream;
00078 
00085 + (SCStack *)stackWithFileStream:(NSString *)path;
00086 
00091 + (SCStack *)stack;
00092 
00099 + (SCStack *)stackWithStackName:(NSString *)name capacity:(SCULong)capacity;
00100 
00106 + (SCStack *)stackWithStackName:(NSString *)name;
00107 
00113 + (SCStack *)stackWithCapacity:(SCULong)capacity;
00114 
00120 + (SCStack *)stackWithDelegate:(id<SCCollectionDelegate>)delegate;
00121 
00129 + (SCStack *)stackWithDelegate:(id<SCCollectionDelegate>)delegate collection:(id)collection;
00130 
00137 + (SCStack *)stackWithCollection:(id)collection;
00138 
00146 + (SCStack *)stackWithDelegate:(id<SCCollectionDelegate>)delegate object:(id)object;
00147 
00154 + (SCStack *)stackWithObject:(id)object;
00155 
00165 + (SCStack *)stackWithDelegate:(id<SCCollectionDelegate>)delegate objects:(id)object, ...;
00166 
00174 + (SCStack *)stackWithObjects:(id)object, ...;
00175 
00182 + (SCStack *)stackWithStack:(SCStack *)stack;
00183 
00184 #pragma mark -
00185 #pragma mark Initializing Stack
00186 
00191 - (id)init;
00192 
00199 - (id)initWithStackName:(NSString *)name capacity:(SCULong)capacity;
00200 
00206 - (id)initWithStackName:(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)initWithStack:(SCStack *)stack;
00283 
00284 #pragma mark -
00285 #pragma mark Querying and Setting Stack Properties
00286 
00291 - (NSString *)stackName;
00292 
00297 - (void)setStackName:(NSString *)name;
00298 
00299 #pragma mark -
00300 #pragma mark Querying Stack
00301 
00306 - (id)lastObject;
00307 
00313 - (NSString *)lastString;
00314 
00320 - (NSNumber *)lastNumber;
00321 
00327 - (SCByte)lastByte;
00328 
00334 - (SCUByte)lastUByte;
00335 
00341 - (SCShort)lastShort;
00342 
00349 - (SCUShort)lastUShort;
00350 
00356 - (SCInteger)lastInteger;
00357 
00364 - (SCUInteger)lastUInteger;
00365 
00371 - (SCLong)lastLong;
00372 
00379 - (SCULong)lastULong;
00380 
00386 - (char)lastChar;
00387 
00393 - (unichar)lastUnichar;
00394 
00400 - (const char *)lastCharString;
00401 
00407 - (BOOL)lastBool;
00408 
00415 - (SCFloat)lastFloat;
00416 
00423 - (SCDouble)lastDouble;
00424 
00425 #pragma mark -
00426 #pragma mark Pushing Objects
00427 
00433 - (void)pushObject:(id)object;
00434 
00440 - (void)pushByte:(SCByte)byte;
00441 
00447 - (void)pushUByte:(SCUByte)byte;
00448 
00454 - (void)pushShort:(SCShort)shortint;
00455 
00461 - (void)pushUShort:(SCUShort)shortint;
00462 
00468 - (void)pushInteger:(SCInteger)integer;
00469 
00475 - (void)pushUInteger:(SCUInteger)integer;
00476 
00482 - (void)pushLong:(SCLong)longint;
00483 
00489 - (void)pushULong:(SCULong)longint;
00490 
00496 - (void)pushChar:(char)chr;
00497 
00503 - (void)pushUnichar:(unichar)chr;
00504 
00510 - (void)pushCharString:(const char *)string;
00511 
00517 - (void)pushBool:(BOOL)boolean;
00518 
00524 - (void)pushFloat:(SCFloat)flt;
00525 
00531 - (void)pushDouble:(SCDouble)dbl;
00532 
00539 - (void)pushObjects:(id)object, ...;
00540 
00546 - (void)pushObjectsFromCollection:(id)collection;
00547 
00548 #pragma mark -
00549 #pragma mark Poping Objects
00550 
00555 - (void)pop;
00556 
00562 - (id)popObject;
00563 
00569 - (NSString *)popString;
00570 
00576 - (NSNumber *)popNumber;
00577 
00583 - (SCByte)popByte;
00584 
00591 - (SCUByte)popUByte;
00592 
00599 - (SCShort)popShort;
00600 
00607 - (SCUShort)popUShort;
00608 
00615 - (SCInteger)popInteger;
00616 
00623 - (SCUInteger)popUInteger;
00624 
00631 - (SCLong)popLong;
00632 
00639 - (SCULong)popULong;
00640 
00646 - (char)popChar;
00647 
00653 - (unichar)popUnichar;
00654 
00660 - (const char *)popCharString;
00661 
00667 - (BOOL)popBool;
00668 
00675 - (SCFloat)popFloat;
00676 
00683 - (SCDouble)popDouble;
00684 
00685 #pragma mark -
00686 #pragma mark Removing Objects
00687 
00692 - (void)removeLastObject;
00693 
00694 #pragma mark -
00695 #pragma mark Copying Objects
00696 
00701 - (void)duplicateLastObject;
00702 
00703 @end
 All Classes Files Functions Typedefs Enumerations Enumerator Defines