ObjFW  Diff

Differences From Artifact [ebe81ff199]:

To Artifact [826ba40401]:


12
13
14
15
16
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
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
95
96
97
98
99
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
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"

@class OFString;
@class OFMutableArray;

/*!
 * @brief A class for representing a category of an INI file.
 */
@interface OFINICategory: OFObject
{
	OFString *_name;
	OFMutableArray *_lines;
}

#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *name;
#endif

/*!
 * @brief Returns the string value for the specified key, or nil if it does not
 *	  exist.
 *
 * @param key The key for which the string value should be returned
 * @return The string value for the specified key, or nil if it does not exist
 */
- (OFString*)stringForKey: (OFString*)key;

/*!
 * @brief Returns the string value for the specified key or the specified
 *	  default value if it does not exist.
 *
 * @param key The key for which the string value should be returned
 * @param defaultValue The value to return if the key does not exist
 * @return The string value for the specified key or the specified default
 *	   value if it does not exist
 */
- (OFString*)stringForKey: (OFString*)key
	     defaultValue: (OFString*)defaultValue;

/*!
 * @brief Returns the integer value for the specified key or the specified
 *	  default value if it does not exist.
 *
 * @param key The key for which the integer value should be returned
 * @param defaultValue The value to return if the key does not exist
 * @return The integer value for the specified key or the specified default
 *	   value if it does not exist
 */
- (intmax_t)integerForKey: (OFString*)key
	     defaultValue: (intmax_t)defaultValue;

/*!
 * @brief Returns the bool value for the specified key or the specified default
 *	  value if it does not exist.
 *
 * @param key The key for which the bool value should be returned
 * @param defaultValue The value to return if the key does not exist
 * @return The bool value for the specified key or the specified default value
 *	   if it does not exist
 */
- (bool)boolForKey: (OFString*)key
      defaultValue: (bool)defaultValue;

/*!
 * @brief Returns the float value for the specified key or the specified
 *	  default value if it does not exist.
 *
 * @param key The key for which the float value should be returned
 * @param defaultValue The value to return if the key does not exist
 * @return The float value for the specified key or the specified default value
 *	   if it does not exist
 */
- (float)floatForKey: (OFString*)key
	defaultValue: (float)defaultValue;

/*!
 * @brief Returns the double value for the specified key or the specified
 *	  default value if it does not exist.
 *
 * @param key The key for which the double value should be returned
 * @param defaultValue The value to return if the key does not exist
 * @return The double value for the specified key or the specified default
 *	   value if it does not exist
 */
- (double)doubleForKey: (OFString*)key
	  defaultValue: (double)defaultValue;

/*!
 * @brief Sets the value of the specified key to the specified string.
 *
 * @param string The string to which the value of the key should be set
 * @param key The key for which the new value should be set
 */
- (void)setString: (OFString*)string
	   forKey: (OFString*)key;

/*!
 * @brief Sets the value of the specified key to the specified integer.
 *
 * @param integer The integer to which the value of the key should be set
 * @param key The key for which the new value should be set
 */
- (void)setInteger: (intmax_t)integer
	    forKey: (OFString*)key;

/*!
 * @brief Sets the value of the specified key to the specified bool.
 *
 * @param bool_ The bool to which the value of the key should be set
 * @param key The key for which the new value should be set
 */
- (void)setBool: (bool)bool_
	 forKey: (OFString*)key;

/*!
 * @brief Sets the value of the specified key to the specified float.
 *
 * @param float_ The float to which the value of the key should be set
 * @param key The key for which the new value should be set
 */
- (void)setFloat: (float)float_
	  forKey: (OFString*)key;

/*!
 * @brief Sets the value of the specified key to the specified double.
 *
 * @param double_ The double to which the value of the key should be set
 * @param key The key for which the new value should be set
 */
- (void)setDouble: (double)double_
	   forKey: (OFString*)key;

/*!
 * @brief Removes the value for the specified key
 *
 * @param key The key of the value to remove
 */
- (void)removeValueForKey: (OFString*)key;
@end

/*!
 * @brief A class for reading, creating and modifying INI files.
 */
@interface OFINIFile: OFObject
{
	OFMutableArray *_categories;







<

|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







12
13
14
15
16
17
18

19
20



21


































































































































22
23
24
25
26
27
28
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"


@class OFMutableArray;
@class OFString;



@class OFINICategory;



































































































































/*!
 * @brief A class for reading, creating and modifying INI files.
 */
@interface OFINIFile: OFObject
{
	OFMutableArray *_categories;