DekGenius.com
[ Team LiB ] Previous Section Next Section

9.1 Data Types

This section lists the data types defined by and used in the Foundation framework.

NSCalculationError

typedef enum {
    NSCalculationNoError = 0,
    NSCalculationLossOfPrecision,
    NSCalculationUnderflow,
    NSCalculationOverflow,
    NSCalculationDivideByZero
} NSCalculationError;
NSComparisonResult

typedef enum _NSComparisonResult {
    NSOrderedAscending = -1,
    NSOrderedSame,
    NSOrderedDescending
} NSComparisonResult;
NSDecimal

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;
NSHashEnumerator

typedef struct {
    unsigned _pi;
    unsigned _si void *_bs;
} NSHashEnumerator;
NSHashTable

typedef struct _NSHashTable
NSHashTable;
NSHashTableCallBacks

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;
NSInsertionPosition

typedef enum {
    NSPositionAfter,
    NSPositionBefore,
    NSPositionBeginning,
    NSPositionEnd,
    NSPositionReplace
} NSInsertionPosition;
NSMapEnumerator

typedef struct {
    unsigned _pi;
    unsigned _si;
    void *_bs;
} NSMapEnumerator;
NSMapTable

typedef struct _NSMapTable NSMapTable;
NSMapTableKeyCallBacks

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;
NSMapTableValueCallBacks

typedef struct {
    void (*retain)(NSMapTable *table, const void *);
    void (*release)(NSMapTable *table, void *);
    NSString *(*describe)(NSMapTable *table, const void *);
} NSMapTableValueCallBacks;
NSNetServicesError

typedef enum {
    NSNetServicesUnknownError = -72000,
    NSNetServicesCollisionError = -72001,
    NSNetServicesNotFoundError = -72002,
    NSNetServicesActivityInProgress = -72003,
    NSNetServicesBadArgumentError = -72004,
    NSNetServicesCancelledError = -72005,
    NSNetServicesInvalidError = -72006
} NSNetServicesError;
NSNotificationCoalescing

typedef enum {
    NSNotificationNoCoalescing = 0,
    NSNotificationCoalescingOnName = 1,
    NSNotificationCoalescingOnSender = 2
} NSNotificationCoalescing;
NSNotificationSuspensionBehavior

typedef enum {
    NSNotificationSuspensionBehaviorDrop = 1,
    NSNotificationSuspensionBehaviorCoalesce = 2,
    NSNotificationSuspensionBehaviorHold = 3,
    NSNotificationSuspensionBehaviorDeliverImmediately = 4
} NSNotificationCoalescing;
NSObjCValue

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;
NSPoint

typedef struct _NSPoint {
    float x;
    float y;
} NSPoint;
NSPointArray

typedef NSPoint *NSPointArray;
NSPointPointer

typedef NSPoint *NSPointPointer;
NSPostingStyle

typedef enum {
    NSPostWhenIdle = 1,
    NSPostASAP = 2,
    NSPostNow = 3
} NSPostingStyle;
NSPropertyListFormat

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;
NSRange

typedef struct _NSRange {
    unsigned int location;
    unsigned int length;
} NSRange;
NSRangePointer

typedef NSRange *NSRangePointer;
NSRect

typedef struct _NSRect {
    NSPoint origin;
    NSSize size;
} NSRect;
NSRectArray

typedef NSRect *NSRectArray;
NSRectEdge

typedef enum _NSRectEdge {
    NSMinXEdge = 0,
    NSMinYEdge = 1,
    NSMaxXEdge = 2,
    NSMaxYEdge = 3
} NSRectEdge;
NSRectPointer

typedef NSRect *NSRectPointer;
NSRelativePosition

typedef enum {
    NSRelativeAfter = 0,
    NSRelativeBefore
} NSRelativePosition;
NSRoundingMode

typedef enum {
    NSRoundPlain,
    NSRoundDown,
    NSRoundUp,
    NSRoundBankers
} NSRoundingMode;
NSSaveOptions

typedef enum {
    NSSaveOptionsYes = 0,
    NSSaveOptionsNo,
    NSSaveOptionsAsk,
} NSSaveOptions;
NSSearchPathDirectory

typedef enum {
    NSApplicationDirectory = 1,
    NSDemoApplicationDirectory,
    NSDeveloperApplicationDirectory,
    NSAdminApplicationDirectory,
    NSLibraryDirectory,
    NSDeveloperDirectory,
    NSUserDirectory,
    NSDocumentationDirectory,
    NSDocumentDirectory,
    NSAllApplicationsDirectory = 100,
    NSAllLibrariesDirectory = 101
} NSSearchPathDirectory;
NSSearchPathDomainMask

typedef enum {
    NSUserDomainMask = 1,
    NSLocalDomainMask = 2,
    NSNetworkDomainMask = 4,
    NSSystemDomainMask = 8,
    NSAllDomainsMask = 0x0ffff,
} NSSearchPathDomainMask;
NSSize

typedef struct _NSSize {
    float width;
    float height;
} NSSize;
NSSizeArray

typedef NSSize *NSSizeArray;
NSSizePointer

typedef NSSize *NSSizePointer;
NSStringEncoding

typedef unsigned NSStringEncoding;
NSSwappedDouble

typedef struct {
    unsigned long long v;
} NSSwappedDouble;
NSSwappedFloat

typedef struct {
    unsigned long v;
} NSSwappedFloat;
NSTestComparisonOperation

typedef enum {
    NSEqualToComparison = 0,
    NSLessThanOrEqualToComparison,
    NSLessThanComparison,
    NSGreaterThanOrEqualToComparison,
    NSGreaterThanComparison,
    NSBeginsWithComparison,
    NSEndsWithComparison,
    NSContainsComparison,
} NSTestComparisonOperation;
NSTimeInterval

typedef double NSTimeInterval;
NSUncaughtExceptionHandler

typedef volatile void NSUncaughtExceptionHandler( NSException *exception);
NSURLHandleStatus

typedef enum {
    NSURLHandleNotLoaded = 0,
    NSURLHandleLoadSucceeded,
    NSURLHandleLoadInProgress,
    NSURLHandleLoadFailed
} NSURLHandleStatus;
NSWhoseSubelementIdentifier

typedef enum {
    NSIndexSubelement = 0,
    NSEverySubelement = 1,
    NSMiddleSubelement = 2,
    NSRandomSubelement = 3,
    NSNoSubelement = 4
} NSWhoseSubelementIdentifier;
NSZone

typedef struct _NSZone NSZone;
    [ Team LiB ] Previous Section Next Section