Differences From Artifact [44ccbfc4a0]:
- File src/OFINIFile.h — part of check-in [904d0639c4] at 2024-08-24 09:20:58 on branch trunk — OFINIFile: Allow comments before first category (user: js, size: 4309) [annotate] [blame] [check-ins using]
To Artifact [56fd049fb8]:
- File
src/OFINIFile.h
— part of check-in
[0fead8a915]
at
2024-08-24 10:14:30
on branch trunk
— Rename OFINICategory to OFINISection
OFINICategory is provided as a deprecated subclass of OFINISection to
maintain API and ABI compatibility. (user: js, size: 4857) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
15 16 17 18 19 20 21 | * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ #import "OFObject.h" #import "OFString.h" | | | | | | > > > > > > | 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 | * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ #import "OFObject.h" #import "OFString.h" #import "OFINISection.h" OF_ASSUME_NONNULL_BEGIN @class OFIRI; @class OFMutableArray OF_GENERIC(ObjectType); /** * @class OFINIFile OFINIFile.h ObjFW/ObjFW.h * * @brief A class for reading, creating and modifying INI files. */ OF_SUBCLASSING_RESTRICTED @interface OFINIFile: OFObject { OFINISection *_prologue; OFMutableArray OF_GENERIC(OFINISection *) *_sections; } /** * @brief All sections in the INI file. */ @property (readonly, nonatomic) OFArray OF_GENERIC(OFINISection *) *sections; /** * @brief All sections in the INI file. */ @property (readonly, nonatomic) OFArray OF_GENERIC(OFINISection *) *categories OF_DEPRECATED(ObjFW, 1, 2, "Use -[sections] instead"); /** * @brief Creates a new OFINIFile with the contents of the specified file. * * @param IRI The IRI to the file whose contents the OFINIFile should contain * * @return A new, autoreleased OFINIFile with the contents of the specified file |
︙ | ︙ | |||
99 100 101 102 103 104 105 | * encoding */ - (instancetype)initWithIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding OF_DESIGNATED_INITIALIZER; /** | | > > > > > > > | > > | | | | > | 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 | * encoding */ - (instancetype)initWithIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding OF_DESIGNATED_INITIALIZER; /** * @brief Returns an @ref OFINISection for the section with the specified name. * * @param name The name of the section for which an @ref OFINISection should be * returned * * @return An @ref OFINISection for the section with the specified name */ - (OFINISection *)sectionForName: (OFString *)name; /** * @brief Returns an @ref OFINISection for the section with the specified name. * * @param name The name of the section for which an @ref OFINISection should be * returned * * @return An @ref OFINISection for the section with the specified name */ - (OFINISection *)categoryForName: (OFString *)name OF_DEPRECATED(ObjFW, 1, 2, "Use -[sectionForName:] instead"); /** * @brief Writes the contents of the OFINIFile to a file. * * @param IRI The IRI of the file to write to */ - (void)writeToIRI: (OFIRI *)IRI; |
︙ | ︙ |