@@ -24,37 +24,37 @@ #import "OFInvalidArgumentException.h" @implementation OFXMLAttribute @synthesize name = _name, namespace = _namespace; -+ (instancetype)attributeWithName: (OFString*)name - namespace: (OFString*)namespace - stringValue: (OFString*)stringValue ++ (instancetype)attributeWithName: (OFString *)name + namespace: (OFString *)namespace + stringValue: (OFString *)stringValue { return [[[self alloc] initWithName: name namespace: namespace stringValue: stringValue] autorelease]; } -+ (instancetype)attributeWithName: (OFString*)name - stringValue: (OFString*)stringValue ++ (instancetype)attributeWithName: (OFString *)name + stringValue: (OFString *)stringValue { return [[[self alloc] initWithName: name stringValue: stringValue] autorelease]; } -- initWithName: (OFString*)name - stringValue: (OFString*)stringValue +- initWithName: (OFString *)name + stringValue: (OFString *)stringValue { return [self initWithName: name namespace: nil stringValue: stringValue]; } -- initWithName: (OFString*)name - namespace: (OFString*)namespace - stringValue: (OFString*)stringValue +- initWithName: (OFString *)name + namespace: (OFString *)namespace + stringValue: (OFString *)stringValue { self = [super init]; @try { _name = [name copy]; @@ -66,11 +66,11 @@ } return self; } -- initWithSerialization: (OFXMLElement*)element +- initWithSerialization: (OFXMLElement *)element { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); @@ -102,16 +102,16 @@ [_stringValue release]; [super dealloc]; } -- (OFString*)stringValue +- (OFString *)stringValue { return [[_stringValue copy] autorelease]; } -- (void)setStringValue: (OFString*)stringValue +- (void)setStringValue: (OFString *)stringValue { OFString *old = _stringValue; _stringValue = [stringValue copy]; [old release]; } @@ -149,11 +149,11 @@ OF_HASH_FINALIZE(hash); return hash; } -- (OFXMLElement*)XMLElementBySerializing +- (OFXMLElement *)XMLElementBySerializing { void *pool = objc_autoreleasePoolPush(); OFXMLElement *element; element = [OFXMLElement elementWithName: [self className] @@ -174,12 +174,12 @@ objc_autoreleasePoolPop(pool); return [element autorelease]; } -- (OFString*)description +- (OFString *)description { return [OFString stringWithFormat: @"", _name, _namespace, _stringValue]; } @end