@@ -14,13 +14,12 @@ */ #include "config.h" #import "OFNull.h" -#import "OFString.h" -#import "OFXMLElement.h" #import "OFData.h" +#import "OFString.h" #import "OFInvalidArgumentException.h" @interface OFNull () - (OFString *) @@ -39,27 +38,10 @@ + (OFNull *)null { return null; } -- (instancetype)initWithSerialization: (OFXMLElement *)element -{ - void *pool; - - [self release]; - - pool = objc_autoreleasePoolPush(); - - if (![element.name isEqual: self.className] || - ![element.namespace isEqual: OFSerializationNS]) - @throw [OFInvalidArgumentException exception]; - - objc_autoreleasePoolPop(pool); - - return [OFNull null]; -} - - (OFString *)description { return @""; } @@ -66,25 +48,10 @@ - (id)copy { return self; } -- (OFXMLElement *)XMLElementBySerializing -{ - void *pool = objc_autoreleasePoolPush(); - OFXMLElement *element; - - element = [OFXMLElement elementWithName: self.className - namespace: OFSerializationNS]; - - [element retain]; - - objc_autoreleasePoolPop(pool); - - return [element autorelease]; -} - - (OFString *)JSONRepresentation { return [self of_JSONRepresentationWithOptions: 0 depth: 0]; }