Return to Contents
Copyright (c) 1994 by NeXT Computer, Inc. All Rights Reserved.

Types and Constants

Exception Handling

typedef struct _NSHandler NSHandler; Exception handler information.

typedef volatile void NSUncaughtExceptionHandler(NSException *exception);

Register an uncaught exception handler.

NSString *NSInconsistentArchiveException; Consistency error in archive file.

NSString *NSGenericException; General programming error.

NSString *NSInternalInconsistencyException; Some item that should be invariant changed.

NSString *NSInvalidArgumentException; Invalid argument.

NSString *NSMallocException; No memory left to allocate.

NSString *NSRangeException; Attempt to access an element beyond the limit of an array or similar structure.

NSString *NSByteStoreLockedException;

NSString *NSByteStoreVersionException;

NSString *NSBTreeStoreKeyTooLargeException;

NSString *NSByteStoreDamagedException;

Geometry

typedef struct _NSPoint { Point definition.

float x;

float y;

} NSPoint;

typedef struct _NSSize { Rectangle sizes.

float width;

float height;

} NSSize;

typedef struct _NSRect { Rectangle.

NSPoint origin;

NSSize size;

} NSRect;

typedef enum _NSRectEdge { Sides of a rectangle.

NSMinXEdge,

NSMinYEdge,

NSMaxXEdge,

NSMaxYEdge

} NSRectEdge;

const NSPoint NSZeroPoint; A zero point.

const NSRect NSZeroRect; A zero origin rectangle.

const NSSize NSZeroSize; A zero size rectangle.

Hash Table

typedef struct NSHashEnumerator; Private type for enumerating.

typedef struct _NSHashTable NSHashTable; Hash table type.

typedef struct { Callback functions.

unsigned (*hash)(NSHashTable *table, const void *anObject);

Hashing function. Note: Elements with equal values must have equal hash function values.

BOOL (*isEqual)(NSHashTable *table, const void *anObject, const void *anObject);

Comparison function.

void (*retain)(NSHashTable *table, const void *anObject);

Retaining function called when adding elements to table.

void (*release)(NSHashTable *table, void *anObject);

Releasing function called when a data element is removed from the table.

NSString *(*describe)(NSHashTable *table, const void *anObject);

Description function.

} NSHashTableCallBacks;

const NSHashTableCallBacks NSIntHashCallBacks; For sets of pointer-sized or smaller quantities.

const NSHashTableCallBacks NSNonOwnedPointerHashCallBacks;

For sets of pointers hashed by address.

const NSHashTableCallBacks NSNonRetainedObjectHashCallBacks;

For sets of objects without retaining and releasing.

const NSHashTableCallBacks NSObjectHashCallBacks;

For sets of objects; similar to NSSet.

const NSHashTableCallBacks NSOwnedPointerHashCallBacks;

For sets of pointers with transfer of ownership upon insertion.

const NSHashTableCallBacks NSPointerToStructHashCallBacks;

For sets of pointers to structs when the first field of the struct is the size of an int.

Map Table

typedef struct NSMapEnumerator; Private type for enumerating.

typedef struct _NSMapTable NSMapTable; Map table type.

typedef struct { Callback functions for a key.

unsigned (*hash)(NSMapTable *table, const void *anObject);

Hashing function. Note: Elements with equal values must have equal hash function values.

BOOL (*isEqual)(NSMapTable *table, const void *anObject, const void *anObject);

Comparison function.

void (*retain)(NSMapTable *table, const void *anObject);

Retaining function called when adding elements to table.

void (*release)(NSMapTable *table, void *anObject);

Releasing function called when a data element is removed from the table.

NSString *(*describe)(NSMapTable *table, const void *anObject);

Description function.

const void *notAKeyMarker; Quantity that is not a key to the hash table.

} NSMapTableKeyCallBacks;

typedef struct { Callback functions for a value.

void (*retain)(NSMapTable *table, const void *anObject);

Retaining function called when adding elements to table.

void (*release)(NSMapTable *table, void *anObject);

Releasing function called when a data element is removed from the table.

NSString *(*describe)(NSMapTable *table, const void *anObject);

Description function.

} NSMapTableValueCallBacks;

#define NSNotAnIntMapKey; Quantity that is never a map key.

#define NSNotAPointerMapKey; Quantity that is never a map key.

const NSMapTableKeyCallBacks NSIntMapKeyCallBacks;

For keys that are pointer-sized or smaller quantities.

const NSMapTableValueCallBacks NSIntMapValueCallBacks;

