ObjFW  Check-in [b4614c3b1e]

Overview
Comment:OFXMLElementBuilder: Allow subclassing

This is useful for slightly altering the behavior, e.g. rejecting
certain things.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b4614c3b1ec0fae20a282442068bfc62e6a20c5423a0aa6e325e324296e6bc60
User & Date: js on 2019-10-03 23:29:34
Other Links: manifest | tags
Context
2019-10-06
16:27
Rename OFDNSRequest -> OFDNSQuery check-in: d69f7bc1ff user: js tags: trunk
2019-10-03
23:29
OFXMLElementBuilder: Allow subclassing check-in: b4614c3b1e user: js tags: trunk
21:43
OFDNSResolver: Split out settings check-in: 4fd5a7086c user: js tags: trunk
Changes

Modified src/OFXMLElementBuilder.h from [a5bfbc9534] to [9c972fb717].

100
101
102
103
104
105
106
107
108
109
110
111

112
113
114
115
116
117
118
 * @brief A class implementing the OFXMLParserDelegate protocol that can build
 * OFXMLElements from the document parsed by the OFXMLParser.
 *
 * It can also be used to build OFXMLElements from parts of the document by
 * first parsing stuff using the OFXMLParser with another delegate and then
 * setting the OFXMLElementBuilder as delegate for the parser.
 */
OF_SUBCLASSING_RESTRICTED
@interface OFXMLElementBuilder: OFObject <OFXMLParserDelegate>
{
	OFMutableArray OF_GENERIC(OFXMLElement *) *_stack;
	id <OFXMLElementBuilderDelegate> _Nullable _delegate;

}

/*!
 * @brief The delegate for the OFXMLElementBuilder.
 */
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
    id <OFXMLElementBuilderDelegate> delegate;







<




>







100
101
102
103
104
105
106

107
108
109
110
111
112
113
114
115
116
117
118
 * @brief A class implementing the OFXMLParserDelegate protocol that can build
 * OFXMLElements from the document parsed by the OFXMLParser.
 *
 * It can also be used to build OFXMLElements from parts of the document by
 * first parsing stuff using the OFXMLParser with another delegate and then
 * setting the OFXMLElementBuilder as delegate for the parser.
 */

@interface OFXMLElementBuilder: OFObject <OFXMLParserDelegate>
{
	OFMutableArray OF_GENERIC(OFXMLElement *) *_stack;
	id <OFXMLElementBuilderDelegate> _Nullable _delegate;
	OF_RESERVE_IVARS(4)
}

/*!
 * @brief The delegate for the OFXMLElementBuilder.
 */
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
    id <OFXMLElementBuilderDelegate> delegate;