Differences From Artifact [0e0aeff41f]:
- File
src/OFXMLElement.h
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 13185) [annotate] [blame] [check-ins using]
To Artifact [38861a1e42]:
- File
src/OFXMLElement.h
— part of check-in
[f3ccf14461]
at
2017-10-29 21:58:14
on branch trunk
— Convert methods to properties where appropriate
This improves Swift compatibility. (user: js, size: 12865) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #endif /*! * The default namespace for the element to be used if there is no parent. */ @property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *defaultNamespace; /*! * @brief Creates a new XML element with the specified name. * * @param name The name for the element * @return A new autoreleased OFXMLElement with the specified element name */ + (instancetype)elementWithName: (OFString *)name; | > > > > > > > > > > > > > > > > > | 55 56 57 58 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 |
#endif
/*!
* The default namespace for the element to be used if there is no parent.
*/
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *defaultNamespace;
/*!
* An array with the attributes of the element
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
OFArray OF_GENERIC(OFXMLAttribute *) *attributes;
/*!
* An array of OFXMLNodes with all children of the element.
*/
@property OF_NULLABLE_PROPERTY (nonatomic, copy)
OFArray OF_GENERIC(OFXMLNode *) *children;
/*!
* All children that are elements.
*/
@property (readonly, nonatomic) OFArray OF_GENERIC(OFXMLElement *) *elements;
/*!
* @brief Creates a new XML element with the specified name.
*
* @param name The name for the element
* @return A new autoreleased OFXMLElement with the specified element name
*/
+ (instancetype)elementWithName: (OFString *)name;
|
| ︙ | ︙ | |||
225 226 227 228 229 230 231 |
*
* @param prefix The prefix for the namespace
* @param namespace_ The namespace for which the prefix is bound
*/
- (void)bindPrefix: (OFString *)prefix
forNamespace: (OFString *)namespace_;
| < < < < < < < | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
*
* @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 Adds the specified attribute.
*
* If an attribute with the same name and namespace already exists, it is not
* added.
*
* @param attribute The attribute to add
|
| ︙ | ︙ | |||
303 304 305 306 307 308 309 | * * @param attributeName The name of the attribute * @param attributeNS The namespace of the attribute */ - (void)removeAttributeForName: (OFString *)attributeName namespace: (nullable OFString *)attributeNS; | < < < < < < < < < < < < < < | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | * * @param attributeName The name of the attribute * @param attributeNS The namespace of the attribute */ - (void)removeAttributeForName: (OFString *)attributeName namespace: (nullable OFString *)attributeNS; /*! * @brief Adds a child to the OFXMLElement. * * @param child An OFXMLNode which is added as a child */ - (void)addChild: (OFXMLNode *)child; |
| ︙ | ︙ | |||
375 376 377 378 379 380 381 | * * @param index The index of the child to replace * @param node The node to replace the child with */ - (void)replaceChildAtIndex: (size_t)index withNode: (OFXMLNode *)node; | < < < < < < < | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
*
* @param index The index of the child to replace
* @param node The node to replace the child with
*/
- (void)replaceChildAtIndex: (size_t)index
withNode: (OFXMLNode *)node;
/*!
* @brief Returns all children that have the specified namespace.
*
* @return All children that have the specified namespace
*/
- (OFArray OF_GENERIC(OFXMLElement *) *)elementsForNamespace:
(nullable OFString *)elementNS;
|
| ︙ | ︙ |