ObjFW  Check-in [50b5ac3b27]

Overview
Comment:Documentation improvements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 50b5ac3b27c4a7238a26f1809b5e8b0360b5b8121d96ce6104fbc0c96cd3dccb
User & Date: js on 2013-01-17 23:15:33
Other Links: manifest | tags
Context
2013-01-19
01:41
Two small fixes. check-in: a2a48d4d29 user: js tags: trunk
2013-01-17
23:15
Documentation improvements. check-in: 50b5ac3b27 user: js tags: trunk
2013-01-16
14:31
OFRunLoop: Make ivar "running" volatile. check-in: b96e676256 user: js tags: trunk
Changes

Modified src/OFDataArray.h from [501156c3d7] to [6f4ab00da5].

46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
 * @brief Creates a new OFDataArray with an item size of 1.
 *
 * @return A new autoreleased OFDataArray
 */
+ (instancetype)dataArray;

/*!
 * @brief Creates a new OFDataArray whose items all have the same size.

 *
 * @param itemSize The size of a single element in the OFDataArray
 * @return A new autoreleased OFDataArray
 */
+ (instancetype)dataArrayWithItemSize: (size_t)itemSize;

/*!







|
>







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 * @brief Creates a new OFDataArray with an item size of 1.
 *
 * @return A new autoreleased OFDataArray
 */
+ (instancetype)dataArray;

/*!
 * @brief Creates a new OFDataArray whose items all have the same specified
 *	  size.
 *
 * @param itemSize The size of a single element in the OFDataArray
 * @return A new autoreleased OFDataArray
 */
+ (instancetype)dataArrayWithItemSize: (size_t)itemSize;

/*!

Modified src/OFFile.h from [566d219578] to [76b233d4a0].

269
270
271
272
273
274
275





276




277




278
279
280
281
 */
- initWithFileDescriptor: (int)fileDescriptor;
@end

#ifdef __cplusplus
extern "C" {
#endif





extern OFStream *of_stdin;




extern OFStream *of_stdout;




extern OFStream *of_stderr;
#ifdef __cplusplus
}
#endif







>
>
>
>
>

>
>
>
>

>
>
>
>




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
 */
- initWithFileDescriptor: (int)fileDescriptor;
@end

#ifdef __cplusplus
extern "C" {
#endif
/*! @file */

/*!
 * @brief The standard input stream.
 */
extern OFStream *of_stdin;

/*!
 * @brief The standard output stream.
 */
extern OFStream *of_stdout;

/*!
 * @brief The standard error stream.
 */
extern OFStream *of_stderr;
#ifdef __cplusplus
}
#endif

Modified src/OFHTTPRequest.h from [a0477eca6a] to [ffcaf67e5f].

17
18
19
20
21
22
23





24

25

26

27
28
29
30
31
32
33
#import "OFObject.h"

@class OFURL;
@class OFDictionary;
@class OFDataArray;
@class OFString;






typedef enum of_http_request_type_t {

	OF_HTTP_REQUEST_TYPE_GET,

	OF_HTTP_REQUEST_TYPE_POST,

	OF_HTTP_REQUEST_TYPE_HEAD
} of_http_request_type_t;

/*!
 * @brief A class for storing HTTP requests.
 */
@interface OFHTTPRequest: OFObject







>
>
>
>
>

>

>

>







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"

@class OFURL;
@class OFDictionary;
@class OFDataArray;
@class OFString;

/*! @file */

/*!
 * @brief The type of an HTTP request.
 */
typedef enum of_http_request_type_t {
	/*! GET */
	OF_HTTP_REQUEST_TYPE_GET,
	/*! POST */
	OF_HTTP_REQUEST_TYPE_POST,
	/*! HEAD */
	OF_HTTP_REQUEST_TYPE_HEAD
} of_http_request_type_t;

/*!
 * @brief A class for storing HTTP requests.
 */
@interface OFHTTPRequest: OFObject

Modified src/OFNumber.h from [2198faa71d] to [c711cafca0].

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

