ObjFW  Check-in [d537543238]

Overview
Comment:Document methods to override in class clusters
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d537543238e9d66e4dbf101f79594f7d79d466663853f8ffc18b92d50f78d557
User & Date: js on 2019-06-20 23:36:45
Other Links: manifest | tags
Context
2019-06-20
23:45
OFSet: Add default method for fast enumeration check-in: f8b53e2f6b user: js tags: trunk
23:36
Document methods to override in class clusters check-in: d537543238 user: js tags: trunk
2019-06-19
23:01
bridge: Add bridge for {OF,NS}Number check-in: 82f1f432a4 user: js tags: trunk
Changes

Modified src/OFArray.h from [f538b1be6a] to [63916e3f9a].

82
83
84
85
86
87
88


89
90
91
92
93
94
95
typedef id _Nullable (^of_array_fold_block_t)(id _Nullable left, id right);
#endif

/*!
 * @class OFArray OFArray.h ObjFW/OFArray.h
 *
 * @brief An abstract class for storing objects in an array.


 */
@interface OFArray OF_GENERIC(ObjectType): OFObject <OFCopying,
    OFMutableCopying, OFCollection, OFSerialization, OFJSONRepresentation,
    OFMessagePackRepresentation>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif







>
>







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
typedef id _Nullable (^of_array_fold_block_t)(id _Nullable left, id right);
#endif

/*!
 * @class OFArray OFArray.h ObjFW/OFArray.h
 *
 * @brief An abstract class for storing objects in an array.
 *
 * @note Subclasses must implement @ref count and @ref objectAtIndex:.
 */
@interface OFArray OF_GENERIC(ObjectType): OFObject <OFCopying,
    OFMutableCopying, OFCollection, OFSerialization, OFJSONRepresentation,
    OFMessagePackRepresentation>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif

Modified src/OFCharacterSet.h from [2e2512e3e5] to [f46e129e3b].

20
21
22
23
24
25
26


27
28
29
30
31
32
33

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFCharacterSet OFCharacterSet.h ObjFW/OFCharacterSet.h
 *
 * @brief A class cluster representing a character set.


 */
@interface OFCharacterSet: OFObject
#ifdef OF_HAVE_CLASS_PROPERTIES
@property (class, readonly, nonatomic) OFCharacterSet *whitespaceCharacterSet;
#endif

/*!







>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFCharacterSet OFCharacterSet.h ObjFW/OFCharacterSet.h
 *
 * @brief A class cluster representing a character set.
 *
 * @note Subclasses must implement @ref characterIsMember:.
 */
@interface OFCharacterSet: OFObject
#ifdef OF_HAVE_CLASS_PROPERTIES
@property (class, readonly, nonatomic) OFCharacterSet *whitespaceCharacterSet;
#endif

/*!

Modified src/OFCountedSet.h from [561c22147e] to [4abf7110e4].

35
36
37
38
39
40
41



42
43
44
45
46
47
48
#endif

/*!
 * @class OFCountedSet OFCountedSet.h ObjFW/OFCountedSet.h
 *
 * @brief An abstract class for a mutable unordered set of objects, counting how
 *	  often it contains an object.



 */
@interface OFCountedSet OF_GENERIC(ObjectType):
    OFMutableSet OF_GENERIC(ObjectType)
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!







>
>
>







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#endif

/*!
 * @class OFCountedSet OFCountedSet.h ObjFW/OFCountedSet.h
 *
 * @brief An abstract class for a mutable unordered set of objects, counting how
 *	  often it contains an object.
 *
 * @note Subclasses must implement @ref countForObject: as well as all methods
 *	 of @ref OFSet and @ref OFMutableSet that need to be implemented.
 */
@interface OFCountedSet OF_GENERIC(ObjectType):
    OFMutableSet OF_GENERIC(ObjectType)
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!

Modified src/OFDictionary.h from [d1fb2089af] to [841b545468].

47
48
49
50
51
52
53



54
55
56
57
58
59
60
 *
 * @brief An abstract class for storing objects in a dictionary.
 *
 * Keys are copied and thus must conform to the OFCopying protocol.
 *
 * @note Fast enumeration on a dictionary enumerates through the keys of the
 *	 dictionary.



 */
@interface OFDictionary OF_GENERIC(KeyType, ObjectType): OFObject <OFCopying,
    OFMutableCopying, OFCollection, OFSerialization, OFJSONRepresentation,
    OFMessagePackRepresentation>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define KeyType id
# define ObjectType id







>
>
>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
 *
 * @brief An abstract class for storing objects in a dictionary.
 *
 * Keys are copied and thus must conform to the OFCopying protocol.
 *
 * @note Fast enumeration on a dictionary enumerates through the keys of the
 *	 dictionary.
 *
 * @note Subclasses must implement @ref objectForKey:, @ref count and
 *	 @ref keyEnumerator.
 */
