ObjFW  Check-in [09bd870f8c]

Overview
Comment:Fix ObjC++.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 09bd870f8c33daac4f40e48afe40dc826d46a595e63f5a7c99691c78032c69d7
User & Date: js on 2013-02-22 11:32:52
Other Links: manifest | tags
Context
2013-02-22
12:15
Print an error when OFApplication is subclassed. check-in: fb79b7f369 user: js tags: trunk
11:32
Fix ObjC++. check-in: 09bd870f8c user: js tags: trunk
2013-02-21
19:35
Add support for generating BinaryPack. check-in: 23c798d4f1 user: js tags: trunk
Changes

Modified src/OFXMLAttribute.h from [45b1e6b315] to [ddb81f76d9].

24
25
26
27
28
29
30
31






32
33
34
35
36
37
38
@interface OFXMLAttribute: OFXMLNode
{
@public
	OFString *_name, *_namespace, *_stringValue;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, copy) OFString *name, *namespace, *stringValue;






#endif

/*!
 * @brief Creates a new XML attribute.
 *
 * @param name The name of the attribute
 * @param stringValue The string value of the attribute







|
>
>
>
>
>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@interface OFXMLAttribute: OFXMLNode
{
@public
	OFString *_name, *_namespace, *_stringValue;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, copy) OFString *name;
# ifdef __cplusplus
@property (readonly, copy, getter=namespace) OFString *namespace_;
# else
@property (readonly, copy) OFString *namespace;
# endif
@property (readonly, copy) OFString *stringValue;
#endif

/*!
 * @brief Creates a new XML attribute.
 *
 * @param name The name of the attribute
 * @param stringValue The string value of the attribute

Modified src/OFXMLElement.h from [ea560ddced] to [eadd711811].

31
32
33
34
35
36
37
38






39
40
41
42
43
44
45
	OFString *_name, *_namespace, *_defaultNamespace;
	OFMutableArray *_attributes;
	OFMutableDictionary *_namespaces;
	OFMutableArray *_children;
}

#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *name, *namespace, *defaultNamespace;






@property (readonly, copy) OFArray *attributes;
@property (copy) OFArray *children;
#endif

/*!
 * @brief Creates a new XML element with the specified name.
 *







|
>
>
>
>
>
>







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
	OFString *_name, *_namespace, *_defaultNamespace;
	OFMutableArray *_attributes;
	OFMutableDictionary *_namespaces;
	OFMutableArray *_children;
}

#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *name;
# ifdef __cplusplus
@property (copy, getter=namespace, setter=setNamespace:) OFString *namespace_;
# else
@property (copy) OFString *namespace;
# endif
@property (copy) OFString *defaultNamespace;
@property (readonly, copy) OFArray *attributes;
@property (copy) OFArray *children;
#endif

/*!
 * @brief Creates a new XML element with the specified name.
 *
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
+ (instancetype)elementWithName: (OFString*)name
		    stringValue: (OFString*)stringValue;

/*!
 * @brief Creates a new XML element with the specified name and namespace.
 *
 * @param name The name for the element
 * @param namespace The namespace for the element
 * @return A new autoreleased OFXMLElement with the specified element name and
 *	   namespace
 */
+ (instancetype)elementWithName: (OFString*)name
		      namespace: (OFString*)namespace;

/*!
 * @brief Creates a new XML element with the specified name, namespace and
 * 	  string value.
 *
 * @param name The name for the element
 * @param namespace The namespace for the element
 * @param stringValue The value for the element
 * @return A new autoreleased OFXMLElement with the specified element name,
 *	   namespace and value
 */
+ (instancetype)elementWithName: (OFString*)name
		      namespace: (OFString*)namespace
		    stringValue: (OFString*)stringValue;

/*!
 * @brief Creates a new element with the specified element.
 *
 * @param element An OFXMLElement to initialize the OFXMLElement with
 * @return A new autoreleased OFXMLElement with the contents of the specified







|




|






|





|







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
+ (instancetype)elementWithName: (OFString*)name
		    stringValue: (OFString*)stringValue;

/*!
 * @brief Creates a new XML element with the specified name and namespace.
 *
 * @param name The name for the element
 * @param namespace_ The namespace for the element
 * @return A new autoreleased OFXMLElement with the specified element name and
 *	   namespace
 */
+ (instancetype)elementWithName: (OFString*)name
		      namespace: (OFString*)namespace_;

/*!
 * @brief Creates a new XML element with the specified name, namespace and
 * 	  string value.
 *
 * @param name The name for the element
 * @param namespace_ The namespace for the element
 * @param stringValue The value for the element
 * @return A new autoreleased OFXMLElement with the specified element name,
 *	   namespace and value
 */
+ (instancetype)elementWithName: (OFString*)name
		      namespace: (OFString*)namespace_
		    stringValue: (OFString*)stringValue;

