9.1 Data Types
This section lists the data types defined by and used in the
Foundation framework.
typedef enum {
NSCalculationNoError = 0,
NSCalculationLossOfPrecision,
NSCalculationUnderflow,
NSCalculationOverflow,
NSCalculationDivideByZero
} NSCalculationError;
typedef enum _NSComparisonResult {
NSOrderedAscending = -1,
NSOrderedSame,
NSOrderedDescending
} NSComparisonResult;
typedef struct {
signed int _exponent:8;
unsigned int _length:4;
unsigned int _isNegative:11;
unsigned int _isCompact:1;
unsigned int _reserved:18;
unsigned short _mantissa[NSDecimalMaxSize];
} NSDecimal;
typedef struct {
unsigned _pi;
unsigned _si void *_bs;
} NSHashEnumerator;
typedef struct _NSHashTable
NSHashTable;
typedef struct {
unsigned (*hash)(NSHashTable *table, const void *);
BOOL (*isEqual)(NSHashTable *table, const void *, const void *);
void (*retain)(NSHashTable *table, const void *);
void (*release)(NSHashTable *table, void *);
NSString *(*describe)(NSHashTable *table, const void *);
} NSHashTableCallBacks;
typedef enum {
NSPositionAfter,
NSPositionBefore,
NSPositionBeginning,
NSPositionEnd,
NSPositionReplace
} NSInsertionPosition;
typedef struct {
unsigned _pi;
unsigned _si;
void *_bs;
} NSMapEnumerator;
typedef struct _NSMapTable NSMapTable;
typedef struct {
unsigned (*hash)(NSMapTable *table, const void *);
BOOL (*isEqual)(NSMapTable *table, const void *, const void *);
void (*retain)(NSMapTable *table, const void *);
void (*release)(NSMapTable *table, void *);
NSString *(*describe)(NSMapTable *table, const void *);
const void *notAKeyMarker;
} NSMapTableKeyCallBacks;
typedef struct {
void (*retain)(NSMapTable *table, const void *);
void (*release)(NSMapTable *table, void *);
NSString *(*describe)(NSMapTable *table, const void *);
} NSMapTableValueCallBacks;
typedef enum {
NSNetServicesUnknownError = -72000,
NSNetServicesCollisionError = -72001,
NSNetServicesNotFoundError = -72002,
NSNetServicesActivityInProgress = -72003,
NSNetServicesBadArgumentError = -72004,
NSNetServicesCancelledError = -72005,
NSNetServicesInvalidError = -72006
} NSNetServicesError;
typedef enum {
NSNotificationNoCoalescing = 0,
NSNotificationCoalescingOnName = 1,
NSNotificationCoalescingOnSender = 2
} NSNotificationCoalescing;
NSNotificationSuspensionBehavior |
|
typedef enum {
NSNotificationSuspensionBehaviorDrop = 1,
NSNotificationSuspensionBehaviorCoalesce = 2,
NSNotificationSuspensionBehaviorHold = 3,
NSNotificationSuspensionBehaviorDeliverImmediately = 4
} NSNotificationCoalescing;
typedef struct {
enum _NSObjCValueType type;
union {
char charValue;
short shortValue;
long longValue;
long long longlongValue;
float floatValue;
double doubleValue;
bool boolValue;
SEL selectorValue;
id objectValue;
void *pointerValue;
void *structLocation;
char *cStringLocation;
} value;
} NSObjCValue;
typedef struct _NSPoint {
float x;
float y;
} NSPoint;
typedef NSPoint *NSPointArray;
typedef NSPoint *NSPointPointer;
typedef enum {
NSPostWhenIdle = 1,
NSPostASAP = 2,
NSPostNow = 3
} NSPostingStyle;
typedef enum {
NSPropertyListOpenStepFormat = kCFPropertyListOpenStepFormat,
NSPropertyListXMLFormat_v1_0 = kCFPropertyListXMLFormat_v1_0,
NSPropertyListBinaryFormat_v1_0 = kCFPropertyListBinaryFormat_v1_0
} NSPropertyListFormat;
NSPropertyListMutabilityOptions |
|
typedef enum {
NSPropertyListImmutable = kCFPropertyListImmutable,
NSPropertyListMutableContainers = kCFPropertyListMutableContainers,
NSPropertyListMutableContainersAndLeaves = kCFPropertyListMutableContainersAndLeaves
} NSPropertyListMutabilityOptions;
typedef struct _NSRange {
unsigned int location;
unsigned int length;
} NSRange;
typedef NSRange *NSRangePointer;
typedef struct _NSRect {
NSPoint origin;
NSSize size;
} NSRect;
typedef NSRect *NSRectArray;
typedef enum _NSRectEdge {
NSMinXEdge = 0,
NSMinYEdge = 1,
NSMaxXEdge = 2,
NSMaxYEdge = 3
} NSRectEdge;
typedef NSRect *NSRectPointer;
typedef enum {
NSRelativeAfter = 0,
NSRelativeBefore
} NSRelativePosition;
typedef enum {
NSRoundPlain,
NSRoundDown,
NSRoundUp,
NSRoundBankers
} NSRoundingMode;
typedef enum {
NSSaveOptionsYes = 0,
NSSaveOptionsNo,
NSSaveOptionsAsk,
} NSSaveOptions;
typedef enum {
NSApplicationDirectory = 1,
NSDemoApplicationDirectory,
NSDeveloperApplicationDirectory,
NSAdminApplicationDirectory,
NSLibraryDirectory,
NSDeveloperDirectory,
NSUserDirectory,
NSDocumentationDirectory,
NSDocumentDirectory,
NSAllApplicationsDirectory = 100,
NSAllLibrariesDirectory = 101
} NSSearchPathDirectory;
typedef enum {
NSUserDomainMask = 1,
NSLocalDomainMask = 2,
NSNetworkDomainMask = 4,
NSSystemDomainMask = 8,
NSAllDomainsMask = 0x0ffff,
} NSSearchPathDomainMask;
typedef struct _NSSize {
float width;
float height;
} NSSize;
typedef NSSize *NSSizeArray;
typedef NSSize *NSSizePointer;
typedef unsigned NSStringEncoding;
typedef struct {
unsigned long long v;
} NSSwappedDouble;
typedef struct {
unsigned long v;
} NSSwappedFloat;
NSTestComparisonOperation |
|
typedef enum {
NSEqualToComparison = 0,
NSLessThanOrEqualToComparison,
NSLessThanComparison,
NSGreaterThanOrEqualToComparison,
NSGreaterThanComparison,
NSBeginsWithComparison,
NSEndsWithComparison,
NSContainsComparison,
} NSTestComparisonOperation;
typedef double NSTimeInterval;
NSUncaughtExceptionHandler |
|
typedef volatile void NSUncaughtExceptionHandler( NSException *exception);
typedef enum {
NSURLHandleNotLoaded = 0,
NSURLHandleLoadSucceeded,
NSURLHandleLoadInProgress,
NSURLHandleLoadFailed
} NSURLHandleStatus;
NSWhoseSubelementIdentifier |
|
typedef enum {
NSIndexSubelement = 0,
NSEverySubelement = 1,
NSMiddleSubelement = 2,
NSRandomSubelement = 3,
NSNoSubelement = 4
} NSWhoseSubelementIdentifier;
typedef struct _NSZone NSZone;
|