ObjFW
Toggle main menu visibility
Loading...
Searching...
No Matches
OFXMLElementBuilder.h
1
/*
2
* Copyright (c) 2008-2026 Jonathan Schleifer <js@nil.im>
3
*
4
* All rights reserved.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU Lesser General Public License version 3.0 only,
8
* as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13
* version 3.0 for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public License
16
* version 3.0 along with this program. If not, see
17
* <https://www.gnu.org/licenses/>.
18
*/
19
20
#import "
OFObject.h
"
21
#import "OFXMLParser.h"
22
23
OF_ASSUME_NONNULL_BEGIN
24
25
@class
OFMutableArray
OF_GENERIC(ObjectType);
26
@class
OFXMLElement
;
27
@class
OFXMLElementBuilder
;
28
35
@protocol
OFXMLElementBuilderDelegate <
OFObject
>
46
- (void)elementBuilder: (
OFXMLElementBuilder
*)builder
47
didBuildElement: (
OFXMLElement
*)element;
48
49
@optional
60
- (void)elementBuilder: (
OFXMLElementBuilder
*)builder
61
didBuildOrphanNode: (
OFXMLNode
*)node;
62
81
- (void)elementBuilder: (
OFXMLElementBuilder
*)builder
82
didNotExpectCloseTag: (
OFString
*)name
83
prefix: (nullable
OFString
*)prefix
84
namespace: (nullable
OFString
*)nameSpace;
85
94
- (
OFString
*)elementBuilder: (
OFXMLElementBuilder
*)builder
95
foundUnknownEntityNamed: (
OFString
*)entity;
96
@end
97
108
@interface
OFXMLElementBuilder
:
OFObject
<
OFXMLParserDelegate
>
109
{
110
OFMutableArray
OF_GENERIC(
OFXMLElement
*) *_stack;
111
id <OFXMLElementBuilderDelegate> _Nullable _delegate;
112
OF_RESERVE_IVARS(
OFXMLElementBuilder
, 4)
113
}
114
118
@property
OF_NULLABLE_PROPERTY (assign, nonatomic)
119
id <OFXMLElementBuilderDelegate> delegate;
120
126
+ (instancetype)
builder
;
127
@end
128
129
OF_ASSUME_NONNULL_END
OFObject.h
OFMutableArray
An abstract class for storing, adding and removing objects in an array.
Definition
OFMutableArray.h:50
OFObject
The root class for all other classes inside ObjFW.
Definition
OFObject.h:956
OFString
A class for handling strings.
Definition
OFString.h:144
OFXMLElementBuilder
A class implementing the OFXMLParserDelegate protocol that can build OFXMLElements from the document ...
Definition
OFXMLElementBuilder.h:110
+[OFXMLElementBuilder builder]
instancetype builder()
Creates a new element builder.
Definition
OFXMLElementBuilder.m:37
OFXMLElement
A class which stores an XML element.
Definition
OFXMLElement.h:38
OFXMLNode
A class which stores an XML element.
Definition
OFXMLNode.h:31
OFXMLParserDelegate-p
A protocol that needs to be implemented by delegates for OFXMLParser.
Definition
OFXMLParser.h:38
src
OFXMLElementBuilder.h
Generated by
1.17.0