/*!
 * @brief Creates a new element with the specified element.
 *
 * @param element An OFXMLElement to initialize the OFXMLElement with
 * @return A new autoreleased OFXMLElement with the contents of the specified
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
163
   stringValue: (OFString*)stringValue;

/*!
 * @brief Initializes an already allocated OFXMLElement with the specified name
 *	  and namespace.
 *
 * @param name The name for the element
 * @param namespace The namespace for the element
 * @return An initialized OFXMLElement with the specified element name and
 *	   namespace
 */
- initWithName: (OFString*)name
     namespace: (OFString*)namespace;

/*!
 * @brief Initializes an already allocated OFXMLElement with the specified name,
 *	  namespace and value.
 *
 * @param name The name for the element
 * @param namespace The namespace for the element
 * @param stringValue The value for the element
 * @return An initialized OFXMLElement with the specified element name,
 *	   namespace and value
 */
- initWithName: (OFString*)name
     namespace: (OFString*)namespace
   stringValue: (OFString*)stringValue;

/*!
 * @brief Initializes an already allocated OFXMLElement with the specified
 *	  element.
 *
 * @param element An OFXMLElement to initialize the OFXMLElement with







|




|






|





|







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
163
164
165
166
167
168
169
   stringValue: (OFString*)stringValue;

/*!
 * @brief Initializes an already allocated OFXMLElement with the specified name
 *	  and namespace.
 *
 * @param name The name for the element
 * @param namespace_ The namespace for the element
 * @return An initialized OFXMLElement with the specified element name and
 *	   namespace
 */
- initWithName: (OFString*)name
     namespace: (OFString*)namespace_;

/*!
 * @brief Initializes an already allocated OFXMLElement with the specified name,
 *	  namespace and value.
 *
 * @param name The name for the element
 * @param namespace_ The namespace for the element
 * @param stringValue The value for the element
 * @return An initialized OFXMLElement with the specified element name,
 *	   namespace and value
 */
- initWithName: (OFString*)name
     namespace: (OFString*)namespace_
   stringValue: (OFString*)stringValue;

/*!
 * @brief Initializes an already allocated OFXMLElement with the specified
 *	  element.
 *
 * @param element An OFXMLElement to initialize the OFXMLElement with
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
 * @return The name of the element
 */
- (OFString*)name;

/*!
 * @brief Sets the namespace of the element.
 *
 * @param namespace The new namespace
 */
- (void)setNamespace: (OFString*)namespace;

/*!
 * @brief Returns the namespace of the element.
 *
 * @return The namespace of the element
 */
- (OFString*)namespace;







|

|







203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
 * @return The name of the element
 */
- (OFString*)name;

/*!
 * @brief Sets the namespace of the element.
 *
 * @param namespace_ The new namespace
 */
- (void)setNamespace: (OFString*)namespace_;

/*!
 * @brief Returns the namespace of the element.
 *
 * @return The namespace of the element
 */
- (OFString*)namespace;
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
 * @brief Adds the specified attribute with the specified namespace and string
 *	  value.
 *
 * If an attribute with the same name and namespace already exists, it is not
 * added.
 *
 * @param name The name of the attribute
 * @param namespace The namespace of the attribute
 * @param stringValue The value of the attribute
 */
- (void)addAttributeWithName: (OFString*)name
		   namespace: (OFString*)namespace
		 stringValue: (OFString*)stringValue;

/*!
 * @brief Returns the attribute with the specified name.
 *
 * @param attributeName The name of the attribute
 * @return The attribute with the specified name







|



|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
 * @brief Adds the specified attribute with the specified namespace and string
 *	  value.
 *
 * If an attribute with the same name and namespace already exists, it is not
 * added.
 *
 * @param name The name of the attribute
 * @param namespace_ The namespace of the attribute
 * @param stringValue The value of the attribute
 */
- (void)addAttributeWithName: (OFString*)name
		   namespace: (OFString*)namespace_
		 stringValue: (OFString*)stringValue;

/*!
 * @brief Returns the attribute with the specified name.
 *
 * @param attributeName The name of the attribute
 * @return The attribute with the specified name
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
- (void)removeAttributeForName: (OFString*)attributeName
		     namespace: (OFString*)attributeNS;

/*!
 * @brief Sets a prefix for a namespace.
 *
 * @param prefix The prefix for the namespace
 * @param namespace The namespace for which the prefix is set
 */
- (void)setPrefix: (OFString*)prefix
     forNamespace: (OFString*)namespace;

/*!
 * @brief Binds a prefix for a namespace.
 *
 * @param prefix The prefix for the namespace
 * @param namespace The namespace for which the prefix is bound
 */
- (void)bindPrefix: (OFString*)prefix
      forNamespace: (OFString*)namespace;

/*!
 * @brief Sets the default namespace for the element to be used if there is no
 *	  parent.
 *
 * @param defaultNamespace The default namespace for the element
 */







|


|





|


|







318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
- (void)removeAttributeForName: (OFString*)attributeName
		     namespace: (OFString*)attributeNS;

/*!
 * @brief Sets a prefix for a namespace.
 *
 * @param prefix The prefix for the namespace
 * @param namespace_ The namespace for which the prefix is set
 */
- (void)setPrefix: (OFString*)prefix
     forNamespace: (OFString*)namespace_;

