ObjFW  Check-in [973e19f23c]

Overview
Comment:Add some missing documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 973e19f23cc6a7799455ff2467bfe79f7c0f87a9f8be0befbbd7e8e9a9652b79
User & Date: js on 2009-06-30 12:55:44
Other Links: manifest | tags
Context
2009-06-30
13:38
Implement OFCopying and OFMutableCopying in OFDictionary. check-in: eddc0ba58c user: js tags: trunk
12:55
Add some missing documentation. check-in: 973e19f23c user: js tags: trunk
12:07
A few renames in OFObject, see details. check-in: 67bb344ba6 user: js tags: trunk
Changes

Modified src/OFMutableArray.h from [f3a9e17092] to [f2b0483cd1].

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#import "OFArray.h"

/**
 * The OFMutableArray class provides a class for storing, adding and removing
 * objects in an array.
 */
@interface OFMutableArray: OFArray
/**
 * Adds an object to the OFDataArray.
 *
 * \param obj An object to add
 */
- addObject: (OFObject*)obj;








|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#import "OFArray.h"

/**
 * The OFMutableArray class provides a class for storing, adding and removing
 * objects in an array.
 */
@interface OFMutableArray: OFArray {}
/**
 * Adds an object to the OFDataArray.
 *
 * \param obj An object to add
 */
- addObject: (OFObject*)obj;

Modified src/OFMutableDictionary.h from [b962c4babf] to [2cfd9e5d81].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 */

#import "OFDictionary.h"

/**
 * The OFMutableDictionary class provides a class for using mutable hash tables.
 */
@interface OFMutableDictionary: OFDictionary
/**
 * Sets a key to an object. A key can be any object.
 *
 * \param key The key to set
 * \param obj The object to set the key to
 */
- setObject: (OFObject*)obj







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 */

#import "OFDictionary.h"

/**
 * The OFMutableDictionary class provides a class for using mutable hash tables.
 */
@interface OFMutableDictionary: OFDictionary {}
/**
 * Sets a key to an object. A key can be any object.
 *
 * \param key The key to set
 * \param obj The object to set the key to
 */
- setObject: (OFObject*)obj

Modified src/OFMutableString.h from [aa01340072] to [caaae87364].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdarg.h>

#import "OFString.h"

/**
 * A class for storing and modifying strings.
 */
@interface OFMutableString: OFString
/**
 * Sets the OFString to the specified OFString.
 *
 * \param str An OFString to set the OFString to.
 */
- setToCString: (const char*)str;








|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdarg.h>

#import "OFString.h"

/**
 * A class for storing and modifying strings.
 */
@interface OFMutableString: OFString {}
/**
 * Sets the OFString to the specified OFString.
 *
 * \param str An OFString to set the OFString to.
 */
- setToCString: (const char*)str;

Modified src/OFNumber.h from [9847bb6afe] to [63d31ab23c].

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
	OF_NUMBER_PTRDIFF,
	OF_NUMBER_INTPTR,
	OF_NUMBER_FLOAT,
	OF_NUMBER_DOUBLE,
};

/**
 * The OFNumber class provides a way to store a number in an object and
 * manipulate it.
 */
