ObjFW  Check-in [26e5fbf02a]

Overview
Comment:Document more exceptions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 26e5fbf02a0777cf5ac71814661f3ba61d79eda6e446aff39a733650f31caaa7
User & Date: js on 2022-09-23 11:45:17
Other Links: manifest | tags
Context
2022-09-23
13:51
Document more exceptions check-in: a204ef424b user: js tags: trunk
11:45
Document more exceptions check-in: 26e5fbf02a user: js tags: trunk
10:59
Add -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 check-in: 86a4ab7b92 user: js tags: trunk
Changes

Modified src/OFArray.h from [f90f803ff9] to [f290051480].

151
152
153
154
155
156
157

158
159
160
161
162
163
164
+ (instancetype)array;

/**
 * @brief Creates a new OFArray with the specified object.
 *
 * @param object An object
 * @return A new autoreleased OFArray

 */
+ (instancetype)arrayWithObject: (ObjectType)object;

/**
 * @brief Creates a new OFArray with the specified objects, terminated by `nil`.
 *
 * @param firstObject The first object in the array







>







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
+ (instancetype)array;

/**
 * @brief Creates a new OFArray with the specified object.
 *
 * @param object An object
 * @return A new autoreleased OFArray
 * @throw OFInvalidArgumentException The provided object was `nil`
 */
+ (instancetype)arrayWithObject: (ObjectType)object;

/**
 * @brief Creates a new OFArray with the specified objects, terminated by `nil`.
 *
 * @param firstObject The first object in the array
186
187
188
189
190
191
192

193
194
195
196
197
198
199
			   count: (size_t)count;

/**
 * @brief Initializes an OFArray with the specified object.
 *
 * @param object An object
 * @return An initialized OFArray

 */
- (instancetype)initWithObject: (ObjectType)object;

/**
 * @brief Initializes an OFArray with the specified objects.
 *
 * @param firstObject The first object







>







187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
			   count: (size_t)count;

/**
 * @brief Initializes an OFArray with the specified object.
 *
 * @param object An object
 * @return An initialized OFArray
 * @throw OFInvalidArgumentException The provided object was `nil`
 */
- (instancetype)initWithObject: (ObjectType)object;

/**
 * @brief Initializes an OFArray with the specified objects.
 *
 * @param firstObject The first object
277
278
279
280
281
282
283

284
285
286
287
288
289
290
- (void)setValue: (nullable id)value forKey: (OFString *)key;

/**
 * @brief Copies the objects at the specified range to the specified buffer.
 *
 * @param buffer The buffer to copy the objects to
 * @param range The range to copy

 */
- (void)getObjects: (ObjectType __unsafe_unretained _Nonnull *_Nonnull)buffer
	   inRange: (OFRange)range;

/**
 * @brief Returns the index of the first object that is equivalent to the
 *	  specified object or `OFNotFound` if it was not found.







>







279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
- (void)setValue: (nullable id)value forKey: (OFString *)key;

/**
 * @brief Copies the objects at the specified range to the specified buffer.
 *
 * @param buffer The buffer to copy the objects to
 * @param range The range to copy
 * @throw OFOutOfRangeException The provided range is out of bounds
 */
- (void)getObjects: (ObjectType __unsafe_unretained _Nonnull *_Nonnull)buffer
	   inRange: (OFRange)range;

/**
 * @brief Returns the index of the first object that is equivalent to the
 *	  specified object or `OFNotFound` if it was not found.
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
- (bool)containsObjectIdenticalTo: (ObjectType)object;

/**
 * @brief Returns the objects in the specified range as a new OFArray.
 *
 * @param range The range for the subarray
 * @return The subarray as a new autoreleased OFArray

 */
- (OFArray OF_GENERIC(ObjectType) *)objectsInRange: (OFRange)range;

/**
 * @brief Creates a string by joining all objects of the array.
 *
 * @param separator The string with which the objects should be joined
 * @return A string containing all objects joined by the separator

 */
- (OFString *)componentsJoinedByString: (OFString *)separator;

