merge back reorganisation branch

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29615 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-02-14 10:48:10 +00:00
parent d0b66e510d
commit f13d56d8ec
263 changed files with 5577 additions and 4170 deletions

View file

@ -116,6 +116,9 @@ extern "C" {
- (BOOL) writeToURL: (NSURL*)url atomically: (BOOL)useAuxiliaryFile;
- (id) valueForKey: (NSString*)key;
#endif
#if OS_API_VERSION(100600, GS_API_LATEST)
DEFINE_BLOCK_TYPE(GSEnumeratorBlock, void, id, NSUInteger, BOOL*);
DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
/**
@ -124,7 +127,8 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
* a pointer to a BOOL indicating whether the enumeration should stop. Setting
* this to YES will interrupt the enumeration.
*/
- (void)enumerateObjectsUsingBlock: (GSEnumeratorBlock)aBlock;
- (void) enumerateObjectsUsingBlock: (GSEnumeratorBlock)aBlock;
/**
* Enumerate over the collection using the given block. The first argument is
* the object and the second is the index in the array. The final argument is
@ -135,8 +139,8 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
* that it should be enumerated in reverse order.
*/
- (void)enumerateObjectsWithOptions: (NSEnumerationOptions)opts
usingBlock: (GSEnumeratorBlock)aBlock;
- (void) enumerateObjectsWithOptions: (NSEnumerationOptions)opts
usingBlock: (GSEnumeratorBlock)aBlock;
/**
* Enumerate over the specified indexes in the collection using the given
* block. The first argument is the object and the second is the index in the
@ -148,9 +152,9 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
* that it should be enumerated in reverse order.
*/
- (void)enumerateObjectsAtIndexes: (NSIndexSet*)indexSet
options: (NSEnumerationOptions)opts
usingBlock: (GSEnumeratorBlock)block;
- (void) enumerateObjectsAtIndexes: (NSIndexSet*)indexSet
options: (NSEnumerationOptions)opts
usingBlock: (GSEnumeratorBlock)block;
/**
* Returns the indexes of the objects in a collection that match the condition
* specified by the block.
@ -159,13 +163,15 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
* that it should be enumerated in reverse order.
*/
- (NSIndexSet *)indexesOfObjectsWithOptions: (NSEnumerationOptions)opts
passingTest: (GSPredicateBlock)predicate;
- (NSIndexSet *) indexesOfObjectsWithOptions: (NSEnumerationOptions)opts
passingTest: (GSPredicateBlock)predicate;
/**
* Returns the indexes of the objects in a collection that match the condition
* specified by the block.
*/
- (NSIndexSet*)indexesOfObjectsPassingTest: (GSPredicateBlock)predicate;
- (NSIndexSet*) indexesOfObjectsPassingTest: (GSPredicateBlock)predicate;
/**
* Returns the indexes of the objects in a collection that match the condition
* specified by the block and are in the range specified by the index set.
@ -174,9 +180,10 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
* that it should be enumerated in reverse order.
*/
- (NSIndexSet*)indexesOfObjectsAtIndexes: (NSIndexSet*)indexSet
options: (NSEnumerationOptions)opts
passingTest: (GSPredicateBlock)predicate;
- (NSIndexSet*) indexesOfObjectsAtIndexes: (NSIndexSet*)indexSet
options: (NSEnumerationOptions)opts
passingTest: (GSPredicateBlock)predicate;
/**
* Returns the index of the first object in the array that matches the
* condition specified by the block.
@ -185,13 +192,15 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
* that it should be enumerated in reverse order.
*/
- (NSUInteger)indexOfObjectWithOptions: (NSEnumerationOptions)opts
passingTest: (GSPredicateBlock)predicate;
- (NSUInteger) indexOfObjectWithOptions: (NSEnumerationOptions)opts
passingTest: (GSPredicateBlock)predicate;
/**
* Returns the index of the first object in the array that matches the
* condition specified by the block.
*/
- (NSUInteger)indexOfObjectPassingTest: (GSPredicateBlock)predicate;
- (NSUInteger) indexOfObjectPassingTest: (GSPredicateBlock)predicate;
/**
* Returns the index of the first object in the specified range in a collection
* that matches the condition specified by the block.
@ -200,9 +209,10 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
* specifies that it is thread-safe. The NSEnumerationReverse bit specifies
* that it should be enumerated in reverse order.
*/
- (NSUInteger)indexOfObjectAtIndexes: (NSIndexSet*)indexSet
options: (NSEnumerationOptions)opts
passingTest: (GSPredicateBlock)predicate;
- (NSUInteger) indexOfObjectAtIndexes: (NSIndexSet*)indexSet
options: (NSEnumerationOptions)opts
passingTest: (GSPredicateBlock)predicate;
#endif
@end
@ -257,29 +267,6 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*);
@end
@interface NSArray (GSCategories)
/*
* Extension methods for working with sorted arrays - use a binary chop
* to determine the insertion location for an nobject. If equal objects
* already exist in the array, they will be located immediately before
* the insertion position.
*
* The comparator function takes two items as arguments, the first is the
* item to be added, the second is the item already in the array.
* The function should return NSOrderedAscending if the item to be
* added is 'less than' the item in the array, NSOrderedDescending
* if it is greater, and NSOrderedSame if it is equal.
*
* The selector version works the same - returning NSOrderedAscending if
* the receiver is 'less than' the item in the array.
*/
- (NSUInteger) insertionPosition: (id)item
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
context: (void *)context;
- (NSUInteger) insertionPosition: (id)item
usingSelector: (SEL)comp;
@end
#if defined(__cplusplus)
}
#endif