/*!
 * @brief Binds a prefix for a namespace.
 *
 * @param prefix The prefix for the namespace
 * @param namespace_ The namespace for which the prefix is bound
 */
- (void)bindPrefix: (OFString*)prefix
      forNamespace: (OFString*)namespace_;

/*!
 * @brief Sets the default namespace for the element to be used if there is no
 *	  parent.
 *
 * @param defaultNamespace The default namespace for the element
 */

Modified src/OFXMLElementBuilder.h from [2639811347] to [4b30b61ef9].

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
 *
 * If this method is not implemented in the delegate, the default is to throw
 * an OFMalformedXMLException.
 *
 * @param builder The builder which did not expect the close tag
 * @param name The name of the close tag
 * @param prefix The prefix of the close tag
 * @param namespace The namespace of the close tag
 */
- (void)elementBuilder: (OFXMLElementBuilder*)builder
  didNotExpectCloseTag: (OFString*)name
		prefix: (OFString*)prefix
	     namespace: (OFString*)namespace;

/*!
 * @brief This callback is called when the XML parser for the element builder
 *	  found an unknown entity.
 *
 * @param builder The element builder which found an unknown entity
 * @param entity The name of the entity







|




|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
 *
 * If this method is not implemented in the delegate, the default is to throw
 * an OFMalformedXMLException.
 *
 * @param builder The builder which did not expect the close tag
 * @param name The name of the close tag
 * @param prefix The prefix of the close tag
 * @param namespace_ The namespace of the close tag
 */
- (void)elementBuilder: (OFXMLElementBuilder*)builder
  didNotExpectCloseTag: (OFString*)name
		prefix: (OFString*)prefix
	     namespace: (OFString*)namespace_;

/*!
 * @brief This callback is called when the XML parser for the element builder
 *	  found an unknown entity.
 *
 * @param builder The element builder which found an unknown entity
 * @param entity The name of the entity

Modified src/exceptions/OFUnboundNamespaceException.h from [39eed6d3dc] to [ae816ab4d8].

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
 */
@interface OFUnboundNamespaceException: OFException
{
	OFString *_namespace, *_prefix;
}

#ifdef OF_HAVE_PROPERTIES



@property (readonly, copy, nonatomic) OFString *namespace, *prefix;


#endif

/*!
 * @brief Creates a new, autoreleased unbound namespace exception.
 *
 * @param class_ The class of the object which caused the exception
 * @param namespace The namespace which is unbound
 * @return A new, autoreleased unbound namespace exception
 */
+ (instancetype)exceptionWithClass: (Class)class_
			 namespace: (OFString*)namespace;

/*!
 * @brief Creates a new, autoreleased unbound namespace exception.
 *
 * @param class_ The class of the object which caused the exception
 * @param prefix The prefix which is unbound
 * @return A new, autoreleased unbound namespace exception
 */
+ (instancetype)exceptionWithClass: (Class)class_
			    prefix: (OFString*)prefix;

/*!
 * @brief Initializes an already allocated unbound namespace exception.
 *
 * @param class_ The class of the object which caused the exception
 * @param namespace The namespace which is unbound
 * @return An initialized unbound namespace exception
 */
- initWithClass: (Class)class_
      namespace: (OFString*)namespace;

/*!
 * @brief Initializes an already allocated unbound namespace exception.
 *
 * @param class_ The class of the object which caused the exception
 * @param prefix The prefix which is unbound
 * @return An initialized unbound namespace exception







>
>
>
|
>
>






|



|















|



|







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
 */
@interface OFUnboundNamespaceException: OFException
{
	OFString *_namespace, *_prefix;
}

#ifdef OF_HAVE_PROPERTIES
# ifdef __cplusplus
@property (readonly, copy, nonatomic, getter=namespace) OFString *namespace_;
# else
@property (readonly, copy, nonatomic) OFString *namespace;
# endif
@property (readonly, copy, nonatomic) OFString *prefix;
#endif

/*!
 * @brief Creates a new, autoreleased unbound namespace exception.
 *
 * @param class_ The class of the object which caused the exception
 * @param namespace_ The namespace which is unbound
 * @return A new, autoreleased unbound namespace exception
 */
+ (instancetype)exceptionWithClass: (Class)class_
			 namespace: (OFString*)namespace_;

/*!
 * @brief Creates a new, autoreleased unbound namespace exception.
 *
 * @param class_ The class of the object which caused the exception
 * @param prefix The prefix which is unbound
 * @return A new, autoreleased unbound namespace exception
 */
+ (instancetype)exceptionWithClass: (Class)class_
			    prefix: (OFString*)prefix;

/*!
 * @brief Initializes an already allocated unbound namespace exception.
 *
 * @param class_ The class of the object which caused the exception
 * @param namespace_ The namespace which is unbound
 * @return An initialized unbound namespace exception
 */
- initWithClass: (Class)class_
      namespace: (OFString*)namespace_;

/*!
 * @brief Initializes an already allocated unbound namespace exception.
 *
 * @param class_ The class of the object which caused the exception
 * @param prefix The prefix which is unbound
 * @return An initialized unbound namespace exception