/**
 * @brief Creates a string by joining all objects of the array.
 *
 * @param separator The string with which the objects should be joined
 * @param options Options according to which the objects should be joined
 * @return A string containing all objects joined by the separator

 */
- (OFString *)componentsJoinedByString: (OFString *)separator
			       options: (OFArrayJoinOptions)options;

/**
 * @brief Creates a string by calling the selector on all objects of the array
 *	  and joining the strings returned by calling the selector.
 *
 * @param separator The string with which the objects should be joined
 * @param selector The selector to perform on the objects
 * @return A string containing all objects joined by the separator


 */
- (OFString *)componentsJoinedByString: (OFString *)separator
			 usingSelector: (SEL)selector;

/**
 * @brief Creates a string by calling the selector on all objects of the array
 *	  and joining the strings returned by calling the selector.
 *
 * @param separator The string with which the objects should be joined
 * @param selector The selector to perform on the objects
 * @param options Options according to which the objects should be joined
 * @return A string containing all objects joined by the separator


 */
- (OFString *)componentsJoinedByString: (OFString *)separator
			 usingSelector: (SEL)selector
			       options: (OFArrayJoinOptions)options;

/**
 * @brief Performs the specified selector on all objects in the array.







>








>









>











>
>












>
>







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
- (bool)containsObjectIdenticalTo: (ObjectType)object;

/**
 * @brief Returns the objects in the specified range as a new OFArray.
 *
 * @param range The range for the subarray
 * @return The subarray as a new autoreleased OFArray
 * @throw OFOutOfRangeException The provided range is out of bounds
 */
- (OFArray OF_GENERIC(ObjectType) *)objectsInRange: (OFRange)range;

/**
 * @brief Creates a string by joining all objects of the array.
 *
 * @param separator The string with which the objects should be joined
 * @return A string containing all objects joined by the separator
 * @throw OFInvalidArgumentException The provided separator is `nil`
 */
- (OFString *)componentsJoinedByString: (OFString *)separator;

/**
 * @brief Creates a string by joining all objects of the array.
 *
 * @param separator The string with which the objects should be joined
 * @param options Options according to which the objects should be joined
 * @return A string containing all objects joined by the separator
 * @throw OFInvalidArgumentException The provided separator is `nil`
 */
- (OFString *)componentsJoinedByString: (OFString *)separator
			       options: (OFArrayJoinOptions)options;

/**
 * @brief Creates a string by calling the selector on all objects of the array
 *	  and joining the strings returned by calling the selector.
 *
 * @param separator The string with which the objects should be joined
 * @param selector The selector to perform on the objects
 * @return A string containing all objects joined by the separator
 * @throw OFInvalidArgumentException The provided separator is `nil` or calling
 *				     the provided selector returned `nil`
 */
- (OFString *)componentsJoinedByString: (OFString *)separator
			 usingSelector: (SEL)selector;

/**
 * @brief Creates a string by calling the selector on all objects of the array
 *	  and joining the strings returned by calling the selector.
 *
 * @param separator The string with which the objects should be joined
 * @param selector The selector to perform on the objects
 * @param options Options according to which the objects should be joined
 * @return A string containing all objects joined by the separator
 * @throw OFInvalidArgumentException The provided separator is `nil` or calling
 *				     the provided selector returned `nil`
 */
- (OFString *)componentsJoinedByString: (OFString *)separator
			 usingSelector: (SEL)selector
			       options: (OFArrayJoinOptions)options;

/**
 * @brief Performs the specified selector on all objects in the array.
420
421
422
423
424
425
426

427
428
429
430
431
432
433
434

435
436
437
438
439
440
441
#endif

/**
 * @brief Creates a new array with the specified object added.
 *
 * @param object The object to add
 * @return A new array with the specified object added

 */
