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 #warning The API in this header is obsoleted by NSArray.
00034
00035 #ifndef _OBJC_LIST_H_
00036 #define _OBJC_LIST_H_
00037
00038 #import <objc/Object.h>
00039
00040 @interface List : Object
00041 {
00042 @public
00043 id *dataPtr;
00044 unsigned numElements;
00045 unsigned maxElements;
00046 }
00047
00048
00049
00050 - free;
00051 - freeObjects;
00052 - copyFromZone:(void *)z;
00053
00054
00055
00056 - init;
00057 - initCount:(unsigned)numSlots;
00058
00059
00060
00061 - (BOOL)isEqual: anObject;
00062
00063
00064
00065 - (unsigned)capacity;
00066 - setAvailableCapacity:(unsigned)numSlots;
00067
00068
00069
00070 - (unsigned)count;
00071 - objectAt:(unsigned)index;
00072 - lastObject;
00073 - addObject:anObject;
00074 - insertObject:anObject at:(unsigned)index;
00075 - removeObjectAt:(unsigned)index;
00076 - removeLastObject;
00077 - replaceObjectAt:(unsigned)index with:newObject;
00078 - appendList: (List *)otherList;
00079
00080
00081
00082 - (unsigned)indexOf:anObject;
00083 - addObjectIfAbsent:anObject;
00084 - removeObject:anObject;
00085 - replaceObject:anObject with:newObject;
00086
00087
00088
00089 - empty;
00090
00091
00092
00093 - makeObjectsPerform:(SEL)aSelector;
00094 - makeObjectsPerform:(SEL)aSelector with:anObject;
00095
00096
00097
00098
00099
00100
00101
00102 + new;
00103 + newCount:(unsigned)numSlots;
00104
00105 @end
00106
00107 typedef struct {
00108 @defs(List)
00109 } NXListId;
00110
00111 #define NX_ADDRESS(x) (((NXListId *)(x))->dataPtr)
00112
00113 #define NX_NOT_IN_LIST 0xffffffff
00114
00115 #endif