#include <sys/types.h>

#import "OFObject.h"
#import "OFSerialization.h"
#import "OFJSONRepresentation.h"



/*!
 * @brief The type of a number.
 */
typedef enum of_number_type_t {

	OF_NUMBER_BOOL		= 0x01,

	OF_NUMBER_UCHAR		= 0x02,

	OF_NUMBER_USHORT	= 0x03,

	OF_NUMBER_UINT		= 0x04,

	OF_NUMBER_ULONG		= 0x05,

	OF_NUMBER_SIZE		= 0x06,

	OF_NUMBER_UINT8		= 0x07,

	OF_NUMBER_UINT16	= 0x08,

	OF_NUMBER_UINT32	= 0x09,

	OF_NUMBER_UINT64	= 0x0A,

	OF_NUMBER_UINTPTR	= 0x0B,

	OF_NUMBER_UINTMAX	= 0x0C,
	OF_NUMBER_SIGNED	= 0x10,

	OF_NUMBER_CHAR		= OF_NUMBER_UCHAR | OF_NUMBER_SIGNED,

	OF_NUMBER_SHORT		= OF_NUMBER_USHORT | OF_NUMBER_SIGNED,

	OF_NUMBER_INT		= OF_NUMBER_UINT | OF_NUMBER_SIGNED,

	OF_NUMBER_LONG		= OF_NUMBER_ULONG | OF_NUMBER_SIGNED,

	OF_NUMBER_INT8		= OF_NUMBER_UINT8 | OF_NUMBER_SIGNED,

	OF_NUMBER_INT16		= OF_NUMBER_UINT16 | OF_NUMBER_SIGNED,

	OF_NUMBER_INT32		= OF_NUMBER_UINT32 | OF_NUMBER_SIGNED,

	OF_NUMBER_INT64		= OF_NUMBER_UINT64 | OF_NUMBER_SIGNED,

	OF_NUMBER_SSIZE		= OF_NUMBER_SIZE | OF_NUMBER_SIGNED,

	OF_NUMBER_INTMAX	= OF_NUMBER_UINTMAX | OF_NUMBER_SIGNED,

	OF_NUMBER_PTRDIFF	= 0x0D | OF_NUMBER_SIGNED,

	OF_NUMBER_INTPTR	= 0x0E | OF_NUMBER_SIGNED,

	OF_NUMBER_FLOAT		= 0x20,

	OF_NUMBER_DOUBLE	= 0x40 | OF_NUMBER_FLOAT,
} of_number_type_t;

/*!
 * @brief Provides a way to store a number in an object.
 */
@interface OFNumber: OFObject <OFCopying, OFComparing, OFSerialization,







>
>

|


>

>

>

>

>

>

>

>

>

>

>

>


>

>

>

>

>

>

>

>

>

>

>

>

>

>







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

#include <sys/types.h>

#import "OFObject.h"
#import "OFSerialization.h"
#import "OFJSONRepresentation.h"

/*! @file */

/*!
 * @brief The C type of a number stored in an OFNumber.
 */
typedef enum of_number_type_t {
	/*! BOOL */
	OF_NUMBER_BOOL		= 0x01,
	/*! unsigned char */
	OF_NUMBER_UCHAR		= 0x02,
	/*! unsigned short */
	OF_NUMBER_USHORT	= 0x03,
	/*! unsigned int */
	OF_NUMBER_UINT		= 0x04,
	/*! unsigned long */
	OF_NUMBER_ULONG		= 0x05,
	/*! size_t */
	OF_NUMBER_SIZE		= 0x06,
	/*! uint8_t */
	OF_NUMBER_UINT8		= 0x07,
	/*! uint16_t */
	OF_NUMBER_UINT16	= 0x08,
	/*! uint32_t */
	OF_NUMBER_UINT32	= 0x09,
	/*! uint64_t */
	OF_NUMBER_UINT64	= 0x0A,
	/*! uintptr_t */
	OF_NUMBER_UINTPTR	= 0x0B,
	/*! uintmax_t */
	OF_NUMBER_UINTMAX	= 0x0C,
	OF_NUMBER_SIGNED	= 0x10,
	/*! signed char */
	OF_NUMBER_CHAR		= OF_NUMBER_UCHAR | OF_NUMBER_SIGNED,
	/*! signed short */
	OF_NUMBER_SHORT		= OF_NUMBER_USHORT | OF_NUMBER_SIGNED,
	/*! signed int */
	OF_NUMBER_INT		= OF_NUMBER_UINT | OF_NUMBER_SIGNED,
	/*! signed long */
	OF_NUMBER_LONG		= OF_NUMBER_ULONG | OF_NUMBER_SIGNED,
	/*! int8_t */
	OF_NUMBER_INT8		= OF_NUMBER_UINT8 | OF_NUMBER_SIGNED,
	/*! int16_t */
	OF_NUMBER_INT16		= OF_NUMBER_UINT16 | OF_NUMBER_SIGNED,
	/*! int32_t */
	OF_NUMBER_INT32		= OF_NUMBER_UINT32 | OF_NUMBER_SIGNED,
	/*! int64_t */
	OF_NUMBER_INT64		= OF_NUMBER_UINT64 | OF_NUMBER_SIGNED,
	/*! ssize_t */
	OF_NUMBER_SSIZE		= OF_NUMBER_SIZE | OF_NUMBER_SIGNED,
	/*! intmax_t */
	OF_NUMBER_INTMAX	= OF_NUMBER_UINTMAX | OF_NUMBER_SIGNED,
	/*! ptrdiff_t */
	OF_NUMBER_PTRDIFF	= 0x0D | OF_NUMBER_SIGNED,
	/*! intptr_t */
	OF_NUMBER_INTPTR	= 0x0E | OF_NUMBER_SIGNED,
	/*! float */
	OF_NUMBER_FLOAT		= 0x20,
	/*! double */
	OF_NUMBER_DOUBLE	= 0x40 | OF_NUMBER_FLOAT,
} of_number_type_t;

/*!
 * @brief Provides a way to store a number in an object.
 */
@interface OFNumber: OFObject <OFCopying, OFComparing, OFSerialization,

Modified src/OFObject.h from [5d2293002c] to [dfac8717ac].

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
# define __bridge
# define __autoreleasing
#endif

#define OF_RETAIN_COUNT_MAX UINT_MAX
#define OF_NOT_FOUND SIZE_MAX



/*!
 * @brief A result of a comparison.
 */
typedef enum of_comparison_result_t {
	/// The left object is smaller than the right
	OF_ORDERED_ASCENDING = -1,
	/// Both objects are equal
	OF_ORDERED_SAME = 0,
	/// The left object is bigger than the right
	OF_ORDERED_DESCENDING = 1
} of_comparison_result_t;

/*!
 * @brief An enum for storing endianess.
 */
typedef enum of_byte_order_t {
	/// Most significant byte first (big endian)
	OF_BYTE_ORDER_BIG_ENDIAN,
	/// Least significant byte first (little endian)
	OF_BYTE_ORDER_LITTLE_ENDIAN
} of_byte_order_t;

/*!
 * @brief A range.
 */
typedef struct of_range_t {
	/// The start of the range
	size_t location;
	/// The length of the range
	size_t length;
} of_range_t;

/*!
 * @brief A point.
 */
typedef struct of_point_t {
	/// The x coordinate of the point
	float x;
	/// The y coordinate of the point
	float y;
} of_point_t;

/*!
 * @brief A dimension.
 */
typedef struct of_dimension_t {
	/// The width of the dimension
	float width;
	/// The height of the dimension
	float height;
} of_dimension_t;

/*!
 * @brief A rectangle.
 */
typedef struct of_rectangle_t
{
	/// The point from where the rectangle originates
	of_point_t origin;
	/// The size of the rectangle
	of_dimension_t size;
} of_rectangle_t;

@class OFString;
@class OFThread;

