mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Barebones skeleton compiling now.
This commit is contained in:
parent
19f60afba3
commit
d96ac7f32a
2 changed files with 60 additions and 119 deletions
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
/** Interface for NSOrderedSet, NSMutableOrderedSet for GNUStep
|
/** Interface for NSOrderedSet, NSMutableOrderedSet for GNUStep
|
||||||
Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
|
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
|
Written by: Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
Created: Sep 1995
|
Created: May 17 2019
|
||||||
|
|
||||||
This file is part of the GNUstep Base Library.
|
This file is part of the GNUstep Base Library.
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ extern "C" {
|
||||||
@class GS_GENERIC_CLASS(NSSet, ElementT);
|
@class GS_GENERIC_CLASS(NSSet, ElementT);
|
||||||
@class GS_GENERIC_CLASS(NSDictionary, KeyT:id<NSCopying>, ValT);
|
@class GS_GENERIC_CLASS(NSDictionary, KeyT:id<NSCopying>, ValT);
|
||||||
@class NSString;
|
@class NSString;
|
||||||
|
@class NSPredicate;
|
||||||
|
|
||||||
@interface GS_GENERIC_CLASS(NSOrderedSet, __covariant ElementT) : NSObject <NSCoding,
|
@interface GS_GENERIC_CLASS(NSOrderedSet, __covariant ElementT) : NSObject <NSCoding,
|
||||||
NSCopying,
|
NSCopying,
|
||||||
|
@ -77,16 +78,16 @@ extern "C" {
|
||||||
count:(NSUInteger)count;
|
count:(NSUInteger)count;
|
||||||
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
|
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
|
||||||
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSArray, ElementT)*)objects
|
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSArray, ElementT)*)objects
|
||||||
copyItems:(BOOL)flag
|
copyItems:(BOOL)flag;
|
||||||
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSArray, ElementT)*)objects
|
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSArray, ElementT)*)objects
|
||||||
range: (NSRange)range
|
range: (NSRange)range
|
||||||
copyItems:(BOOL)flag;
|
copyItems:(BOOL)flag;
|
||||||
- (instancetype) initWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
|
- (instancetype) initWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
|
||||||
- (instancetype) initWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet copyItems:(BOOL)flag;
|
- (instancetype) initWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet copyItems:(BOOL)flag;
|
||||||
- (instancetype) init;
|
- (instancetype) init;
|
||||||
- (NSUInteger) count;
|
- (NSUInteger) count;
|
||||||
- (BOOL)containsObject:(GS_GENERIC_TYPE(ElementT))anObject;
|
- (BOOL)containsObject:(GS_GENERIC_TYPE(ElementT))anObject;
|
||||||
- (void) enumerateObjectsAtIndexes:(NSIndexSet)indexSet
|
- (void) enumerateObjectsAtIndexes:(NSIndexSet *)indexSet
|
||||||
options:(NSEnumerationOptions)opts
|
options:(NSEnumerationOptions)opts
|
||||||
usingBlock:(GSEnumeratorBlock)aBlock;
|
usingBlock:(GSEnumeratorBlock)aBlock;
|
||||||
- (void) enumerateObjectsUsingBlock: (GSEnumeratorBlock)aBlock;
|
- (void) enumerateObjectsUsingBlock: (GSEnumeratorBlock)aBlock;
|
||||||
|
@ -95,10 +96,9 @@ extern "C" {
|
||||||
- (GS_GENERIC_TYPE(ElementT)) firstObject;
|
- (GS_GENERIC_TYPE(ElementT)) firstObject;
|
||||||
- (GS_GENERIC_TYPE(ElementT)) lastObject;
|
- (GS_GENERIC_TYPE(ElementT)) lastObject;
|
||||||
- (GS_GENERIC_TYPE(ElementT)) objectAtIndex: (NSUInteger)index;
|
- (GS_GENERIC_TYPE(ElementT)) objectAtIndex: (NSUInteger)index;
|
||||||
- (GS_GENERIC_TYPE(ElementT)) objectAtIndexedSubscript:
|
- (GS_GENERIC_TYPE(ElementT)) objectAtIndexedSubscript:(NSUInteger)index;
|
||||||
- (GS_GENERIC_CLASS(NSArray, ElementT) *) objectsAtIndexes:
|
- (GS_GENERIC_CLASS(NSArray, ElementT)*) objectsAtIndexes:(NSIndexSet *)indexes;
|
||||||
(NSIndexSet *)indexes;
|
- (NSUInteger) indexOfObject:(GS_GENERIC_TYPE(ElementT))objects;
|
||||||
- (NSUInteger) indexOfObject:(GS_GENERIC_TYPE(ElementT))
|
|
||||||
- (NSUInteger) indexOfObject: (id)key
|
- (NSUInteger) indexOfObject: (id)key
|
||||||
inSortedRange: (NSRange)range
|
inSortedRange: (NSRange)range
|
||||||
options: (NSBinarySearchingOptions)options
|
options: (NSBinarySearchingOptions)options
|
||||||
|
@ -119,7 +119,7 @@ extern "C" {
|
||||||
passingTest:(GSPredicateBlock)predicate;
|
passingTest:(GSPredicateBlock)predicate;
|
||||||
- (GS_GENERIC_CLASS(NSEnumerator, ElementT)*) objectEnumerator;
|
- (GS_GENERIC_CLASS(NSEnumerator, ElementT)*) objectEnumerator;
|
||||||
- (GS_GENERIC_CLASS(NSEnumerator, ElementT)*) reverseObjectEnumerator;
|
- (GS_GENERIC_CLASS(NSEnumerator, ElementT)*) reverseObjectEnumerator;
|
||||||
- (NSOrderedSet *)reversedOrderedSet
|
- (NSOrderedSet *)reversedOrderedSet;
|
||||||
- (void) getObjects: (__unsafe_unretained GS_GENERIC_TYPE(ElementT)[])aBuffer
|
- (void) getObjects: (__unsafe_unretained GS_GENERIC_TYPE(ElementT)[])aBuffer
|
||||||
range: (NSRange)aRange;
|
range: (NSRange)aRange;
|
||||||
|
|
||||||
|
@ -128,10 +128,12 @@ extern "C" {
|
||||||
- (GS_GENERIC_TYPE(ElementT)) valueForKey: (NSString*)key;
|
- (GS_GENERIC_TYPE(ElementT)) valueForKey: (NSString*)key;
|
||||||
|
|
||||||
// Key-Value Observing Support
|
// Key-Value Observing Support
|
||||||
|
/*
|
||||||
- addObserver:forKeyPath:options:context:
|
- addObserver:forKeyPath:options:context:
|
||||||
- removeObserver:forKeyPath:
|
- removeObserver:forKeyPath:
|
||||||
- removeObserver:forKeyPath:context:
|
- removeObserver:forKeyPath:context:
|
||||||
|
*/
|
||||||
|
|
||||||
// Comparing Sets
|
// Comparing Sets
|
||||||
- (BOOL) isEqualToOrderedSet: (NSOrderedSet *)aSet;
|
- (BOOL) isEqualToOrderedSet: (NSOrderedSet *)aSet;
|
||||||
|
|
||||||
|
@ -155,115 +157,52 @@ extern "C" {
|
||||||
// Describing a set
|
// Describing a set
|
||||||
- (NSString *) description;
|
- (NSString *) description;
|
||||||
- (NSString *) descriptionWithLocale: (NSLocale *)locale;
|
- (NSString *) descriptionWithLocale: (NSLocale *)locale;
|
||||||
- (NSString*) descriptionWithLocale: (id)locale indent: (BOOL)flag;
|
- (NSString *) descriptionWithLocale: (id)locale indent: (BOOL)flag;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// Mutable Ordered Set
|
// Mutable Ordered Set
|
||||||
@interface GS_GENERIC_CLASS(NSMutableOrderedSet, __covariant ElementT) : NSOrderedSet
|
@interface GS_GENERIC_CLASS(NSMutableOrderedSet, __covariant ElementT) : NSOrderedSet
|
||||||
/*
|
// Creating a Mutable Ordered Set
|
||||||
Creating a Mutable Ordered Set
|
+ (instancetype)orderedSetWithCapacity: (NSUInteger)capacity;
|
||||||
+ orderedSetWithCapacity:
|
- (instancetype)initWithCapacity: (NSUInteger)capacity;
|
||||||
Creates and returns an mutable ordered set with a given initial capacity.
|
- (instancetype) init;
|
||||||
|
- (void)addObject:(GS_GENERIC_TYPE(ElementT))anObject;
|
||||||
- initWithCapacity:
|
- (void)addObjects:(const GS_GENERIC_TYPE(ElementT)[])objects count:(NSUInteger)count;
|
||||||
Returns an initialized mutable ordered set with a given initial capacity.
|
- (void)addObjectsFromArray:(GS_GENERIC_CLASS(NSArray, ElementT)*)otherArray;
|
||||||
|
- (void)insertObject:(GS_GENERIC_TYPE(ElementT))object atIndex:(NSUInteger)index;
|
||||||
- init
|
- (void)setObject:(GS_GENERIC_TYPE(ElementT))object atIndexedSubscript:(NSUInteger)index;
|
||||||
Initializes a newly allocated mutable ordered set.
|
- (void)insertObjects:(GS_GENERIC_CLASS(NSArray, ElementT)*)array atIndexes:(NSIndexSet *)indexes;
|
||||||
|
- (void)removeObject:(GS_GENERIC_TYPE(ElementT))object;
|
||||||
Adding, Removing, and Reordering Entries
|
- (void)removeObjectAtIndex:(NSUInteger)integer;
|
||||||
- addObject:
|
- (void)removeObjectsAtIndexes:(NSIndexSet *)indexes;
|
||||||
Appends a given object to the end of the mutable ordered set, if it is not already a member.
|
- (void)removeObjectsInArray:(GS_GENERIC_CLASS(NSArray, ElementT)*)otherArray;
|
||||||
|
- (void)removeObjectsInRange:(NSRange *)range;
|
||||||
- addObjects:count:
|
- (void)removeAllObjects;
|
||||||
Appends the given number of objects from a given C array to the end of the mutable ordered set.
|
- (void)replaceObjectAtIndex:(NSUInteger)index
|
||||||
|
withObject:(GS_GENERIC_TYPE(ElementT))object;
|
||||||
- addObjectsFromArray:
|
- (void) replaceObjectsAtIndexes: (NSIndexSet *)indexes
|
||||||
Appends to the end of the mutable ordered set each object contained in a given array that is not already a member.
|
withObjects: (GS_GENERIC_CLASS(NSArray, ElementT)*)objects;
|
||||||
|
- (void) replaceObjectsInRange:(NSRange)range
|
||||||
- insertObject:atIndex:
|
withObjects:(const GS_GENERIC_TYPE(ElementT)[])objects
|
||||||
Inserts the given object at the specified index of the mutable ordered set, if it is not already a member.
|
count: (NSUInteger)count;
|
||||||
|
- (void)setObject:(GS_GENERIC_TYPE(ElementT))object atIndex:(NSUInteger)index;
|
||||||
- setObject:atIndexedSubscript:
|
- (void)moveObjectsAtIndexes:(NSIndexSet *)indexes toIndex:(NSUInteger)index;
|
||||||
Replaces the given object at the specified index of the mutable ordered set.
|
- (void) exchangeObjectAtIndex:(NSUInteger)index withObjectAtIndex:(NSUInteger)otherIndex;
|
||||||
|
- (void)filterUsingPredicate:(NSPredicate *)predicate;
|
||||||
- insertObjects:atIndexes:
|
- (void) sortUsingDescriptors:(NSArray *)descriptors;
|
||||||
Inserts the objects in the array at the specified indexes.
|
- (void) sortUsingComparator: (NSComparator)comparator;
|
||||||
|
- (void) sortWithOptions: (NSSortOptions)options
|
||||||
- removeObject:
|
usingComparator: (NSComparator)comparator;
|
||||||
Removes a given object from the mutable ordered set.
|
- (void) sortRange: (NSRange)range
|
||||||
|
options:(NSSortOptions)options
|
||||||
- removeObjectAtIndex:
|
usingComparator: (NSComparator)comparator;
|
||||||
Removes a the object at the specified index from the mutable ordered set.
|
- (void) intersectOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
|
||||||
|
- (void) intersectSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
|
||||||
- removeObjectsAtIndexes:
|
- (void) minusOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
|
||||||
Removes the objects at the specified indexes from the mutable ordered set.
|
- (void) minusSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
|
||||||
|
- (void) unionOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
|
||||||
- removeObjectsInArray:
|
- (void) unionSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
|
||||||
Removes the objects in the array from the mutable ordered set.
|
- (instancetype) initWithCoder: (NSCoder *)coder;
|
||||||
|
|
||||||
- removeObjectsInRange:
|
|
||||||
Removes from the mutable ordered set each of the objects within a given range.
|
|
||||||
|
|
||||||
- removeAllObjects
|
|
||||||
Removes all the objects from the mutable ordered set.
|
|
||||||
|
|
||||||
- replaceObjectAtIndex:withObject:
|
|
||||||
Replaces the object at the specified index with the new object.
|
|
||||||
|
|
||||||
- replaceObjectsAtIndexes:withObjects:
|
|
||||||
Replaces the objects at the specified indexes with the new objects.
|
|
||||||
|
|
||||||
- replaceObjectsInRange:withObjects:count:
|
|
||||||
Replaces the objects in the receiving mutable ordered set at the range with the specified number of objects from a given C array.
|
|
||||||
|
|
||||||
- setObject:atIndex:
|
|
||||||
Appends or replaces the object at the specified index.
|
|
||||||
|
|
||||||
- moveObjectsAtIndexes:toIndex:
|
|
||||||
Moves the objects at the specified indexes to the new location.
|
|
||||||
|
|
||||||
- exchangeObjectAtIndex:withObjectAtIndex:
|
|
||||||
Exchanges the object at the specified index with the object at the other index.
|
|
||||||
|
|
||||||
- filterUsingPredicate:
|
|
||||||
Evaluates a given predicate against the mutable ordered set’s content and leaves only objects that match.
|
|
||||||
|
|
||||||
Sorting Entries
|
|
||||||
- sortUsingDescriptors:
|
|
||||||
Sorts the receiving ordered set using a given array of sort descriptors.
|
|
||||||
|
|
||||||
- sortUsingComparator:
|
|
||||||
Sorts the mutable ordered set using the comparison method specified by the comparator block.
|
|
||||||
|
|
||||||
- sortWithOptions:usingComparator:
|
|
||||||
Sorts the mutable ordered set using the specified options and the comparison method specified by a given comparator block.
|
|
||||||
|
|
||||||
- sortRange:options:usingComparator:
|
|
||||||
Sorts the specified range of the mutable ordered set using the specified options and the comparison method specified by a given comparator block.
|
|
||||||
|
|
||||||
Combining and Recombining Entries
|
|
||||||
- intersectOrderedSet:
|
|
||||||
Removes from the receiving ordered set each object that isn’t a member of another ordered set.
|
|
||||||
|
|
||||||
- intersectSet:
|
|
||||||
Removes from the receiving ordered set each object that isn’t a member of another set.
|
|
||||||
|
|
||||||
- minusOrderedSet:
|
|
||||||
Removes each object in another given ordered set from the receiving mutable ordered set, if present.
|
|
||||||
|
|
||||||
- minusSet:
|
|
||||||
Removes each object in another given set from the receiving mutable ordered set, if present.
|
|
||||||
|
|
||||||
- unionOrderedSet:
|
|
||||||
Adds each object in another given ordered set to the receiving mutable ordered set, if not present.
|
|
||||||
|
|
||||||
- unionSet:
|
|
||||||
Adds each object in another given set to the receiving mutable ordered set, if not present.
|
|
||||||
|
|
||||||
Initializers
|
|
||||||
- initWithCoder:
|
|
||||||
*/
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -256,6 +256,7 @@ NSObjCRuntime.m \
|
||||||
NSObject.m \
|
NSObject.m \
|
||||||
NSObject+NSComparisonMethods.m \
|
NSObject+NSComparisonMethods.m \
|
||||||
NSOperation.m \
|
NSOperation.m \
|
||||||
|
NSOrderedSet.m \
|
||||||
NSPage.m \
|
NSPage.m \
|
||||||
NSPathUtilities.m \
|
NSPathUtilities.m \
|
||||||
NSPipe.m \
|
NSPipe.m \
|
||||||
|
@ -426,6 +427,7 @@ NSNumberFormatter.h \
|
||||||
NSObjCRuntime.h \
|
NSObjCRuntime.h \
|
||||||
NSObject.h \
|
NSObject.h \
|
||||||
NSOperation.h \
|
NSOperation.h \
|
||||||
|
NSOrderedSet.h \
|
||||||
NSPathUtilities.h \
|
NSPathUtilities.h \
|
||||||
NSPointerArray.h \
|
NSPointerArray.h \
|
||||||
NSPointerFunctions.h \
|
NSPointerFunctions.h \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue