ObjFW  Check-in [e259d77a62]

Overview
Comment:Documentation improvement (replaced "an uint*" with "a uint*").
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e259d77a6292ad1a385662bbb53f589ff331d1d75444fc70515bed91a6d75bc5
User & Date: js on 2010-04-30 13:59:32
Other Links: manifest | tags
Context
2010-04-30
14:12
Fix "make tarball" for new paths. check-in: 6b4749adcc user: js tags: trunk
13:59
Documentation improvement (replaced "an uint*" with "a uint*"). check-in: e259d77a62 user: js tags: trunk
13:07
OFNumber API improvement. check-in: e4344e3c5e user: js tags: trunk
Changes

Modified src/OFNumber.h from [ec96a4eaff] to [fefd022278].

145
146
147
148
149
150
151
152

153
154
155
156
157
158

159
160
161
162
163
164

165
166
167
168
169
170

171
172
173
174
175
176
177
145
146
147
148
149
150
151

152
153
154
155
156
157

158
159
160
161
162
163

164
165
166
167
168
169

170
171
172
173
174
175
176
177







-
+





-
+





-
+





-
+







/**
 * \param int64 An int64_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt64: (int64_t)int64;

/**
 * \param uint8 An uint8_t which the OFNumber should contain
 * \param uint8 A uint8_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt8: (uint8_t)uint8;

/**
 * \param uint16 An uint16_t which the OFNumber should contain
 * \param uint16 A uint16_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt16: (uint16_t)uint16;

/**
 * \param uint32 An uint32_t which the OFNumber should contain
 * \param uint32 A uint32_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt32: (uint32_t)uint32;

/**
 * \param uint64 An uint64_t which the OFNumber should contain
 * \param uint64 A uint64_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt64: (uint64_t)uint64;

/**
 * \param size A size_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
187
188
189
190
191
192
193
194

195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212

213
214
215
216
217
218
219
187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

212
213
214
215
216
217
218
219







-
+

















-
+







/**
 * \param intmax An intmax_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithIntMax: (intmax_t)intmax;

/**
 * \param uintmax An uintmax_t which the OFNumber should contain
 * \param uintmax A uintmax_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUIntMax: (uintmax_t)uintmax;

/**
 * \param ptrdiff A ptrdiff_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithPtrDiff: (ptrdiff_t)ptrdiff;

/**
 * \param intptr An intptr_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithIntPtr: (intptr_t)intptr;

/**
 * \param uintptr An uintptr_t which the OFNumber should contain
 * \param uintptr A uintptr_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUIntPtr: (uintptr_t)uintptr;

/**
 * \param float_ A float which the OFNumber should contain
 * \return A new autoreleased OFNumber
321
322
323
324
325
326
327
328

329
330
331
332
333
334
335
336

337
338
339
340
341
342
343
344

345
346
347
348
349
350
351
352

353
354
355
356
357
358
359
321
322
323
324
325
326
327

328
329
330
331
332
333
334
335

336
337
338
339
340
341
342
343

344
345
346
347
348
349
350
351

352
353
354
355
356
357
358
359







-
+







-
+







-
+







-
+







 * \return An initialized OFNumber
 */
- initWithInt64: (int64_t)int64;

/**
 * Initializes an already allocated OFNumber with the specified uint8_t.
 *
 * \param uint8 An uint8_t which the OFNumber should contain
 * \param uint8 A uint8_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUInt8: (uint8_t)uint8;

/**
 * Initializes an already allocated OFNumber with the specified uint16_t.
 *
 * \param uint16 An uint16_t which the OFNumber should contain
 * \param uint16 A uint16_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUInt16: (uint16_t)uint16;

/**
 * Initializes an already allocated OFNumber with the specified uint32_t.
 *
 * \param uint32 An uint32_t which the OFNumber should contain
 * \param uint32 A uint32_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUInt32: (uint32_t)uint32;

/**
 * Initializes an already allocated OFNumber with the specified uint64_t.
 *
 * \param uint64 An uint64_t which the OFNumber should contain
 * \param uint64 A uint64_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUInt64: (uint64_t)uint64;

/**
 * Initializes an already allocated OFNumber with the specified size_t.
 *
377
378
379
380
381
382
383
384

385
386
387
388
389
390
391
377
378
379
380
381
382
383

384
385
386
387
388
389
390
391







-
+







 * \return An initialized OFNumber
 */
- initWithIntMax: (intmax_t)intmax;

/**
 * Initializes an already allocated OFNumber with the specified uintmax_t.
 *
 * \param uintmax An uintmax_t which the OFNumber should contain
 * \param uintmax A uintmax_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUIntMax: (uintmax_t)uintmax;

/**
 * Initializes an already allocated OFNumber with the specified ptrdiff_t.
 *
401
402
403
404
405
406
407
408

409
410
411
412
413
414
415
401
402
403
404
405
406
407

408
409
410
411
412
413
414
415







-
+







 * \return An initialized OFNumber
 */
- initWithIntPtr: (intptr_t)intptr;

/**
 * Initializes an already allocated OFNumber with the specified uintptr_t.
 *
 * \param uintptr An uintptr_t which the OFNumber should contain
 * \param uintptr A uintptr_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUIntPtr: (uintptr_t)uintptr;

/**
 * Initializes an already allocated OFNumber with the specified float.
 *
489
490
491
492
493
494
495
496

497
498
499
500
501

502
503
504
505
506

507
508
509
510
511

512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531

532
533
534
535
536
537
538
539
540
541
542
543
544
545
546

547
548
549
550
551
552
553
489
490
491
492
493
494
495

496
497
498
499
500

501
502
503
504
505

506
507
508
509
510

511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530

531
532
533
534
535
536
537
538
539
540
541
542
543
544
545

546
547
548
549
550
551
552
553







-
+




-
+




-
+




-
+



















-
+














-
+








/**
 * \return The OFNumber as an int64_t
 */
- (int64_t)int64Value;

/**
 * \return The OFNumber as an uint8_t
 * \return The OFNumber as a uint8_t
 */
- (uint8_t)uInt8Value;

/**
 * \return The OFNumber as an uint16_t
 * \return The OFNumber as a uint16_t
 */
- (uint16_t)uInt16Value;

/**
 * \return The OFNumber as an uint32_t
 * \return The OFNumber as a uint32_t
 */
- (uint32_t)uInt32Value;

/**
 * \return The OFNumber as an uint64_t
 * \return The OFNumber as a uint64_t
 */
- (uint64_t)uInt64Value;

/**
 * \return The OFNumber as a size_t
 */
- (size_t)sizeValue;

/**
 * \return The OFNumber as an ssize_t
 */
- (ssize_t)sSizeValue;

/**
 * \return The OFNumber as an intmax_t
 */
- (intmax_t)intMaxValue;

/**
 * \return The OFNumber as an uintmax_t
 * \return The OFNumber as a uintmax_t
 */
- (uintmax_t)uIntMaxValue;

/**
 * \return The OFNumber as a ptrdiff_t
 */
- (ptrdiff_t)ptrDiffValue;

/**
 * \return The OFNumber as an intptr_t
 */
- (intptr_t)intPtrValue;

/**
 * \return The OFNumber as an uintptr_t
 * \return The OFNumber as a uintptr_t
 */
- (uintptr_t)uIntPtrValue;

/**
 * \return The OFNumber as a float
 */
- (float)floatValue;

Modified src/OFStream.h from [39142061c5] to [447ea06b1e].

63
64
65
66
67
68
69
70

71
72
73
74
75

76
77
78
79
80

81
82
83
84
85

86
87
88
89
90

91
92
93
94
95

96
97
98
99
100

101
102
103
104
105

106
107
108
109
110

111
112
113
114
115

116
117
118
119
120

121
122
123
124
125

126
127
128
129
130

131
132
133
134
135

136
137
138
139
140
141
142
63
64
65
66
67
68
69

70
71
72
73
74

75
76
77
78
79

80
81
82
83
84

85
86
87
88
89

90
91
92
93
94

95
96
97
98
99

100
101
102
103
104

105
106
107
108
109

110
111
112
113
114

115
116
117
118
119

120
121
122
123
124

125
126
127
128
129

130
131
132
133
134

135
136
137
138
139
140
141
142







-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+







 * \param size The size of the data that should be read.
 *	       The buffer MUST be EXACTLY this big!
 */
- (void)readExactlyNBytes: (size_t)size
	       intoBuffer: (char*)buf;

/**
 * Reads an uint8_t from the stream.
 * Reads a uint8_t from the stream.
 *
 * WARNING: Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \return An uint8_t from the stream
 * \return A uint8_t from the stream
 */
- (uint8_t)readInt8;

/**
 * Reads an uint16_t from the stream which is encoded in big endian.
 * Reads a uint16_t from the stream which is encoded in big endian.
 *
 * WARNING: Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \return An uint16_t from the stream in native endianess
 * \return A uint16_t from the stream in native endianess
 */
- (uint16_t)readBigEndianInt16;

