mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Added generics support to NSMapTable
Also updated NSMapTable and NSHashTable to use "instancetype".
This commit is contained in:
parent
517f2212c5
commit
c22f24de73
3 changed files with 37 additions and 29 deletions
|
@ -63,23 +63,23 @@ typedef NSUInteger NSHashTableOptions;
|
|||
|
||||
@interface GS_GENERIC_CLASS(NSHashTable, ElementT) : NSObject <NSCopying, NSCoding, NSFastEnumeration>
|
||||
|
||||
+ (id) hashTableWithOptions: (NSPointerFunctionsOptions)options;
|
||||
+ (instancetype) hashTableWithOptions: (NSPointerFunctionsOptions)options;
|
||||
|
||||
+ (id) hashTableWithWeakObjects;
|
||||
+ (instancetype) hashTableWithWeakObjects;
|
||||
/**
|
||||
* Creates a hash table that uses zeroing weak references (either using the
|
||||
* automatic reference counting or garbage collection mechanism, depending on
|
||||
* which mode this framework is compiled in) so that objects are removed when
|
||||
* their last other reference disappears.
|
||||
*/
|
||||
+ (id) weakObjectsHashTable;
|
||||
+ (instancetype) weakObjectsHashTable;
|
||||
|
||||
|
||||
- (id) initWithOptions: (NSPointerFunctionsOptions)options
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
- (instancetype) initWithOptions: (NSPointerFunctionsOptions)options
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
|
||||
- (id) initWithPointerFunctions: (NSPointerFunctions*)functions
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
- (instancetype) initWithPointerFunctions: (NSPointerFunctions*)functions
|
||||
capacity: (NSUInteger)initialCapacity;
|
||||
|
||||
/** Adds the object to the receiver.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue