ObjFW  Check-in [2d33638be9]

Overview
Comment:Documentation improvements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 2d33638be927c26e29e18441bd61006fb3302081a4f3d7c692722f33eae236b6
User & Date: js on 2013-01-13 02:44:04
Other Links: manifest | tags
Context
2013-01-13
03:17
OFBigDataArray: Always keep at least one page. check-in: 9c421b6ff0 user: js tags: trunk
02:44
Documentation improvements. check-in: 2d33638be9 user: js tags: trunk
01:24
OFFile: Make use of _wchmod on Windows. check-in: 06c0c98e78 user: js tags: trunk
Changes

Modified src/OFDataArray.h from [4bd42aff32] to [501156c3d7].

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 * @return A new autoreleased OFDataArray
 */
+ (instancetype)dataArray;

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

/*!
 * @brief Creates a new OFDataArary with an item size of 1, containing the data
 *	  of the specified file.







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 * @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;

/*!
 * @brief Creates a new OFDataArary with an item size of 1, containing the data
 *	  of the specified file.
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
 */
+ (instancetype)dataArrayWithBase64EncodedString: (OFString*)string;

/*!
 * @brief Initializes an already allocated OFDataArray whose items all have the
 *	  same size.
 *
 * @param itemSize The size of each element in the OFDataArray
 * @return An initialized OFDataArray
 */
- initWithItemSize: (size_t)itemSize;

/*!
 * @brief Initializes an already allocated OFDataArray with an item size of 1,
 *	  containing the data of the specified file.







|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
 */
+ (instancetype)dataArrayWithBase64EncodedString: (OFString*)string;

/*!
 * @brief Initializes an already allocated OFDataArray whose items all have the
 *	  same size.
 *
 * @param itemSize The size of a single element in the OFDataArray
 * @return An initialized OFDataArray
 */
- initWithItemSize: (size_t)itemSize;

/*!
 * @brief Initializes an already allocated OFDataArray with an item size of 1,
 *	  containing the data of the specified file.
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
 * @brief Returns the number of items in the OFDataArray.
 *
 * @return The number of items in the OFDataArray
 */
- (size_t)count;

/*!
 * @brief Returns the size of each item in the OFDataArray in bytes.
 *
 * @return The size of each item in the OFDataArray in bytes
 */
- (size_t)itemSize;

/*!
 * @brief Returns all items of the OFDataArray as a C array.
 *
 * @warning The pointer is only valid until the OFDataArray is changed!







|

|







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
 * @brief Returns the number of items in the OFDataArray.
 *
 * @return The number of items in the OFDataArray
 */
- (size_t)count;

/*!
 * @brief Returns the size of a single item in the OFDataArray in bytes.
 *
 * @return The size of a single item in the OFDataArray in bytes
 */
- (size_t)itemSize;

/*!
 * @brief Returns all items of the OFDataArray as a C array.
 *
 * @warning The pointer is only valid until the OFDataArray is changed!

Modified src/OFFile.h from [2c71da7d31] to [566d219578].

46
47
48
49
50
51
52
53















54
55
56
57
58
59
60
	BOOL atEndOfStream;
}

/*!
 * @brief Creates a new OFFile with the specified path and mode.
 *
 * @param path The path to the file to open as a string
 * @param mode The mode in which the file should be opened as a string















 * @return A new autoreleased OFFile
 */
+ (instancetype)fileWithPath: (OFString*)path
			mode: (OFString*)mode;

/*!
 * @brief Creates a new OFFile with the specified file descriptor.







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
	BOOL atEndOfStream;
}

/*!
 * @brief Creates a new OFFile with the specified path and mode.
 *
 * @param path The path to the file to open as a string
 * @param mode The mode in which the file should be opened.@n
 *	       Possible modes are:
 *	       Mode           | Description
 *	       ---------------|-------------------------------------
 *	       `r`            | read-only
 *	       `rb`           | read-only, binary
 *	       `r+`           | read-write
 *	       `rb+` or `r+b` | read-write, binary
 *	       `w`            | write-only, create, truncate
 *	       `wb`           | write-only, create, truncate, binary
 *	       `w`            | read-write, create, truncate
 *	       `wb+` or `w+b` | read-write, create, truncate, binary
 *	       `a`            | write-only, create, append
 *	       `ab`           | write-only, create, append, binary
 *	       `a+`           | read-write, create, append
 *	       `ab+` or `a+b` | read-write, create, append, binary
 * @return A new autoreleased OFFile
 */
+ (instancetype)fileWithPath: (OFString*)path
			mode: (OFString*)mode;

/*!
 * @brief Creates a new OFFile with the specified file descriptor.
221
222
223
224
225
226
227
228















229
230
231
232
233
234
235
		   toPath: (OFString*)destination;
#endif

/*!
 * @brief Initializes an already allocated OFFile.
 *
 * @param path The path to the file to open as a string
 * @param mode The mode in which the file should be opened as a string















 * @return An initialized OFFile
 */