@interface OFNumber: OFObject
{
	union {
		char	       char_;
		short	       short_;







|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
	OF_NUMBER_PTRDIFF,
	OF_NUMBER_INTPTR,
	OF_NUMBER_FLOAT,
	OF_NUMBER_DOUBLE,
};

/**
 * The OFNumber class provides a way to store a number in an object and to
 * manipulate it.
 */
@interface OFNumber: OFObject
{
	union {
		char	       char_;
		short	       short_;
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




143




144




145




146




147




148




149




150




151




152




153
154





155






156






157






158




159




160
161
		intptr_t       intptr;
		float	       float_;
		double	       double_;
	} value;
	enum of_number_type type;
}





+ numberWithChar: (char)char_;





+ numberWithShort: (short)short_;





+ numberWithInt: (int)int_;





+ numberWithLong: (long)long_;





+ numberWithUChar: (unsigned char)uchar;





+ numberWithUShort: (unsigned short)ushort;





+ numberWithUInt: (unsigned int)uint;





+ numberWithULong: (unsigned long)ulong;





+ numberWithInt8: (int8_t)int8;





+ numberWithInt16: (int16_t)int16;





+ numberWithInt32: (int32_t)int32;





+ numberWithInt64: (int64_t)int64;





+ numberWithUInt8: (uint8_t)uint8;





+ numberWithUInt16: (uint16_t)uint16;





+ numberWithUInt32: (uint32_t)uint32;





+ numberWithUInt64: (uint64_t)uint64;





+ numberWithSize: (size_t)size;





+ numberWithSSize: (ssize_t)ssize;





+ numberWithIntMax: (intmax_t)intmax;





+ numberWithUIntMax: (uintmax_t)uintmax;





+ numberWithPtrDiff: (ptrdiff_t)ptrdiff;





+ numberWithIntPtr: (intptr_t)intptr;





+ numberWithFloat: (float)float_;





+ numberWithDouble: (double)double_;







- initWithChar: (char)char_;







- initWithShort: (short)short_;







- initWithInt: (int)int_;







- initWithLong: (long)long_;







- initWithUChar: (unsigned char)uchar;







- initWithUShort: (unsigned short)ushort;







- initWithUInt: (unsigned int)uint;







- initWithULong: (unsigned long)ulong;







- initWithInt8: (int8_t)int8;







- initWithInt16: (int16_t)int16;







- initWithInt32: (int32_t)int32;







- initWithInt64: (int64_t)int64;







- initWithUInt8: (uint8_t)uint8;







- initWithUInt16: (uint16_t)uint16;







- initWithUInt32: (uint32_t)uint32;







- initWithUInt64: (uint64_t)uint64;







- initWithSize: (size_t)size;







- initWithSSize: (ssize_t)ssize;







- initWithIntMax: (intmax_t)intmax;







- initWithUIntMax: (uintmax_t)uintmax;







- initWithPtrDiff: (ptrdiff_t)ptrdiff;







- initWithIntPtr: (intptr_t)intptr;







- initWithFloat: (float)float_;







- initWithDouble: (double)double_;





- (enum of_number_type)type;




- (char)asChar;




- (short)asShort;




- (int)asInt;




- (long)asLong;




- (unsigned char)asUChar;




- (unsigned short)asUShort;




- (unsigned int)asUInt;




- (unsigned long)asULong;




- (int8_t)asInt8;




- (int16_t)asInt16;




- (int32_t)asInt32;




- (int64_t)asInt64;




- (uint8_t)asUInt8;




- (uint16_t)asUInt16;




- (uint32_t)asUInt32;




- (uint64_t)asUInt64;




- (size_t)asSize;




- (ssize_t)asSSize;




- (intmax_t)asIntMax;




- (uintmax_t)asUIntMax;




- (ptrdiff_t)asPtrDiff;




- (intptr_t)asIntPtr;




- (float)asFloat;




- (double)asDouble;






- add: (OFNumber*)num;






- subtract: (OFNumber*)num;






- multiplyWith: (OFNumber*)num;






- divideBy: (OFNumber*)num;




- increase;




- decrease;
@end







>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>

>
>
>
>
>


>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>


>
>
>
>


>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>


>
>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>

>
>
>
>

>
>
>
>


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
143
144
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
178
179
180
181
182
183
184
185
186
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
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
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
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
		intptr_t       intptr;
		float	       float_;
		double	       double_;
	} value;
	enum of_number_type type;
}

