ObjFW  Check-in [19ac0520ae]

Overview
Comment:Documentation improvements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 19ac0520ae3c612d9df64fcd5050e0feb267bb79e5c2b769e666152d17acee27
User & Date: js on 2009-12-23 22:30:06
Other Links: manifest | tags
Context
2009-12-23
22:36
Release local objects before releasing self in @catch. check-in: d80e2fb1bc user: js tags: trunk
22:30
Documentation improvements. check-in: 19ac0520ae user: js tags: trunk
22:25
Unicode Table Generator: Store used tables in object. check-in: a4918da65c user: js tags: trunk
Changes

Modified src/OFArray.h from [0ec06e8b4f] to [29ba7d9e73].

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
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







-
+












+
+






+
+






+
+








#import "OFObject.h"
#import "OFDataArray.h"

@class OFString;

/**
 * The OFArray class provides a class for storing objects in an array.
 * The OFArray class is a class for storing objects in an array.
 */
@interface OFArray: OFObject <OFCopying, OFMutableCopying>
{
	OFDataArray *array;
}

/**
 * \return A new autoreleased OFArray
 */
+ array;

/**
 * Creates a new OFArray with the specified object.
 *
 * \param obj An object
 * \return A new autoreleased OFArray
 */
+ arrayWithObject: (OFObject*)obj;

/**
 * Creates a new OFArray with the specified objects, terminated by nil.
 *
 * \param first The first object in the array
 * \return A new autoreleased OFArray
 */
+ arrayWithObjects: (OFObject*)first, ...;

/**
 * Creates a new OFArray with the objects from the specified C array.
 *
 * \param objs A C array of objects.
 * \return A new autoreleased OFArray
 */
+ arrayWithCArray: (OFObject**)objs;

/**
 * Initializes an OFArray with the specified object.
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
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







-
+









-
+







 *
 * \param objs A C array of objects
 * \return An initialized OFArray
 */
- initWithCArray: (OFObject**)objs;

/**
 * \return The number of objects in the OFArray
 * \return The number of objects in the array
 */
- (size_t)count;

/**
 * \return The objects of the array as a C array
 */
- (id*)cArray;

/**
 * Returns a specific object of the OFArray.
 * Returns a specific object of the array.
 *
 * \param index The number of the object to return
 * \return The specified object of the OFArray
 */
- (id)objectAtIndex: (size_t)index;

/**
115
116
117
118
119
120
121
122

123
124
125
126
127

128
129
130
131
132
133
134
121
122
123
124
125
126
127

128
129
130
131
132

133
134
135
136
137
138
139
140







-
+




-
+







 * \param obj The object whose index is returned
 * \return The index of the first object that has the same aaddress as
 *	   the specified object
 */
- (size_t)indexOfObjectIdenticalTo: (OFObject*)obj;

/**
 * \return The first object of the OFArray or nil
 * \return The first object of the array or nil
 */
- (id)firstObject;

/**
 * \return The last object of the OFArray or nil
 * \return The last object of the array or nil
 */
- (id)lastObject;

/**
 * Creates a string by joining all objects of the array.
 *
 * \param separator The string with which the objects should be joined

Modified src/OFAutoreleasePool.h from [2aeb457e29] to [68fc70c495].

10
11
12
13
14
15
16
17
18



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


17
18
19
20
21
22
23
24
25
26







-
-
+
+
+







 */

#import "OFObject.h"
#import "OFArray.h"
#import "OFList.h"

/**
 * The OFAutoreleasePool class provides a class that keeps track of objects
 * that will be released when the autorelease pool is released.
 * The OFAutoreleasePool class is a class that keeps track of objects that will
 * be released when the autorelease pool is released.
 *
 * Every thread has its own stack of autorelease pools.
 */
@interface OFAutoreleasePool: OFObject
{
	OFArray		  *objects;
	OFAutoreleasePool *next, *prev;
}

Modified src/OFConstString.h from [250582e910] to [1fa39e7915].

12
13
14
15
16
17
18
19

20
21
22
12
13
14
15
16
17
18

19
20
21
22







-
+



#import "OFString.h"

#ifdef OF_APPLE_RUNTIME
extern void *_OFConstStringClassReference;
#endif

/**
 * A class for storing static strings using the @"" literal.
 * A class for storing constant strings using the @"" literal.
 */
@interface OFConstString: OFString {}
@end

Modified src/OFConstString.m from [884dfeb01d] to [d9b21f0f8e].

147
148
149
150
151
152
153
154

155
156
147
148
149
150
151
152
153

154
155
156







-
+


{
}

- (void)dealloc
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
	[super dealloc];	/* Get rid of stupid warning */
	[super dealloc];	/* Get rid of a stupid warning */
}
@end