- initWithPath: (OFString*)path
	  mode: (OFString*)mode;

/*!
 * @brief Initializes an already allocated OFFile.







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
		   toPath: (OFString*)destination;
#endif

/*!
 * @brief Initializes an already allocated OFFile.
 *
 * @param path The path to the file to open as a string
 * @param mode The mode in which the file should be opened.@n
 *	       Possible modes are:
 *	       Mode           | Description
 *	       ---------------|-------------------------------------
 *	       `r`            | read-only
 *	       `rb`           | read-only, binary
 *	       `r+`           | read-write
 *	       `rb+` or `r+b` | read-write, binary
 *	       `w`            | write-only, create, truncate
 *	       `wb`           | write-only, create, truncate, binary
 *	       `w`            | read-write, create, truncate
 *	       `wb+` or `w+b` | read-write, create, truncate, binary
 *	       `a`            | write-only, create, append
 *	       `ab`           | write-only, create, append, binary
 *	       `a+`           | read-write, create, append
 *	       `ab+` or `a+b` | read-write, create, append, binary
 * @return An initialized OFFile
 */
- initWithPath: (OFString*)path
	  mode: (OFString*)mode;

/*!
 * @brief Initializes an already allocated OFFile.

Modified src/OFMutableArray.h from [f6d99e0c97] to [9f2e35cd47].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#import "OFArray.h"

#ifdef OF_HAVE_BLOCKS
typedef id (^of_array_replace_block_t)(id obj, size_t idx, BOOL *stop);
#endif

/*!
 * @brief An abstract class for storing, adding and removing objects in anr
 *	  array.
 */
@interface OFMutableArray: OFArray
/*!
 * @brief Adds an object to the end of the array.
 *
 * @param object An object to add







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#import "OFArray.h"

#ifdef OF_HAVE_BLOCKS
typedef id (^of_array_replace_block_t)(id obj, size_t idx, BOOL *stop);
#endif

/*!
 * @brief An abstract class for storing, adding and removing objects in an
 *	  array.
 */
@interface OFMutableArray: OFArray
/*!
 * @brief Adds an object to the end of the array.
 *
 * @param object An object to add

Modified src/OFSeekableStream.h from [8f181bd850] to [03ebe65ec9].

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
 *	 break caching, get broken results and seek to the wrong position!
 */
@interface OFSeekableStream: OFStream
/*!
 * @brief Seeks to the specified absolute offset.
 *
 * @param offset The offset in bytes
 * @param whence From where to seek. Possible values are:



 *		  * SEEK_SET: Seek to the specified byte.
 *		  * SEEK_CUR: Seek to the current location + offset.
 *		  * SEEK_END: Seek to the end of the stream + offset.
 */
- (void)seekToOffset: (off_t)offset
	      whence: (int)whence;

/*!
 * @brief Seek the stream on the lowlevel.
 *
 * @warning Do not call this directly!
 *
 * Override this with this method with your actual seek implementation when
 * subclassing!
 *
 * @param offset The offset to seek to
 * @param whence From where to seek. Possible values are:



 *		  * SEEK_SET: Seek to the specified byte.
 *		  * SEEK_CUR: Seek to the current location + offset.
 *		  * SEEK_END: Seek to the end of the stream + offset.
 */
- (void)lowlevelSeekToOffset: (off_t)offset
		      whence: (int)whence;
@end







|
>
>
>
|
|
|













|
>
>
>
|
|
|




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
 *	 break caching, get broken results and seek to the wrong position!
 */
@interface OFSeekableStream: OFStream
/*!
 * @brief Seeks to the specified absolute offset.
 *
 * @param offset The offset in bytes
 * @param whence From where to seek.@n
 *		 Possible values are:
 *		 Value    | Description
 *		 ---------|---------------------------------------
 *		 SEEK_SET | Seek to the specified byte
 *		 SEEK_CUR | Seek to the current location + offset
 *		 SEEK_END | Seek to the end of the stream + offset
 */
- (void)seekToOffset: (off_t)offset
	      whence: (int)whence;

/*!
 * @brief Seek the stream on the lowlevel.
 *
 * @warning Do not call this directly!
 *
 * Override this with this method with your actual seek implementation when
 * subclassing!
 *
 * @param offset The offset to seek to
 * @param whence From where to seek.@n
 *		 Possible values are:
 *		 Value    | Description
 *		 ---------|---------------------------------------
 *		 SEEK_SET | Seek to the specified byte
 *		 SEEK_CUR | Seek to the current location + offset
 *		 SEEK_END | Seek to the end of the stream + offset
 */
- (void)lowlevelSeekToOffset: (off_t)offset
		      whence: (int)whence;
@end