/**
 * \param char_ A char which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithChar: (char)char_;

/**
 * \param short_ A short which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithShort: (short)short_;

/**
 * \param int_ An int which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt: (int)int_;

/**
 * \param long_ A long which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithLong: (long)long_;

/**
 * \param uchar An unsigned char which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUChar: (unsigned char)uchar;

/**
 * \param ushort An unsigned short which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUShort: (unsigned short)ushort;

/**
 * \param uint An unsigned int which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt: (unsigned int)uint;

/**
 * \param ulong An unsigned long which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithULong: (unsigned long)ulong;

/**
 * \param int8 An int8_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt8: (int8_t)int8;

/**
 * \param int16 An int16_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt16: (int16_t)int16;

/**
 * \param int32 An int32_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt32: (int32_t)int32;

/**
 * \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
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt8: (uint8_t)uint8;

/**
 * \param uint16 An 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
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt32: (uint32_t)uint32;

/**
 * \param uint64 An 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
 */
+ numberWithSize: (size_t)size;

/**
 * \param ssize An ssize_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithSSize: (ssize_t)ssize;

/**
 * \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
 * \return A new autoreleased OFNumber
 */
+ numberWithUIntMax: (uintmax_t)uintmax;

/**
 * \param ptrdifff 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 float_ A float which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithFloat: (float)float_;

/**
 * \param double_ A double which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithDouble: (double)double_;

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

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

/**
 * Initializes an already allocated OFNumber with the specified int.
 *
 * \param int_ An int which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithInt: (int)int_;

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

/**
 * Initializes an already allocated OFNumber with the specified unsigned char.
 *
 * \param uchar An unsigned char which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUChar: (unsigned char)uchar;

/**
 * Initializes an already allocated OFNumber with the specified unsigned short.
 *
 * \param ushort An unsigned short which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUShort: (unsigned short)ushort;

/**
 * Initializes an already allocated OFNumber with the specified unsigned int .
 *
 * \param uint An unsigned int which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithUInt: (unsigned int)uint;

/**
 * Initializes an already allocated OFNumber with the specified unsigned long.
 *
 * \param ulong An unsigned long which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithULong: (unsigned long)ulong;

/**
 * Initializes an already allocated OFNumber with the specified int8_t.
 *
 * \param int8 An int8_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithInt8: (int8_t)int8;

/**
 * Initializes an already allocated OFNumber with the specified int16_t.
 *
 * \param int16 An int16_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithInt16: (int16_t)int16;

/**
 * Initializes an already allocated OFNumber with the specified int32_t.
 *
 * \param int32 An int32_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithInt32: (int32_t)int32;

/**
 * Initializes an already allocated OFNumber with the specified int64_t.
 *
 * \param int64 An int64_t which the OFNumber should contain
 * \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
 * \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
 * \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
 * \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
 * \return An initialized OFNumber
 */
- initWithUInt64: (uint64_t)uint64;

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

/**
 * Initializes an already allocated OFNumber with the specified ssize_t.
 *
 * \param ssize An ssize_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithSSize: (ssize_t)ssize;

/**
 * Initializes an already allocated OFNumber with the specified intmax_t.
 *
 * \param intmax An intmax_t which the OFNumber should contain
 * \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
 * \return An initialized OFNumber
 */
- initWithUIntMax: (uintmax_t)uintmax;

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

/**
 * Initializes an already allocated OFNumber with the specified intptr_t.
 *
 * \param intptr An intptr_t which the OFNumber should contain
 * \return An initialized OFNumber
 */
- initWithIntPtr: (intptr_t)intptr;

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

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

/**
 * \return An enum of type of_number_type indicating the type of contained
 *	   number of the OFNumber
 */
- (enum of_number_type)type;

/**
 * \return The OFNumber as a char
 */
- (char)asChar;

/**
 * \return The OFNumber as a short
 */
- (short)asShort;

/**
 * \return The OFNumber as an int
 */
- (int)asInt;

/**
 * \return The OFNumber as a long
 */
- (long)asLong;

/**
 * \return The OFNumber as an unsigned char
 */
- (unsigned char)asUChar;

/**
 * \return The OFNumber as an unsigned short
 */
- (unsigned short)asUShort;

/**
 * \return The OFNumber as an unsigned int
 */