- (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObject: (ObjectType)object;

/**
 * @brief Creates a new array with the objects from the specified array added.
 *
 * @param array The array with objects to add
 * @return A new array with the objects from the specified array added

 */
- (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObjectsFromArray:
    (OFArray OF_GENERIC(ObjectType) *)array;

#ifdef OF_HAVE_BLOCKS
/**
 * @brief Executes a block for each object.







>








>







430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
#endif

/**
 * @brief Creates a new array with the specified object added.
 *
 * @param object The object to add
 * @return A new array with the specified object added
 * @throw OFInvalidArgumentException The specified object was `nil`
 */
- (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObject: (ObjectType)object;

/**
 * @brief Creates a new array with the objects from the specified array added.
 *
 * @param array The array with objects to add
 * @return A new array with the objects from the specified array added
 * @throw OFInvalidArgumentException The specified array was `nil`
 */
- (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObjectsFromArray:
    (OFArray OF_GENERIC(ObjectType) *)array;

#ifdef OF_HAVE_BLOCKS
/**
 * @brief Executes a block for each object.

Modified src/OFEnumerator.h from [27d5a99680] to [7108ca316f].

78
79
80
81
82
83
84

85
86
87
88
89
90
91
 *	  doing a fast enumeration.
 *
 * @param state Context information for the enumeration
 * @param objects A pointer to an array where to put the objects
 * @param count The number of objects that can be stored at objects
 * @return The number of objects returned in objects or 0 when the enumeration
 *	   finished.

 */
- (int)countByEnumeratingWithState: (OFFastEnumerationState *)state
			   objects: (id __unsafe_unretained _Nonnull *_Nonnull)
					objects
			     count: (int)count;
@end








>







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
 *	  doing a fast enumeration.
 *
 * @param state Context information for the enumeration
 * @param objects A pointer to an array where to put the objects
 * @param count The number of objects that can be stored at objects
 * @return The number of objects returned in objects or 0 when the enumeration
 *	   finished.
 * @throw OFOutOfRangeException The object is too big for fast enumeration
 */
- (int)countByEnumeratingWithState: (OFFastEnumerationState *)state
			   objects: (id __unsafe_unretained _Nonnull *_Nonnull)
					objects
			     count: (int)count;
@end

Modified src/OFMessagePackRepresentation.h from [d2e100cc65] to [8d89ee4937].

25
26
27
28
29
30
31



32
33
34
35
36
 *
 * @brief A protocol implemented by classes that support encoding to a
 *	  MessagePack representation.
 */
@protocol OFMessagePackRepresentation
/**
 * @brief The MessagePack representation of the object as OFData.



 */
@property (readonly, nonatomic) OFData *messagePackRepresentation;
@end

OF_ASSUME_NONNULL_END







>
>
>





25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 *
 * @brief A protocol implemented by classes that support encoding to a
 *	  MessagePack representation.
 */
@protocol OFMessagePackRepresentation
/**
 * @brief The MessagePack representation of the object as OFData.
 *
 * @throw OFOutOfRangeException The object is too big for a MessagePack
 *				representation
 */
@property (readonly, nonatomic) OFData *messagePackRepresentation;
@end

OF_ASSUME_NONNULL_END

Modified src/OFSerialization.h from [6913e132ee] to [731b8b64f8].

32
33
34
35
36
37
38


39
40
41
42
43
44
45
46
47
48
49
50
51
@property (readonly, nonatomic) OFXMLElement *XMLElementBySerializing;

/**
 * @brief Initializes the object with the specified XML element serialization.
 *
 * @param element An OFXMLElement with the serialized object
 * @return An initialized object


 */
- (instancetype)initWithSerialization: (OFXMLElement *)element;
@end

#ifdef __cplusplus
extern "C" {
#endif
extern OFConstantString *const OFSerializationNS;
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







>
>













32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@property (readonly, nonatomic) OFXMLElement *XMLElementBySerializing;

/**
 * @brief Initializes the object with the specified XML element serialization.
 *
 * @param element An OFXMLElement with the serialized object
 * @return An initialized object
 * @throw OFInvalidArgumentException The specified element is not valid
 *				     serialization
 */
- (instancetype)initWithSerialization: (OFXMLElement *)element;
@end

#ifdef __cplusplus
extern "C" {
#endif
extern OFConstantString *const OFSerializationNS;
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END