Modified src/OFString.h from [5446e12756] to [208c62cea3].

638
639
640
641
642
643
644
645
646


647
648
649
650
651
652
653
654
655
656
657
658
659


660
661
662
663
664
665
666
667
 */
- (of_range_t)rangeOfString: (OFString*)string;

/*!
 * @brief Returns the range of the string.
 *
 * @param string The string to search
 * @param options Options modifying search behaviour.
 *		  Possible values:


 *		    * OF_STRING_SEARCH_BACKWARDS
 * @return The range of the first occurrence of the string or a range with
 *	   OF_NOT_FOUND as start position if it was not found
 */
- (of_range_t)rangeOfString: (OFString*)string
		    options: (int)options;

/*!
 * @brief Returns the range of the string in the specified range.
 *
 * @param string The string to search
 * @param options Options modifying search behaviour.
 *		  Possible values:


 *		    * OF_STRING_SEARCH_BACKWARDS
 * @param range The range in which to search
 * @return The range of the first occurrence of the string or a range with
 *	   OF_NOT_FOUND as start position if it was not found
 */
- (of_range_t)rangeOfString: (OFString*)string
		    options: (int)options
		      range: (of_range_t)range;







|
|
>
>
|










|
|
>
>
|







638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
 */
- (of_range_t)rangeOfString: (OFString*)string;

/*!
 * @brief Returns the range of the string.
 *
 * @param string The string to search
 * @param options Options modifying search behaviour.@n
 *		  Possible values are:
 *		  Value                      | Description
 *		  ---------------------------|-------------------------------
 *		  OF_STRING_SEARCH_BACKWARDS | Search backwards in the string
 * @return The range of the first occurrence of the string or a range with
 *	   OF_NOT_FOUND as start position if it was not found
 */
- (of_range_t)rangeOfString: (OFString*)string
		    options: (int)options;

/*!
 * @brief Returns the range of the string in the specified range.
 *
 * @param string The string to search
 * @param options Options modifying search behaviour.@n
 *		  Possible values are:
 *		  Value                      | Description
 *		  ---------------------------|-------------------------------
 *		  OF_STRING_SEARCH_BACKWARDS | Search backwards in the string
 * @param range The range in which to search
 * @return The range of the first occurrence of the string or a range with
 *	   OF_NOT_FOUND as start position if it was not found
 */
- (of_range_t)rangeOfString: (OFString*)string
		    options: (int)options
		      range: (of_range_t)range;
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
/*!
 * @brief Creates a new string by replacing the occurrences of the specified
 *	  string in the specified range with the specified replacement.
 *
 * @param string The string to replace
 * @param replacement The string with which it should be replaced
 * @param options Options modifying search behaviour.
 *		  Possible values:
 *		    * None yet
 * @param range The range in which to replace the string
 * @return A new string with the occurrences of the specified string replaced
 */
- (OFString*)stringByReplacingOccurrencesOfString: (OFString*)string
				       withString: (OFString*)replacement
					  options: (int)options







|







742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
/*!
 * @brief Creates a new string by replacing the occurrences of the specified
 *	  string in the specified range with the specified replacement.
 *
 * @param string The string to replace
 * @param replacement The string with which it should be replaced
 * @param options Options modifying search behaviour.
 *		  Possible values are:
 *		    * None yet
 * @param range The range in which to replace the string
 * @return A new string with the occurrences of the specified string replaced
 */
- (OFString*)stringByReplacingOccurrencesOfString: (OFString*)string
				       withString: (OFString*)replacement
					  options: (int)options
823
824
825
826
827
828
829
830
831


832
833
834
835
836
837
838
839
 */
- (OFArray*)componentsSeparatedByString: (OFString*)delimiter;

/*!
 * @brief Separates an OFString into an OFArray of OFStrings.
 *
 * @param delimiter The delimiter for separating
 * @param options Options according to which the string should be separated.
 * 		  Possible values:


 * 		    * OF_STRING_SKIP_EMPTY
 * @return An autoreleased OFArray with the separated string
 */
- (OFArray*)componentsSeparatedByString: (OFString*)delimiter
				options: (int)options;

/*!
 * @brief Returns the components of the path.







|
|
>
>
|







827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
 */
- (OFArray*)componentsSeparatedByString: (OFString*)delimiter;

/*!
 * @brief Separates an OFString into an OFArray of OFStrings.
 *
 * @param delimiter The delimiter for separating
 * @param options Options according to which the string should be separated.@n
 *		  Possible values are:
 *		  Value                | Description
 *		  ---------------------|----------------------
 * 		  OF_STRING_SKIP_EMPTY | Skip empty components
 * @return An autoreleased OFArray with the separated string
 */
- (OFArray*)componentsSeparatedByString: (OFString*)delimiter
				options: (int)options;

/*!
 * @brief Returns the components of the path.