Differences From Artifact [177671f0ee]:
- File src/OFXMLElement.m — part of check-in [e40729d406] at 2013-02-12 18:22:15 on branch trunk — Prefix all ivars with an underscore. (user: js, size: 28342) [annotate] [blame] [check-ins using]
To Artifact [a91eb986c2]:
- File
src/OFXMLElement.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 28380) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
401 402 403 404 405 406 407 | - (void)setName: (OFString*)name { if (name == nil) @throw [OFInvalidArgumentException exceptionWithClass: [self class] selector: _cmd]; | | | | | | | | | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | - (void)setName: (OFString*)name { if (name == nil) @throw [OFInvalidArgumentException exceptionWithClass: [self class] selector: _cmd]; OF_SETTER(_name, name, true, 1) } - (OFString*)name { OF_GETTER(_name, true) } - (void)setNamespace: (OFString*)namespace { OF_SETTER(_namespace, namespace, true, 1) } - (OFString*)namespace { OF_GETTER(_namespace, true) } - (OFArray*)attributes { OF_GETTER(_attributes, true) } - (void)setChildren: (OFArray*)children { OF_SETTER(_children, children, true, 2) } - (OFArray*)children { OF_GETTER(_children, true) } - (void)setStringValue: (OFString*)stringValue { void *pool = objc_autoreleasePoolPush(); [self setChildren: [OFArray arrayWithObject: |
︙ | ︙ | |||
622 623 624 625 626 627 628 | } /* Childen */ if (_children != nil) { OFXMLElement **childrenObjects = [_children objects]; size_t childrenCount = [_children count]; OFDataArray *tmp = [OFDataArray dataArray]; | | | | | | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | } /* Childen */ if (_children != nil) { OFXMLElement **childrenObjects = [_children objects]; size_t childrenCount = [_children count]; OFDataArray *tmp = [OFDataArray dataArray]; bool indent; if (indentation > 0) { indent = true; for (j = 0; j < childrenCount; j++) { if ([childrenObjects[j] isKindOfClass: charactersClass] || [childrenObjects[j] isKindOfClass: CDATAClass]) { indent = false; break; } } } else indent = false; for (j = 0; j < childrenCount; j++) { OFString *child; unsigned int ind = (indent ? indentation : 0); if (ind) [tmp addItem: "\n"]; |
︙ | ︙ | |||
940 941 942 943 944 945 946 | [self addAttributeWithName: prefix namespace: @"http://www.w3.org/2000/xmlns/" stringValue: namespace]; } - (OFString*)defaultNamespace { | | | | 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 | [self addAttributeWithName: prefix namespace: @"http://www.w3.org/2000/xmlns/" stringValue: namespace]; } - (OFString*)defaultNamespace { OF_GETTER(_defaultNamespace, true) } - (void)setDefaultNamespace: (OFString*)defaultNamespace { OF_SETTER(_defaultNamespace, defaultNamespace, true, 1) } - (void)addChild: (OFXMLNode*)child { if ([child isKindOfClass: [OFXMLAttribute class]]) @throw [OFInvalidArgumentException exceptionWithClass: [self class] |
︙ | ︙ | |||
1121 1122 1123 1124 1125 1126 1127 | [ret addObject: objects[i]]; [ret makeImmutable]; return ret; } | | | | | | | | | | | 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | [ret addObject: objects[i]]; [ret makeImmutable]; return ret; } - (bool)isEqual: (id)object { OFXMLElement *element; if (![object isKindOfClass: [OFXMLElement class]]) return false; element = object; if (element->_name != _name && ![element->_name isEqual: _name]) return false; if (element->_namespace != _namespace && ![element->_namespace isEqual: _namespace]) return false; if (element->_defaultNamespace != _defaultNamespace && ![element->_defaultNamespace isEqual: _defaultNamespace]) return false; if (element->_attributes != _attributes && ![element->_attributes isEqual: _attributes]) return false; if (element->_namespaces != _namespaces && ![element->_namespaces isEqual: _namespaces]) return false; if (element->_children != _children && ![element->_children isEqual: _children]) return false; return true; } - (uint32_t)hash { uint32_t hash; OF_HASH_INIT(hash); |
︙ | ︙ |