@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2022 Jonathan Schleifer + * Copyright (c) 2008-2024 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -16,11 +16,10 @@ #include "config.h" #import "OFUUID.h" #import "OFArray.h" #import "OFString.h" -#import "OFXMLElement.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" @@ -143,33 +142,10 @@ } return self; } -- (instancetype)initWithSerialization: (OFXMLElement *)element -{ - void *pool = objc_autoreleasePoolPush(); - OFString *UUIDString; - - @try { - if (![element.name isEqual: self.className] || - ![element.namespace isEqual: OFSerializationNS]) - @throw [OFInvalidArgumentException exception]; - - UUIDString = element.stringValue; - } @catch (id e) { - [self release]; - @throw e; - } - - self = [self initWithUUIDString: UUIDString]; - - objc_autoreleasePoolPop(pool); - - return self; -} - - (bool)isEqual: (id)object { OFUUID *UUID; if (![object isKindOfClass: [OFUUID class]]) @@ -233,20 +209,6 @@ - (OFString *)description { return self.UUIDString; } - -- (OFXMLElement *)XMLElementBySerializing -{ - void *pool = objc_autoreleasePoolPush(); - OFXMLElement *element = [OFXMLElement elementWithName: self.className - namespace: OFSerializationNS - stringValue: self.UUIDString]; - - [element retain]; - - objc_autoreleasePoolPop(pool); - - return [element autorelease]; -} @end