/**
 * Reads an uint32_t from the stream which is encoded in big endian.
 * Reads a uint32_t from the stream which is encoded in big endian.
 *
 * WARNING: Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \return An uint32_t from the stream in the native endianess
 * \return A uint32_t from the stream in the native endianess
 */
- (uint32_t)readBigEndianInt32;

/**
 * Reads an uint64_t from the stream which is encoded in big endian.
 * Reads a uint64_t from the stream which is encoded in big endian.
 *
 * WARNING: Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \return An uint64_t from the stream in the native endianess
 * \return A uint64_t from the stream in the native endianess
 */
- (uint64_t)readBigEndianInt64;

/**
 * Reads an uint16_t from the stream which is encoded in little endian.
 * Reads a uint16_t from the stream which is encoded in little endian.
 *
 * WARNING: Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \return An uint16_t from the stream in native endianess
 * \return A uint16_t from the stream in native endianess
 */
- (uint16_t)readLittleEndianInt16;

/**
 * Reads an uint32_t from the stream which is encoded in little endian.
 * Reads a uint32_t from the stream which is encoded in little endian.
 *
 * WARNING: Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \return An uint32_t from the stream in the native endianess
 * \return A uint32_t from the stream in the native endianess
 */
- (uint32_t)readLittleEndianInt32;

/**
 * Reads an uint64_t from the stream which is encoded in little endian.
 * Reads a uint64_t from the stream which is encoded in little endian.
 *
 * WARNING: Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \return An uint64_t from the stream in the native endianess
 * \return A uint64_t from the stream in the native endianess
 */
- (uint64_t)readLittleEndianInt64;

/**
 * Reads nitems items with the specified item size from the stream and returns
 * them in an OFDataArray.
 *
211
212
213
214
215
216
217
218

219
220

221
222
223
224
225

226
227

228
229
230
231
232

233
234

235
236
237
238
239

240
241

242
243
244
245
246

247
248

249
250
251
252
253

254
255

256
257
258
259
260

261
262

263
264
265
266
267
268
269
211
212
213
214
215
216
217

218
219

220
221
222
223
224

225
226

227
228
229
230
231

232
233

234
235
236
237
238

239
240

241
242
243
244
245

246
247

248
249
250
251
252

253
254

255
256
257
258
259

260
261

262
263
264
265
266
267
268
269







-
+

-
+




-
+

-
+




-
+

-
+




-
+

-
+




-
+

-
+




-
+

-
+




-
+

-
+







 * \param size The size of the data that should be written
 * \return The number of bytes written
 */
- (size_t)writeNBytes: (size_t)size
	   fromBuffer: (const char*)buf;

/**
 * Writes an uint8_t into the stream.
 * Writes a uint8_t into the stream.
 *
 * \param int8 An uint8_t
 * \param int8 A uint8_t
 */
- (void)writeInt8: (uint8_t)int8;

/**
 * Writes an uint16_t into the stream, encoded in big endian.
 * Writes a uint16_t into the stream, encoded in big endian.
 *
 * \param int16 An uint16_t
 * \param int16 A uint16_t
 */
- (void)writeBigEndianInt16: (uint16_t)int16;

/**
 * Writes an uint32_t into the stream, encoded in big endian.
 * Writes a uint32_t into the stream, encoded in big endian.
 *
 * \param int32 An uint32_t
 * \param int32 A uint32_t
 */
- (void)writeBigEndianInt32: (uint32_t)int32;

/**
 * Writes an uint64_t into the stream, encoded in big endian.
 * Writes a uint64_t into the stream, encoded in big endian.
 *
 * \param int64 An uint64_t
 * \param int64 A uint64_t
 */
- (void)writeBigEndianInt64: (uint64_t)int64;

/**
 * Writes an uint16_t into the stream, encoded in little endian.
 * Writes a uint16_t into the stream, encoded in little endian.
 *
 * \param int16 An uint16_t
 * \param int16 A uint16_t
 */
- (void)writeLittleEndianInt16: (uint16_t)int16;

/**
 * Writes an uint32_t into the stream, encoded in little endian.
 * Writes a uint32_t into the stream, encoded in little endian.
 *
 * \param int32 An uint32_t
 * \param int32 A uint32_t
 */
- (void)writeLittleEndianInt32: (uint32_t)int32;

/**
 * Writes an uint64_t into the stream, encoded in little endian.
 * Writes a uint64_t into the stream, encoded in little endian.
 *
 * \param int64 An uint64_t
 * \param int64 A uint64_t
 */
- (void)writeLittleEndianInt64: (uint64_t)int64;

/**
 * Writes from an OFDataArray into the stream.
 *
 * \param dataarray The OFDataArray to write into the stream