Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSUnarchiver.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
35 } | 35 } |
36 | 36 |
37 public static NSString static_classNameDecodedForArchiveClassName_ (NSString inArchiveName) | 37 public static NSString static_classNameDecodedForArchiveClassName_ (NSString inArchiveName) |
38 { | 38 { |
39 objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_classNameDecodedForArchiveClassName_1, | 39 objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_classNameDecodedForArchiveClassName_1, |
40 inArchiveName !is null ? inArchiveName.id : null); | 40 inArchiveName !is null ? inArchiveName.id_ : null); |
41 return result !is null ? new NSString(result) : null; | 41 return result !is null ? new NSString(result) : null; |
42 } | 42 } |
43 | 43 |
44 public NSString classNameDecodedForArchiveClassName_ (NSString inArchiveName) | 44 public NSString classNameDecodedForArchiveClassName_ (NSString inArchiveName) |
45 { | 45 { |
46 objc.id result = OS.objc_msgSend(this.id, OS.sel_classNameDecodedForArchiveClassName_1, inArchiveName !is null ? inArchiveName.id : null); | 46 objc.id result = OS.objc_msgSend(this.id_, OS.sel_classNameDecodedForArchiveClassName_1, inArchiveName !is null ? inArchiveName.id_ : null); |
47 return result !is null ? new NSString(result) : null; | 47 return result !is null ? new NSString(result) : null; |
48 } | 48 } |
49 | 49 |
50 public void decodeClassName_asClassName_ (NSString inArchiveName, NSString trueName) | 50 public void decodeClassName_asClassName_ (NSString inArchiveName, NSString trueName) |
51 { | 51 { |
52 OS.objc_msgSend(this.id, OS.sel_decodeClassName_1asClassName_1, inArchiveName !is null ? inArchiveName.id : null, | 52 OS.objc_msgSend(this.id_, OS.sel_decodeClassName_1asClassName_1, inArchiveName !is null ? inArchiveName.id_ : null, |
53 trueName !is null ? trueName.id : null); | 53 trueName !is null ? trueName.id_ : null); |
54 } | 54 } |
55 | 55 |
56 public static void static_decodeClassName_asClassName_ (NSString inArchiveName, NSString trueName) | 56 public static void static_decodeClassName_asClassName_ (NSString inArchiveName, NSString trueName) |
57 { | 57 { |
58 OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_decodeClassName_1asClassName_1, inArchiveName !is null ? inArchiveName.id : null, | 58 OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_decodeClassName_1asClassName_1, inArchiveName !is null ? inArchiveName.id_ : null, |
59 trueName !is null ? trueName.id : null); | 59 trueName !is null ? trueName.id_ : null); |
60 } | 60 } |
61 | 61 |
62 public id initForReadingWithData (NSData data) | 62 public id initForReadingWithData (NSData data) |
63 { | 63 { |
64 objc.id result = OS.objc_msgSend(this.id, OS.sel_initForReadingWithData_1, data !is null ? data.id : null); | 64 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initForReadingWithData_1, data !is null ? data.id_ : null); |
65 return result !is null ? new id(result) : null; | 65 return result !is null ? new id(result) : null; |
66 } | 66 } |
67 | 67 |
68 public bool isAtEnd () | 68 public bool isAtEnd () |
69 { | 69 { |
70 return OS.objc_msgSend(this.id, OS.sel_isAtEnd) !is null; | 70 return OS.objc_msgSend(this.id_, OS.sel_isAtEnd) !is null; |
71 } | 71 } |
72 | 72 |
73 public NSZone* objectZone () | 73 public NSZone* objectZone () |
74 { | 74 { |
75 return OS.objc_msgSend(this.id, OS.sel_objectZone); | 75 return cast(NSZone*) OS.objc_msgSend(this.id_, OS.sel_objectZone); |
76 } | 76 } |
77 | 77 |
78 public void replaceObject (id object, id newObject) | 78 public void replaceObject (id object, id newObject) |
79 { | 79 { |
80 OS.objc_msgSend(this.id, OS.sel_replaceObject_1withObject_1, object !is null ? object.id : null, newObject !is null ? newObject.id : null); | 80 OS.objc_msgSend(this.id_, OS.sel_replaceObject_1withObject_1, object !is null ? object.id_ : null, newObject !is null ? newObject.id_ : null); |
81 } | 81 } |
82 | 82 |
83 public void setObjectZone (NSZone* zone) | 83 public void setObjectZone (NSZone* zone) |
84 { | 84 { |
85 OS.objc_msgSend(this.id, OS.sel_setObjectZone_1, zone); | 85 OS.objc_msgSend(this.id_, OS.sel_setObjectZone_1, zone); |
86 } | 86 } |
87 | 87 |
88 public uint systemVersion () | 88 public uint systemVersion () |
89 { | 89 { |
90 return cast(uint) OS.objc_msgSend(this.id, OS.sel_systemVersion); | 90 return cast(uint) OS.objc_msgSend(this.id_, OS.sel_systemVersion); |
91 } | 91 } |
92 | 92 |
93 public static id unarchiveObjectWithData (NSData data) | 93 public static id unarchiveObjectWithData (NSData data) |
94 { | 94 { |
95 objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_unarchiveObjectWithData_1, data !is null ? data.id : null); | 95 objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_unarchiveObjectWithData_1, data !is null ? data.id_ : null); |
96 return result !is null ? new id(result) : null; | 96 return result !is null ? new id(result) : null; |
97 } | 97 } |
98 | 98 |
99 public static id unarchiveObjectWithFile (NSString path) | 99 public static id unarchiveObjectWithFile (NSString path) |
100 { | 100 { |
101 objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_unarchiveObjectWithFile_1, path !is null ? path.id : null); | 101 objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_unarchiveObjectWithFile_1, path !is null ? path.id_ : null); |
102 return result !is null ? new id(result) : null; | 102 return result !is null ? new id(result) : null; |
103 } | 103 } |
104 | 104 |
105 } | 105 } |