- (unsigned int)asUInt;

/**
 * \return The OFNumber as an unsigned long
 */
- (unsigned long)asULong;

/**
 * \return The OFNumber as an int8_t
 */
- (int8_t)asInt8;

/**
 * \return The OFNumber as an int16_t
 */
- (int16_t)asInt16;

/**
 * \return The OFNumber as an int32_t
 */
- (int32_t)asInt32;

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * \return The OFNumber as a double
 */
- (double)asDouble;

/**
 * Adds the specified OFNumber to the OFNumber.
 *
 * \param num The OFNumber to add
 */
- add: (OFNumber*)num;

/**
 * Subtracts the specified OFNumber from the OFNumber.
 *
 * \param num The OFNumber to substract
 */
- subtract: (OFNumber*)num;

/**
 * Multiplies the OFNumber with the specified OFNumber.
 *
 * \param num The OFNumber to multiply with
 */
- multiplyWith: (OFNumber*)num;

/**
 * Divides the OFNumber by the specified OFNumber.
 *
 * \param num The OFNumber to divide by
 */
- divideBy: (OFNumber*)num;

/**
 * Increases the OFNumber by 1.
 */
- increase;

/**
 * Decreases the OFNumber by 1.
 */
- decrease;
@end

Modified src/OFStream.h from [a8f3308e3a] to [937b4422c4].

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 *	  The buffer MUST be at least size big!
 * \return The number of bytes read
 */
- (size_t)readNBytes: (size_t)size
	  intoBuffer: (char*)buf;

/**
 * Read until a newline or \0 occurs.
 *
 * If you want to use readNBytes afterwards again, you have to clear the cache
 * before and optionally get the cache before clearing it!
 *
 * \return The line that was read, autoreleased, or nil if the end of the
 *	   stream has been reached.
 */







|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 *	  The buffer MUST be at least size big!
 * \return The number of bytes read
 */
- (size_t)readNBytes: (size_t)size
	  intoBuffer: (char*)buf;

/**
 * Read until a newline, \\0 or end of stream occurs.
 *
 * If you want to use readNBytes afterwards again, you have to clear the cache
 * before and optionally get the cache before clearing it!
 *
 * \return The line that was read, autoreleased, or nil if the end of the
 *	   stream has been reached.
 */

Modified src/OFThread.h from [48c9aa376a] to [36e8a35200].

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@public
	id retval;
#endif
}

/**
 * \param obj An object that is passed to the main method as a copy or nil
 * \return A new, autoreleased thread
 */
+ threadWithObject: (id)obj;

/**
 * Sets the Thread Local Storage for the specified key.
 *
 * The specified object is first retained and then the object stored before is







|







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@public
	id retval;
#endif
}

/**
 * \param obj An object that is passed to the main method as a copy or nil
 * \return A new autoreleased thread
 */
+ threadWithObject: (id)obj;

/**
 * Sets the Thread Local Storage for the specified key.
 *
 * The specified object is first retained and then the object stored before is
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
	pthread_mutex_t mutex;
#else
	CRITICAL_SECTION mutex;
#endif
}

/**
 * \return A new, autoreleased mutex.
 */
+ mutex;

/**
 * Locks the mutex.
 */
- lock;

/**
 * Unlocks the mutex.
 */
- unlock;
@end







|













121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
	pthread_mutex_t mutex;
#else
	CRITICAL_SECTION mutex;
#endif
}

/**
 * \return A new autoreleased mutex.
 */
+ mutex;

/**
 * Locks the mutex.
 */
- lock;

/**
 * Unlocks the mutex.
 */
- unlock;
@end

Modified src/OFURLEncoding.h from [b1c227a687] to [88b8d3c012].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * The OFURLEncoding category provides an easy way to encode and decode strings
 * for URLs.
 */
@interface OFString (OFURLEncoding)
/**
 * Encodes a string for use in a URL.
 *
 * \return A new, autoreleased string
 */
- (OFString*)stringByURLEncoding;