@interface OFDictionary OF_GENERIC(KeyType, ObjectType): OFObject <OFCopying,
    OFMutableCopying, OFCollection, OFSerialization, OFJSONRepresentation,
    OFMessagePackRepresentation>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define KeyType id
# define ObjectType id

Modified src/OFMutableArray.h from [1e01321bd2] to [97f317cd8c].

33
34
35
36
37
38
39




40
41
42
43
44
45
46
#endif

/*!
 * @class OFMutableArray OFArray.h ObjFW/OFArray.h
 *
 * @brief An abstract class for storing, adding and removing objects in an
 *	  array.




 */
@interface OFMutableArray OF_GENERIC(ObjectType): OFArray OF_GENERIC(ObjectType)
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!
 * @brief Creates a new OFMutableArray with enough memory to hold the specified







>
>
>
>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#endif

/*!
 * @class OFMutableArray OFArray.h ObjFW/OFArray.h
 *
 * @brief An abstract class for storing, adding and removing objects in an
 *	  array.
 *
 * @note Subclasses must implement @ref insertObject:atIndex:,
 *	 @ref replaceObjectAtIndex:withObject:, @ref removeObjectAtIndex: as
 *	 well as all methods of @ref OFArray that need to be implemented.
 */
@interface OFMutableArray OF_GENERIC(ObjectType): OFArray OF_GENERIC(ObjectType)
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!
 * @brief Creates a new OFMutableArray with enough memory to hold the specified

Modified src/OFMutableDictionary.h from [7108d4387d] to [43070c71d1].

32
33
34
35
36
37
38




39
40
41
42
43
44
45
typedef id _Nonnull (^of_dictionary_replace_block_t)(id key, id object);
#endif

/*!
 * @class OFMutableDictionary OFDictionary.h ObjFW/OFDictionary.h
 *
 * @brief An abstract class for storing and changing objects in a dictionary.




 */
@interface OFMutableDictionary OF_GENERIC(KeyType, ObjectType):
    OFDictionary OF_GENERIC(KeyType, ObjectType)
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define KeyType id
# define ObjectType id
#endif







>
>
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
typedef id _Nonnull (^of_dictionary_replace_block_t)(id key, id object);
#endif

/*!
 * @class OFMutableDictionary OFDictionary.h ObjFW/OFDictionary.h
 *
 * @brief An abstract class for storing and changing objects in a dictionary.
 *
 * @note Subclasses must implement @ref setObject:forKey:,
 *	 @ref removeObjectForKey: as well as all methods of @ref OFDictionary
 *	 that need to be implemented.
 */
@interface OFMutableDictionary OF_GENERIC(KeyType, ObjectType):
    OFDictionary OF_GENERIC(KeyType, ObjectType)
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define KeyType id
# define ObjectType id
#endif

Modified src/OFMutableSet.h from [4dcb30f3dc] to [9b1889a14f].

19
20
21
22
23
24
25



26
27
28
29
30
31
32

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFMutableSet OFSet.h ObjFW/OFSet.h
 *
 * @brief An abstract class for a mutable unordered set of unique objects.



 */
@interface OFMutableSet OF_GENERIC(ObjectType): OFSet OF_GENERIC(ObjectType)
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!
 * @brief Creates a new OFMutableSet with enough memory to hold the specified







>
>
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFMutableSet OFSet.h ObjFW/OFSet.h
 *
 * @brief An abstract class for a mutable unordered set of unique objects.
 *
 * @note Subclasses must implement @ref addObject:, @ref removeObject: as well
 *	 as all methods of @ref OFSet that need to be implemented.
 */
@interface OFMutableSet OF_GENERIC(ObjectType): OFSet OF_GENERIC(ObjectType)
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!
 * @brief Creates a new OFMutableSet with enough memory to hold the specified

Modified src/OFSet.h from [2986242031] to [9f71c62224].

56
57
58
59
60
61
62



63
64
65
66
67
68
69
/*!
 * @class OFSet OFSet.h ObjFW/OFSet.h
 *
 * @brief An abstract class for an unordered set of unique objects.
 *
 * @warning Do not mutate objects that are in a set! Changing the hash of
 *	    objects in a set breaks the internal representation of the set!



 */
@interface OFSet OF_GENERIC(ObjectType): OFObject <OFCollection, OFCopying,
    OFMutableCopying, OFSerialization>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!







>
>
>







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*!
 * @class OFSet OFSet.h ObjFW/OFSet.h
 *
 * @brief An abstract class for an unordered set of unique objects.
 *
 * @warning Do not mutate objects that are in a set! Changing the hash of
 *	    objects in a set breaks the internal representation of the set!
 *
 * @note Subclasses must implement @ref count, @ref containsObject: and
 *	 @ref objectEnumerator.
 */
@interface OFSet OF_GENERIC(ObjectType): OFObject <OFCollection, OFCopying,
    OFMutableCopying, OFSerialization>
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# define ObjectType id
#endif
/*!