00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 #if !defined(STACK_OL_GUARD)
00044 #define STACK_OL_GUARD
00045 
00046 #include <ObjectiveLib/Deque.h>
00047 
00064 @interface OLStack :
00065 #if defined(OL_NO_OPENSTEP)
00066     Object <OLStreamable>
00067 #else
00068     NSObject <OLStreamable, NSCopying, NSCoding>
00069 #endif
00070 {
00071 @protected
00075     OLDeque*    deque;
00076 }
00077 
00086 + (id) stack;
00087 
00098 + (id) stackWithStack: (OLStack*)right;
00099 
00103 
00109 - (id) init;
00110 
00111 #if !defined(OL_NO_OPENSTEP)
00112 
00122 - (id) initWithCoder: (NSCoder*)decoder;
00123 #endif
00124 
00125 - (id) initWithObjectInStream: (OLObjectInStream*)stream;
00126 
00134 - (id) initWithStack: (OLStack*)stack;
00135 
00139 #if defined(OL_NO_OPENSTEP)
00140 - (id) free;
00141 #else
00142 - (void) dealloc;
00143 #endif
00144 
00145 
00155 - (int) compare: (id)other;
00156 #if defined(OL_NO_OPENSTEP)
00157 
00162 - (id) copy;
00163 #else
00164 
00170 - (id) copyWithZone: (NSZone*)zone;
00171 #endif
00172 
00178 - (BOOL) empty;
00179 
00180 #if !defined(OL_NO_OPENSTEP)
00181 
00187 - (void) encodeWithCoder: (NSCoder*)encoder;
00188 #endif
00189 
00198 - (BOOL) isEqual: (id)object;
00199 
00206 - (void) pop;
00207 
00214 - (void) push: (id)object;
00215 
00221 - (unsigned) size;
00222 
00229 - (id) top;
00230 
00231 - (void) writeSelfToStream: (OLObjectOutStream*)stream;
00232 
00233 @end
00234 
00235 #endif