Differences From Artifact [bb52ca9d4f]:
- File src/OFString.m — part of check-in [17d18368bb] at 2011-05-08 22:36:34 on branch trunk — Change serialization format. (user: js, size: 35207) [annotate] [blame] [check-ins using]
To Artifact [47a649e523]:
- File
src/OFString.m
— part of check-in
[494dca4ae4]
at
2011-05-14 12:26:39
on branch trunk
— Use XML for serialization.
This way, we don't need a new parser and don't use a new format. (user: js, size: 34751) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFFile.h" #import "OFURL.h" #import "OFHTTPRequest.h" #import "OFAutoreleasePool.h" #import "OFHTTPRequestFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" | > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFFile.h" #import "OFURL.h" #import "OFHTTPRequest.h" #import "OFXMLElement.h" #import "OFAutoreleasePool.h" #import "OFHTTPRequestFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" |
︙ | ︙ | |||
1051 1052 1053 1054 1055 1056 1057 | } - (OFString*)description { return [[self copy] autorelease]; } | | | | | | | < < < | | < > | > | | | > | < < < < < | | 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 | } - (OFString*)description { return [[self copy] autorelease]; } - (OFXMLElement*)XMLElementBySerializing { OFAutoreleasePool *pool; OFXMLElement *element; element = [OFXMLElement elementWithName: @"object" namespace: OF_SERIALIZATION_NS stringValue: self]; pool = [[OFAutoreleasePool alloc] init]; if ([self isKindOfClass: [OFConstantString class]]) [element addAttributeWithName: @"class" stringValue: @"OFString"]; else [element addAttributeWithName: @"class" stringValue: [self className]]; [pool release]; return element; } - (of_unichar_t)characterAtIndex: (size_t)index { of_unichar_t c; if (![self isUTF8]) { |
︙ | ︙ |