comparison dwt/internal/cocoa/NSKeyedArchiver.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
36 super(id); 36 super(id);
37 } 37 }
38 38
39 public static bool archiveRootObject (id rootObject, NSString path) 39 public static bool archiveRootObject (id rootObject, NSString path)
40 { 40 {
41 return OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archiveRootObject_1toFile_1, rootObject !is null ? rootObject.id : null, 41 return OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archiveRootObject_1toFile_1, rootObject !is null ? rootObject.id_ : null,
42 path !is null ? path.id : null) !is null; 42 path !is null ? path.id_ : null) !is null;
43 } 43 }
44 44
45 public static NSData archivedDataWithRootObject (id rootObject) 45 public static NSData archivedDataWithRootObject (id rootObject)
46 { 46 {
47 objc.id result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archivedDataWithRootObject_1, rootObject !is null ? rootObject.id : null); 47 objc.id result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archivedDataWithRootObject_1, rootObject !is null ? rootObject.id_ : null);
48 return result !is null ? new NSData(result) : null; 48 return result !is null ? new NSData(result) : null;
49 } 49 }
50 50
51 public NSString classNameForClass_ (objc.Class cls) 51 public NSString classNameForClass_ (objc.Class cls)
52 { 52 {
53 objc.id result = OS.objc_msgSend(this.id, OS.sel_classNameForClass_1, cls); 53 objc.id result = OS.objc_msgSend(this.id_, OS.sel_classNameForClass_1, cls);
54 return result !is null ? new NSString(result) : null; 54 return result !is null ? new NSString(result) : null;
55 } 55 }
56 56
57 public static NSString static_classNameForClass_ (objc.Class cls) 57 public static NSString static_classNameForClass_ (objc.Class cls)
58 { 58 {
60 return result !is null ? new NSString(result) : null; 60 return result !is null ? new NSString(result) : null;
61 } 61 }
62 62
63 public id delegatee () 63 public id delegatee ()
64 { 64 {
65 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); 65 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
66 return result !is null ? new id(result) : null; 66 return result !is null ? new id(result) : null;
67 } 67 }
68 68
69 public void encodeBool (bool boolv, NSString key) 69 public void encodeBool (bool boolv, NSString key)
70 { 70 {
71 OS.objc_msgSend(this.id, OS.sel_encodeBool_1forKey_1, boolv, key !is null ? key.id : null); 71 OS.objc_msgSend(this.id_, OS.sel_encodeBool_1forKey_1, boolv, key !is null ? key.id_ : null);
72 } 72 }
73 73
74 public void encodeBytes (/*const*/ubyte* bytesp, NSUInteger lenv, NSString key) 74 public void encodeBytes (/*const*/ubyte* bytesp, NSUInteger lenv, NSString key)
75 { 75 {
76 OS.objc_msgSend(this.id, OS.sel_encodeBytes_1length_1forKey_1, bytesp, lenv, key !is null ? key.id : null); 76 OS.objc_msgSend(this.id_, OS.sel_encodeBytes_1length_1forKey_1, bytesp, lenv, key !is null ? key.id_ : null);
77 } 77 }
78 78
79 public void encodeConditionalObject (id objv, NSString key) 79 public void encodeConditionalObject (id objv, NSString key)
80 { 80 {
81 OS.objc_msgSend(this.id, OS.sel_encodeConditionalObject_1forKey_1, objv !is null ? objv.id : null, key !is null ? key.id : null); 81 OS.objc_msgSend(this.id_, OS.sel_encodeConditionalObject_1forKey_1, objv !is null ? objv.id_ : null, key !is null ? key.id_ : null);
82 } 82 }
83 83
84 public void encodeDouble (double realv, NSString key) 84 public void encodeDouble (double realv, NSString key)
85 { 85 {
86 OS.objc_msgSend(this.id, OS.sel_encodeDouble_1forKey_1, realv, key !is null ? key.id : null); 86 OS.objc_msgSend(this.id_, OS.sel_encodeDouble_1forKey_1, realv, key !is null ? key.id_ : null);
87 } 87 }
88 88
89 public void encodeFloat (float realv, NSString key) 89 public void encodeFloat (float realv, NSString key)
90 { 90 {
91 OS.objc_msgSend(this.id, OS.sel_encodeFloat_1forKey_1, realv, key !is null ? key.id : null); 91 OS.objc_msgSend(this.id_, OS.sel_encodeFloat_1forKey_1, realv, key !is null ? key.id_ : null);
92 } 92 }
93 93
94 public void encodeInt32 (int intv, NSString key) 94 public void encodeInt32 (int intv, NSString key)
95 { 95 {
96 OS.objc_msgSend(this.id, OS.sel_encodeInt32_1forKey_1, intv, key !is null ? key.id : null); 96 OS.objc_msgSend(this.id_, OS.sel_encodeInt32_1forKey_1, intv, key !is null ? key.id_ : null);
97 } 97 }
98 98
99 public void encodeInt64 (long intv, NSString key) 99 public void encodeInt64 (long intv, NSString key)
100 { 100 {
101 OS.objc_msgSend(this.id, OS.sel_encodeInt64_1forKey_1, intv, key !is null ? key.id : null); 101 OS.objc_msgSend(this.id_, OS.sel_encodeInt64_1forKey_1, intv, key !is null ? key.id_ : null);
102 } 102 }
103 103
104 public void encodeInt (int intv, NSString key) 104 public void encodeInt (int intv, NSString key)
105 { 105 {
106 OS.objc_msgSend(this.id, OS.sel_encodeInt_1forKey_1, intv, key !is null ? key.id : null); 106 OS.objc_msgSend(this.id_, OS.sel_encodeInt_1forKey_1, intv, key !is null ? key.id_ : null);
107 } 107 }
108 108
109 public void encodeObject (id objv, NSString key) 109 public void encodeObject (id objv, NSString key)
110 { 110 {
111 OS.objc_msgSend(this.id, OS.sel_encodeObject_1forKey_1, objv !is null ? objv.id : null, key !is null ? key.id : null); 111 OS.objc_msgSend(this.id_, OS.sel_encodeObject_1forKey_1, objv !is null ? objv.id_ : null, key !is null ? key.id_ : null);
112 } 112 }
113 113
114 public void finishEncoding () 114 public void finishEncoding ()
115 { 115 {
116 OS.objc_msgSend(this.id, OS.sel_finishEncoding); 116 OS.objc_msgSend(this.id_, OS.sel_finishEncoding);
117 } 117 }
118 118
119 public id initForWritingWithMutableData (NSMutableData data) 119 public id initForWritingWithMutableData (NSMutableData data)
120 { 120 {
121 objc.id result = OS.objc_msgSend(this.id, OS.sel_initForWritingWithMutableData_1, data !is null ? data.id : null); 121 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initForWritingWithMutableData_1, data !is null ? data.id_ : null);
122 return result !is null ? new id(result) : null; 122 return result !is null ? new id(result) : null;
123 } 123 }
124 124
125 public NSPropertyListFormat outputFormat () 125 public NSPropertyListFormat outputFormat ()
126 { 126 {
127 return OS.objc_msgSend(this.id, OS.sel_outputFormat); 127 return cast(NSPropertyListFormat) OS.objc_msgSend(this.id_, OS.sel_outputFormat);
128 } 128 }
129 129
130 public static void static_setClassName_forClass_ (NSString codedName, objc.Class cls) 130 public static void static_setClassName_forClass_ (NSString codedName, objc.Class cls)
131 { 131 {
132 OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_setClassName_1forClass_1, codedName !is null ? codedName.id : null, cls); 132 OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_setClassName_1forClass_1, codedName !is null ? codedName.id_ : null, cls);
133 } 133 }
134 134
135 public void setClassName_forClass_ (NSString codedName, objc.Class cls) 135 public void setClassName_forClass_ (NSString codedName, objc.Class cls)
136 { 136 {
137 OS.objc_msgSend(this.id, OS.sel_setClassName_1forClass_1, codedName !is null ? codedName.id : null, cls); 137 OS.objc_msgSend(this.id_, OS.sel_setClassName_1forClass_1, codedName !is null ? codedName.id_ : null, cls);
138 } 138 }
139 139
140 public void setDelegate (id delegatee) 140 public void setDelegate (id delegatee)
141 { 141 {
142 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null); 142 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
143 } 143 }
144 144
145 public void setOutputFormat (NSPropertyListFormat format) 145 public void setOutputFormat (NSPropertyListFormat format)
146 { 146 {
147 OS.objc_msgSend(this.id, OS.sel_setOutputFormat_1, format); 147 OS.objc_msgSend(this.id_, OS.sel_setOutputFormat_1, format);
148 } 148 }
149 149
150 } 150 }