Modified src/OFDataArray.h from [fc048ad743] to [f2ebd3c096].

8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
8
9
10
11
12
13
14

15

16
17
18
19
20
21
22







-
+
-







 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFObject.h"

/**
 * The OFDataArray class provides a class for storing arbitrary data in an
 * The OFDataArray class is a class for storing arbitrary data in an array.
 * array.
 *
 * If you plan to store large hunks of data, you should consider using
 * OFBigDataArray, which allocates the memory in pages rather than in bytes.
 */
@interface OFDataArray: OFObject <OFCopying>
{
	char   *data;
140
141
142
143
144
145
146
147
148


149
150
151
152
153
154
155
139
140
141
142
143
144
145


146
147
148
149
150
151
152
153
154







-
-
+
+







 * \param index The index at which the items are removed
 */
- removeNItems: (size_t)nitems
       atIndex: (size_t)index;
@end

/**
 * The OFBigDataArray class provides a class for storing arbitrary data in an
 * array and is designed to store large hunks of data. Therefore, it allocates
 * The OFBigDataArray class is a class for storing arbitrary data in an array
 * and is designed to store large hunks of data. Therefore, it allocates
 * memory in pages rather than a chunk of memory for each item.
 */
@interface OFBigDataArray: OFDataArray <OFCopying>
{
	size_t size;
}
@end

Modified src/OFDictionary.h from [8b63f44b4d] to [f8764df1df].

18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
18
19
20
21
22
23
24

25
26
27
28
29
30
31
32







-
+







{
	OFObject <OFCopying> *key;
	OFObject	     *object;
	uint32_t	     hash;
};

/**
 * The OFDictionary class provides a class for using hash tables.
 * The OFDictionary class is a class for using hash tables.
 */
@interface OFDictionary: OFObject <OFCopying, OFMutableCopying>
{
	struct of_dictionary_bucket *data;
	size_t			    size;
	size_t			    count;
}

Modified src/OFExceptions.h from [1cdedb1af1] to [b3fc0e5ad0].

308
309
310
311
312
313
314
315

316
317
318
319
320
321
322
308
309
310
311
312
313
314

315
316
317
318
319
320
321
322







-
+







/**
 * \return The requested size of the data that couldn't be read / written
 */
- (size_t)requestedSize;
@end

/**
 * An OFException indicating a read to the file failed.
 * An OFException indicating a read on the file failed.
 */
@interface OFReadFailedException: OFReadOrWriteFailedException {}
@end

/**
 * An OFException indicating a write to the file failed.
 */

Modified src/OFFile.h from [87163d3271] to [dc94d8b7a4].

127
128
129
130
131
132
133
134

135
136

137
138

139
127
128
129
130
131
132
133

134
135

136
137

138
139







-
+

-
+

-
+

 */
- initWithFilePointer: (FILE*)fp;
@end

@interface OFFileSingleton: OFFile
@end

/// An OFFile object for stdin.
/// An OFFile object for stdin
extern OFFile *of_stdin;
/// An OFFile object for stdout.
/// An OFFile object for stdout
extern OFFile *of_stdout;
/// An OFFile object for stderr.
/// An OFFile object for stderr
extern OFFile *of_stderr;

Modified src/OFHashes.h from [3d0d4ea8c8] to [709542c883].

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
30
31
32
33
34
35
36


37
38
39
40
41
42
43







-
-







}

/**
 * \return A new autoreleased MD5 Hash
 */
+ md5Hash;

- init;

/**
 * Adds a buffer to the hash to be calculated.
 *
 * \param buf The buffer which should be included into calculation.
 * \param size The size of the buffer
 */
- updateWithBuffer: (const char*)buf
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
64
65
66
67
68
69
70


71
72
73
74
75
76
77







-
-







}

/**
 * \return A new autoreleased SHA1 Hash
 */
+ sha1Hash;

- init;

/**
 * Adds a buffer to the hash to be calculated.
 *
 * \param buf The buffer which should be included into calculation.
 * \param size The size of the buffer
 */
- updateWithBuffer: (const char*)buf

Modified src/OFMutableArray.h from [f34526b684] to [13789c154b].

8
9
10
11
12
13
14
15
16


17
18
19
20
21
22
23
8
9
10
11
12
13
14


15
16
17
18
19
20
21
22
23







-
-
+
+







 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFArray.h"

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

Modified src/OFMutableDictionary.h from [f4d21099de] to [a6dee4def6].

8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
8
9
10
11
12
13
14

15
16
17
18
19
20
21
22







-
+







 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFDictionary.h"

/**
 * The OFMutableDictionary class provides a class for using mutable hash tables.
 * The OFMutableDictionary class is 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