@@ -26,28 +26,28 @@ @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); @class OFStream; @class OFXMLParser; -/*! +/** * @protocol OFXMLParserDelegate OFXMLParser.h ObjFW/OFXMLParser.h * * @brief A protocol that needs to be implemented by delegates for OFXMLParser. */ @protocol OFXMLParserDelegate @optional -/*! +/** * @brief This callback is called when the XML parser found processing * instructions. * * @param parser The parser which found processing instructions * @param processingInstructions The processing instructions */ - (void)parser: (OFXMLParser *)parser foundProcessingInstructions: (OFString *)processingInstructions; -/*! +/** * @brief This callback is called when the XML parser found the start of a new * tag. * * @param parser The parser which found a new tag * @param name The name of the tag which just started @@ -60,11 +60,11 @@ didStartElement: (OFString *)name prefix: (nullable OFString *)prefix namespace: (nullable OFString *)ns attributes: (nullable OFArray OF_GENERIC(OFXMLAttribute *) *)attributes; -/*! +/** * @brief This callback is called when the XML parser found the end of a tag. * * @param parser The parser which found the end of a tag * @param name The name of the tag which just ended * @param prefix The prefix of the tag which just ended or `nil` @@ -73,11 +73,11 @@ - (void)parser: (OFXMLParser *)parser didEndElement: (OFString *)name prefix: (nullable OFString *)prefix namespace: (nullable OFString *)ns; -/*! +/** * @brief This callback is called when the XML parser found characters. * * In case there are comments or CDATA, it is possible that this callback is * called multiple times in a row. * @@ -85,29 +85,29 @@ * @param characters The characters the XML parser found */ - (void)parser: (OFXMLParser *)parser foundCharacters: (OFString *)characters; -/*! +/** * @brief This callback is called when the XML parser found CDATA. * * @param parser The parser which found a string * @param CDATA The CDATA the XML parser found */ - (void)parser: (OFXMLParser *)parser foundCDATA: (OFString *)CDATA; -/*! +/** * @brief This callback is called when the XML parser found a comment. * * @param parser The parser which found a comment * @param comment The comment the XML parser found */ - (void)parser: (OFXMLParser *)parser foundComment: (OFString *)comment; -/*! +/** * @brief This callback is called when the XML parser found an entity it * doesn't know. * * The callback is supposed to return a substitution for the entity or `nil` if * it is not known to the callback as well, in which case an exception will be @@ -119,11 +119,11 @@ */ - (nullable OFString *)parser: (OFXMLParser *)parser foundUnknownEntityNamed: (OFString *)entity; @end -/*! +/** * @class OFXMLParser OFXMLParser.h ObjFW/OFXMLParser.h * * @brief An event-based XML parser. * * OFXMLParser is an event-based XML parser which calls the delegate's callbacks @@ -172,71 +172,71 @@ bool _lastCarriageReturn, _finishedParsing; of_string_encoding_t _encoding; size_t _depthLimit; } -/*! +/** * @brief The delegate that is used by the XML parser. */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) id delegate; -/*! +/** * @brief The current line number. */ @property (readonly, nonatomic) size_t lineNumber; -/*! +/** * @brief Whether the XML parser has finished parsing. */ @property (readonly, nonatomic) bool hasFinishedParsing; -/*! +/** * @brief The depth limit for the XML parser. * * If the depth limit is exceeded, an OFMalformedXMLException is thrown. * * The default is 32. 0 means unlimited (insecure!). */ @property (nonatomic) size_t depthLimit; -/*! +/** * @brief Creates a new XML parser. * * @return A new, autoreleased OFXMLParser */ + (instancetype)parser; -/*! +/** * @brief Parses the specified buffer with the specified size. * * @param buffer The buffer to parse * @param length The length of the buffer */ - (void)parseBuffer: (const char *)buffer length: (size_t)length; -/*! +/** * @brief Parses the specified string. * * @param string The string to parse */ - (void)parseString: (OFString *)string; -/*! +/** * @brief Parses the specified stream. * * @param stream The stream to parse */ - (void)parseStream: (OFStream *)stream; #ifdef OF_HAVE_FILES -/*! +/** * @brief Parses the specified file. * * @param path The path to the file to parse */ - (void)parseFile: (OFString *)path; #endif @end OF_ASSUME_NONNULL_END