For values that are pointer-sized quantities.

const NSMapTableKeyCallBacks NSNonOwnedPointerMapKeyCallBacks;

For keys that are pointers not freed.

const NSMapTableValueCallBacks NSNonOwnedPointerMapValueCallBacks;

For values that are owned pointers.

const NSMapTableKeyCallBacks NSNonOwnedPointerOrNullMapKeyCallBacks;

For keys that are pointers not freed, or NULL.

const NSMapTableKeyCallBacks NSNonRetainedObjectMapKeyCallBacks;

For sets of objects without retaining and releasing.

const NSMapTableKeyCallBacks NSObjectMapKeyCallBacks;

For keys that are objects.

const NSMapTableValueCallBacks NSObjectMapValueCallBacks;

For values that are objects.

const NSMapTableKeyCallBacks NSOwnedPointerMapKeyCallBacks;

For keys that are pointers with transfer of ownership upon insertion.

const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks;

For values that are owned pointers.

Notification Queue

typedef enum {

NSPostWhenIdle, Post the notification when the run loop is idle .

NSPostASAP, Post the notification as soon as possible.

NSPostNow Post the notification immediately.

} NSPostingStyle;

typedef enum {

NSNotificationNoCoalescing, Do not coalesce similar notifications in the queue.

NSNotificationCoalescingOnName, Coalesce notifications in the queue matching name.

NSNotificationCoalescingOnSender, Coalesce notifications in the queue matching sender.

} NSNotificationCoalescing;

Run Loop

NSString *NSConnectionReplyMode; NSRunLoop mode in which Distributed Object system seeks replies.

NSString *NSDefaultRunLoopMode; Common NSRunLoop mode.

Search Results

typedef enum _NSComparisonResult { Ordered comparison results.

NSOrderedAscending,

NSOrderedSame,

NSOrderedDescending

} NSComparisonResult;

enum { Flags passed to various search methods.

NSCaseInsensitiveSearch,

NSLiteralSearch,

NSBackwardsSearch,

NSAnchoredSearch

};

enum {NSNotFound}; Indicates an item not found.

String

typedef unsigned NSStringEncoding; Known encodings.

enum Known encodings.

NSASCIIStringEncoding,

NSNEXTSTEPStringEncoding,

NSJapaneseEUCStringEncoding,

NSUTF8StringEncoding,

NSISOLatin1StringEncoding ,

NSSymbolStringEncoding ,

NSNonLossyASCIIStringEncoding,

NSShiftJISStringEncoding,

NSISOLatin2StringEncoding,

NSUnicodeStringEncoding

};

enum _NSOpenStepUnicodeReservedBase { Base for Unicode characters.

NSOpenStepUnicodeReservedBase

};

NSHashStringLength; Hash string length.

NSMaximumStringLength; Maximum string length.

Threads

typedef enum { Thread priorities.

NSInteractiveThreadPriority,

NSBackgroundThreadPriority,

NSLowThreadPriority

} NSThreadPriority;

NSString *NSBecomingMultiThreaded; Notifications.

NSString *NSThreadExiting;

User Defaults

NSString *NSArgumentDomain; For defaults parsed from the application's arguments.

NSString *NSGlobalDomain; For defaults seen by all applications.

NSString *NSRegistrationDomain; For registered defaults.

NSString *NSUserDefaultsChanged; Public notification.

NSString *NSWeekDayNameArray; Keys for language-dependent information.

NSString *NSShortWeekDayNameArray;

NSString *NSMonthNameArray;

NSString *NSShortMonthNameArray;

NSString *NSTimeFormatString;

NSString *NSDateFormatString;

NSString *NSTimeDateFormatString;

NSString *NSShortTimeDateFormatString;

NSString *NSCurrencySymbol;

NSString *NSDecimalSeparator;

NSString *NSThousandsSeparator;

NSString *NSInternationalCurrencyString;

NSString *NSCurrencyString;

NSString *NSDecimalDigits;

NSString *NSAMPMDesignation;

Miscellaneous

typedef struct { Specifies layout of arguments used in invocations.

int offset;

int size;

char *type;

} NSArgumentInfo;

typedef struct _NSRange { Specifies a range of items in arrays, strings, and so on.

unsigned int location;

unsigned int length;

} NSRange;

typedef double NSTimeInterval; Time interval difference between two dates.

typedef struct _NSZone NSZone; Large region allocation.

typedef int NSBTreeComparator(NSData *, NSData *, const void *);