2 * Copyright (c) 1999-2002, 2005-2007 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
25 Copyright 1988-1996 NeXT Software, Inc.
27 DEFINED AS: A common class
28 HEADER FILES: objc/List.h
37 #warning class List unavailable in 64-bit Objective-C
41 #warning The API in this header is obsoleted by NSArray.
43 #import <objc/Object.h>
44 #import <AvailabilityMacros.h>
46 DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
47 @interface List
: Object
50 id
*dataPtr DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
; /* data of the List object */
51 unsigned numElements DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
; /* Actual number of elements */
52 unsigned maxElements DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
; /* Total allocated elements */
55 /* Creating, freeing */
57 - free DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
58 - freeObjects DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
59 - copyFromZone
:(void *)z DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
63 - init DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
64 - initCount
:(unsigned)numSlots DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
66 /* Comparing two lists */
68 - (BOOL
)isEqual
: anObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
70 /* Managing the storage capacity */
72 - (unsigned)capacity DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
73 - setAvailableCapacity
:(unsigned)numSlots DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
75 /* Manipulating objects by index */
77 - (unsigned)count DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
78 - objectAt
:(unsigned)index DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
79 - lastObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
80 - addObject
:anObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
81 - insertObject
:anObject at
:(unsigned)index DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
82 - removeObjectAt
:(unsigned)index DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
83 - removeLastObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
84 - replaceObjectAt
:(unsigned)index with
:newObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
85 - appendList
: (List
*)otherList DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
87 /* Manipulating objects by id */
89 - (unsigned)indexOf
:anObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
90 - addObjectIfAbsent
:anObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
91 - removeObject
:anObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
92 - replaceObject
:anObject with
:newObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
94 /* Emptying the list */
96 - empty DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
98 /* Sending messages to elements of the list */
100 - makeObjectsPerform
:(SEL
)aSelector DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
101 - makeObjectsPerform
:(SEL
)aSelector with
:anObject DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
104 * The following new... methods are now obsolete. They remain in this
105 * interface file for backward compatibility only. Use Object's alloc method
106 * and the init... methods defined in this class instead.
109 + new DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
110 + newCount
:(unsigned)numSlots DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
116 } NXListId DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
;
118 #define NX_ADDRESS(x) (((NXListId *)(x))->dataPtr)
120 #define NX_NOT_IN_LIST 0xffffffff
124 #endif /* _OBJC_LIST_H_ */