PageRenderTime 54ms CodeModel.GetById 33ms app.highlight 19ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/cocoaint/src/foundation/NSCoder.inc

https://github.com/slibre/freepascal
Pascal | 105 lines | 56 code | 17 blank | 32 comment | 0 complexity | 4e8c46a5239921c3ca17b0eeb1d72f57 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
  1{ Parsed from Foundation.framework NSCoder.h }
  2
  3{$ifdef TYPES}
  4{$ifndef NSCODER_PAS_T}
  5{$define NSCODER_PAS_T}
  6
  7{$endif}
  8{$endif}
  9
 10{$ifdef RECORDS}
 11{$ifndef NSCODER_PAS_R}
 12{$define NSCODER_PAS_R}
 13
 14{$endif}
 15{$endif}
 16
 17{$ifdef FUNCTIONS}
 18{$ifndef NSCODER_PAS_F}
 19{$define NSCODER_PAS_F}
 20
 21{ Functions }
 22function NXReadNSObjectFromCoder(decoder: NSCoder): NSObject; cdecl; external; deprecated 'in Mac OS X 10.5 and later';
 23
 24{$endif}
 25{$endif}
 26
 27{$ifdef EXTERNAL_SYMBOLS}
 28{$ifndef NSCODER_PAS_S}
 29{$define NSCODER_PAS_S}
 30
 31{$endif}
 32{$endif}
 33
 34{$ifdef FORWARD}
 35  NSCoder = objcclass;
 36  NSCoderPointer = ^NSCoder;
 37  NSCoderPtr = NSCoderPointer;
 38
 39{$endif}
 40
 41{$ifdef CLASSES}
 42{$ifndef NSCODER_PAS_C}
 43{$define NSCODER_PAS_C}
 44
 45{ NSCoder }
 46  NSCoder = objcclass external (NSObject)
 47    
 48  public
 49    procedure encodeValueOfObjCType_at(type_: PChar; addr: Pointer); message 'encodeValueOfObjCType:at:';
 50    procedure encodeDataObject(data: NSData); message 'encodeDataObject:';
 51    procedure decodeValueOfObjCType_at(type_: PChar; data: Pointer); message 'decodeValueOfObjCType:at:';
 52    function decodeDataObject: NSData; message 'decodeDataObject';
 53    function versionForClassName(className: NSString): NSInteger; message 'versionForClassName:';
 54  end;
 55
 56{ NSExtendedCoderCategory }
 57  NSExtendedCoderCategory = objccategory external (NSCoder)
 58    procedure encodeObject(object_: id); message 'encodeObject:';
 59    procedure encodeRootObject(rootObject: id); message 'encodeRootObject:';
 60    procedure encodeBycopyObject(anObject: id); message 'encodeBycopyObject:';
 61    procedure encodeByrefObject(anObject: id); message 'encodeByrefObject:';
 62    procedure encodeConditionalObject(object_: id); message 'encodeConditionalObject:';
 63    procedure encodeValuesOfObjCTypes(firstKey: id); varargs; message 'encodeValuesOfObjCTypes:';
 64    procedure encodeArrayOfObjCType_count_at(type_: PChar; count: NSUInteger; array_: Pointer); message 'encodeArrayOfObjCType:count:at:';
 65    procedure encodeBytes_length(byteaddr: Pointer; length: NSUInteger); message 'encodeBytes:length:';
 66    function decodeObject: id; message 'decodeObject';
 67    procedure decodeValuesOfObjCTypes(firstKey: id); varargs; message 'decodeValuesOfObjCTypes:';
 68    procedure decodeArrayOfObjCType_count_at(itemType: PChar; count: NSUInteger; array_: Pointer); message 'decodeArrayOfObjCType:count:at:';
 69    function decodeBytesWithReturnedLength(lengthp: NSUIntegerPtr): Pointer; message 'decodeBytesWithReturnedLength:';
 70    procedure encodePropertyList(aPropertyList: id); message 'encodePropertyList:';
 71    function decodePropertyList: id; message 'decodePropertyList';
 72    procedure setObjectZone(zone_: NSZonePtr); message 'setObjectZone:';
 73    function objectZone: NSZonePtr; message 'objectZone';
 74    function systemVersion: cuint; message 'systemVersion';
 75    function allowsKeyedCoding: Boolean; message 'allowsKeyedCoding';
 76    procedure encodeObject_forKey(objv: id; key: NSString); message 'encodeObject:forKey:';
 77    procedure encodeConditionalObject_forKey(objv: id; key: NSString); message 'encodeConditionalObject:forKey:';
 78    procedure encodeBool_forKey(boolv: Boolean; key: NSString); message 'encodeBool:forKey:';
 79    procedure encodeInt_forKey(intv: cint; key: NSString); message 'encodeInt:forKey:';
 80    procedure encodeInt32_forKey(intv: cint32; key: NSString); message 'encodeInt32:forKey:';
 81    procedure encodeInt64_forKey(intv: cint64; key: NSString); message 'encodeInt64:forKey:';
 82    procedure encodeFloat_forKey(realv: single; key: NSString); message 'encodeFloat:forKey:';
 83    procedure encodeDouble_forKey(realv: double; key: NSString); message 'encodeDouble:forKey:';
 84    procedure encodeBytes_length_forKey(bytesp: pbyte; lenv: NSUInteger; key: NSString); message 'encodeBytes:length:forKey:';
 85    function containsValueForKey(key: NSString): Boolean; message 'containsValueForKey:';
 86    function decodeObjectForKey(key: NSString): id; message 'decodeObjectForKey:';
 87    function decodeBoolForKey(key: NSString): Boolean; message 'decodeBoolForKey:';
 88    function decodeIntForKey(key: NSString): cint; message 'decodeIntForKey:';
 89    function decodeInt32ForKey(key: NSString): cint32; message 'decodeInt32ForKey:';
 90    function decodeInt64ForKey(key: NSString): cint64; message 'decodeInt64ForKey:';
 91    function decodeFloatForKey(key: NSString): single; message 'decodeFloatForKey:';
 92    function decodeDoubleForKey(key: NSString): double; message 'decodeDoubleForKey:';
 93    function decodeBytesForKey_returnedLength(key: NSString; lengthp: NSUIntegerPtr): pbyte; message 'decodeBytesForKey:returnedLength:';
 94    procedure encodeInteger_forKey(intv: NSInteger; key: NSString); message 'encodeInteger:forKey:';
 95    function decodeIntegerForKey(key: NSString): NSInteger; message 'decodeIntegerForKey:';
 96  end;
 97
 98{ NSTypedstreamCompatibilityCategory }
 99  NSTypedstreamCompatibilityCategory = objccategory external (NSCoder)
100    procedure encodeNXObject(object_: id); message 'encodeNXObject:'; deprecated 'in Mac OS X 10.5 and later';
101    function decodeNXObject: id; message 'decodeNXObject'; deprecated 'in Mac OS X 10.5 and later';
102  end;
103
104{$endif}
105{$endif}