/*!







>
>




|

|

|







|

|







|

|







|

|







|

|








|

|







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
# define __bridge
# define __autoreleasing
#endif

#define OF_RETAIN_COUNT_MAX UINT_MAX
#define OF_NOT_FOUND SIZE_MAX

/*! @file */

/*!
 * @brief A result of a comparison.
 */
typedef enum of_comparison_result_t {
	/*! The left object is smaller than the right */
	OF_ORDERED_ASCENDING = -1,
	/*! Both objects are equal */
	OF_ORDERED_SAME = 0,
	/*! The left object is bigger than the right */
	OF_ORDERED_DESCENDING = 1
} of_comparison_result_t;

/*!
 * @brief An enum for storing endianess.
 */
typedef enum of_byte_order_t {
	/*! Most significant byte first (big endian) */
	OF_BYTE_ORDER_BIG_ENDIAN,
	/*! Least significant byte first (little endian) */
	OF_BYTE_ORDER_LITTLE_ENDIAN
} of_byte_order_t;

/*!
 * @brief A range.
 */
typedef struct of_range_t {
	/*! The start of the range */
	size_t location;
	/*! The length of the range */
	size_t length;
} of_range_t;

/*!
 * @brief A point.
 */
typedef struct of_point_t {
	/*! The x coordinate of the point */
	float x;
	/*! The y coordinate of the point */
	float y;
} of_point_t;

/*!
 * @brief A dimension.
 */
typedef struct of_dimension_t {
	/*! The width of the dimension */
	float width;
	/*! The height of the dimension */
	float height;
} of_dimension_t;

/*!
 * @brief A rectangle.
 */
typedef struct of_rectangle_t
{
	/*! The point from where the rectangle originates */
	of_point_t origin;
	/*! The size of the rectangle */
	of_dimension_t size;
} of_rectangle_t;

@class OFString;
@class OFThread;

/*!

Modified src/OFString.h from [6da3527557] to [a823c4de2d].

35
36
37
38
39
40
41


42
43
44
45

46

47

48

49

50

51
52
53
54
55
56
57
typedef char32_t of_char32_t;
#else
typedef uint_least16_t of_char16_t;
typedef uint_least32_t of_char32_t;
#endif
typedef of_char32_t of_unichar_t;



/*!
 * @brief The encoding of a string.
 */
typedef enum of_string_encoding_t {

	OF_STRING_ENCODING_UTF_8,

	OF_STRING_ENCODING_ASCII,

	OF_STRING_ENCODING_ISO_8859_1,

	OF_STRING_ENCODING_ISO_8859_15,

	OF_STRING_ENCODING_WINDOWS_1252,

	OF_STRING_ENCODING_AUTODETECT = 0xFF
} of_string_encoding_t;

enum {
	OF_STRING_SEARCH_BACKWARDS = 1,
	OF_STRING_SKIP_EMPTY	   = 2
};







>
>




>

>

>

>

>

>







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
typedef char32_t of_char32_t;
#else
typedef uint_least16_t of_char16_t;
typedef uint_least32_t of_char32_t;
#endif
typedef of_char32_t of_unichar_t;

/*! @file */

/*!
 * @brief The encoding of a string.
 */
typedef enum of_string_encoding_t {
	/*! UTF-8 */
	OF_STRING_ENCODING_UTF_8,
	/*! ASCII */
	OF_STRING_ENCODING_ASCII,
	/*! ISO 8859-1 */
	OF_STRING_ENCODING_ISO_8859_1,
	/*! ISO 8859-15 */
	OF_STRING_ENCODING_ISO_8859_15,
	/*! Windows-1252 */
	OF_STRING_ENCODING_WINDOWS_1252,
	/*! Try to automatically detect the encoding */
	OF_STRING_ENCODING_AUTODETECT = 0xFF
} of_string_encoding_t;

enum {
	OF_STRING_SEARCH_BACKWARDS = 1,
	OF_STRING_SKIP_EMPTY	   = 2
};