ObjFW  Diff

Differences From Artifact [78b5b5f3d6]:

To Artifact [bbb2b390ac]:


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







-
+

-
+

-
-
+



+



-
+







OF_ASSUME_NONNULL_BEGIN

@class OFArray OF_GENERIC(ObjectType);
@class OFMutableArray OF_GENERIC(ObjectType);
@class OFString;

/**
 * @class OFINICategory OFINICategory.h ObjFW/ObjFW.h
 * @class OFINISection OFINISection.h ObjFW/ObjFW.h
 *
 * @brief A class for representing a category of an INI file.
 * @brief A class for representing a section of an INI file.
 */
OF_SUBCLASSING_RESTRICTED
@interface OFINICategory: OFObject
@interface OFINISection: OFObject
{
	OFString *_name;
	OFMutableArray *_lines;
	OF_RESERVE_IVARS(OFINISection, 4)
}

/**
 * @brief The name of the INI category
 * @brief The name of the INI section
 */
@property (copy, nonatomic) OFString *name;

- (instancetype)init OF_UNAVAILABLE;

/**
 * @brief Returns the string for the specified key, or `nil` if it does not
136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







 */
- (double)doubleValueForKey: (OFString *)key defaultValue: (double)defaultValue;

/**
 * @brief Returns an array of strings for the specified multi-key, or an empty
 *	  array if the key does not exist.
 *
 * A multi-key is a key which exists several times in the same category. Each
 * A multi-key is a key which exists several times in the same section. Each
 * occurrence of the key/value pair adds the respective value to the array.
 *
 * @param key The multi-key for which the array should be returned
 * @return The array for the specified key, or an empty array if it does not
 *	   exist
 */
- (OFArray OF_GENERIC(OFString *) *)arrayValueForKey: (OFString *)key;