/**
 * Decodes a string used in a URL.
 *
 * \return A new, autoreleased string
 */
- (OFString*)stringByURLDecoding;
@end







|






|



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * The OFURLEncoding category provides an easy way to encode and decode strings
 * for URLs.
 */
@interface OFString (OFURLEncoding)
/**
 * Encodes a string for use in a URL.
 *
 * \return A new autoreleased string
 */
- (OFString*)stringByURLEncoding;

/**
 * Decodes a string used in a URL.
 *
 * \return A new autoreleased string
 */
- (OFString*)stringByURLDecoding;
@end

Modified src/OFXMLElement.h from [d7c56955ee] to [5d32edcfa4].

12
13
14
15
16
17
18




19
20
21
22
23
24
25
26




27







28
29







30










31
32





33







34
35






36
37
38




39





40
41
#import "OFObject.h"
#import "OFString.h"
#import "OFDictionary.h"
#import "OFArray.h"

extern int _OFXMLElement_reference;





@interface OFXMLElement: OFObject
{
	OFString *name;
	OFDictionary *attrs;
	OFString *stringval;
	OFArray *children;
}





+ elementWithName: (OFString*)name;







+ elementWithName: (OFString*)name
   andStringValue: (OFString*)stringval;







- initWithName: (OFString*)name;










-   initWithName: (OFString*)name
  andStringValue: (OFString*)stringval;





- (OFString*)string;







- addAttributeWithName: (OFString*)name
	      andValue: (OFString*)value;






- addChild: (OFXMLElement*)child;
@end





@interface OFString (OFXMLEscaping)





- stringByXMLEscaping;
@end







>
>
>
>








>
>
>
>

>
>
>
>
>
>
>


>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>


>
>
>
>
>

>
>
>
>
>
>
>


>
>
>
>
>
>



>
>
>
>

>
>
>
>
>


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
#import "OFObject.h"
#import "OFString.h"
#import "OFDictionary.h"
#import "OFArray.h"

extern int _OFXMLElement_reference;

/**
 * The OFXMLElement represents an XML element as an object which can be
 * modified and converted back to XML again.
 */
@interface OFXMLElement: OFObject
{
	OFString *name;
	OFDictionary *attrs;
	OFString *stringval;
	OFArray *children;
}

/**
 * \param name The name for the element
 * \return A new autorelease OFXMLElement with the specified element name
 */
+ elementWithName: (OFString*)name;

/**
 * \param name The name for the element
 * \param stringval The value for the element
 * \return A new autorelease OFXMLElement with the specified element name and
 *	   value
 */
+ elementWithName: (OFString*)name
   andStringValue: (OFString*)stringval;

/**
 * Initializes an already allocated OFXMLElement with the specified name.
 *
 * \param name The name for the element
 * \return An initialized OFXMLElement with the specified element name
 */
- initWithName: (OFString*)name;

/**
 * Initializes an already allocated OFXMLElement with the specified name and
 * value.
 *
 * \param name The name for the element
 * \param stringval The value for the element
 * \return An initialized OFXMLElement with the specified element name and
 *	   value
 */
-   initWithName: (OFString*)name
  andStringValue: (OFString*)stringval;

/**
 * \return A new autoreleased OFString representing the OFXMLElement as an
 * XML string
 */
- (OFString*)string;

/**
 * Adds the specified attribute with the specified value.
 *
 * \param name The name of the attribute
 * \param value The value of the attribute
 */
- addAttributeWithName: (OFString*)name
	      andValue: (OFString*)value;

/**
 * Adds a child to the OFXMLElement.
 *
 * \param child Another OFXMLElement which is added as a child
 */
- addChild: (OFXMLElement*)child;
@end

/**
 * The OFXMLEscaping category provides an easy way to escape strings for use in
 * an XML document.
 */
@interface OFString (OFXMLEscaping)
/**
 * Escapes a string for use in an XML document.
 *
 * \return A new autoreleased string
 */
- stringByXMLEscaping;
@end