ObjFW  Check-in [29988c434b]

Overview
Comment:Nicer API for serialization.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 29988c434bf2ff9f066c68c6511fad56455ae49cff7b57581d2d5111bab410bb
User & Date: js on 2011-06-05 22:26:10
Other Links: manifest | tags
Context
2011-06-05
23:59
Add -[XMLStringWithIndentation:] to OFXMLElement. check-in: 14991e7035 user: js tags: trunk
22:26
Nicer API for serialization. check-in: 29988c434b user: js tags: trunk
21:26
Serialize floats and doubles in a format that does not lose precision. check-in: ac2714dd86 user: js tags: trunk
Changes

Modified ObjFW.xcodeproj/project.pbxproj from [5922555861] to [82dc1021e7].

230
231
232
233
234
235
236

237




238
239
240
241
242
243
244
		4B90B7A2133AD87D00BD33CB /* OFBindFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B798133AD87D00BD33CB /* OFBindFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B90B7A3133AD87D00BD33CB /* OFBindFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B799133AD87D00BD33CB /* OFBindFailedException.m */; };
		4B90B7A4133AD87D00BD33CB /* OFConnectionFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B79A133AD87D00BD33CB /* OFConnectionFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B90B7A5133AD87D00BD33CB /* OFConnectionFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B79B133AD87D00BD33CB /* OFConnectionFailedException.m */; };
		4B90B7A6133AD87D00BD33CB /* OFListenFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B79C133AD87D00BD33CB /* OFListenFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B90B7A7133AD87D00BD33CB /* OFListenFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B79D133AD87D00BD33CB /* OFListenFailedException.m */; };
		4B989C2F13771A3700109A30 /* OFSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B989C2E13771A3700109A30 /* OFSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; };

		4BC5E7D6137F0D0E0076F962 /* OFSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC5E7D5137F0D0E0076F962 /* OFSerialization.m */; };




		4BD98C03133814220048DD5B /* objfw-defs.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD98C011338140B0048DD5B /* objfw-defs.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BDF37B51338055600F9A81A /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDF37B41338055600F9A81A /* config.h */; };
		4BF33AFB133807590059CEF7 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B3D23761337FBC800DD29B8 /* ObjFW.framework */; };
		4BF33AFC133807A20059CEF7 /* OFArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF66E1235358D0076B512 /* OFArrayTests.m */; };
		4BF33AFD133807A20059CEF7 /* OFBlockTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0E412DF4259005C7A0C /* OFBlockTests.m */; };
		4BF33AFE133807A20059CEF7 /* OFDataArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF66F1235358D0076B512 /* OFDataArrayTests.m */; };
		4BF33AFF133807A20059CEF7 /* OFDateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0E512DF4259005C7A0C /* OFDateTests.m */; };







>
|
>
>
>
>







230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
		4B90B7A2133AD87D00BD33CB /* OFBindFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B798133AD87D00BD33CB /* OFBindFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B90B7A3133AD87D00BD33CB /* OFBindFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B799133AD87D00BD33CB /* OFBindFailedException.m */; };
		4B90B7A4133AD87D00BD33CB /* OFConnectionFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B79A133AD87D00BD33CB /* OFConnectionFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B90B7A5133AD87D00BD33CB /* OFConnectionFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B79B133AD87D00BD33CB /* OFConnectionFailedException.m */; };
		4B90B7A6133AD87D00BD33CB /* OFListenFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B79C133AD87D00BD33CB /* OFListenFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B90B7A7133AD87D00BD33CB /* OFListenFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B79D133AD87D00BD33CB /* OFListenFailedException.m */; };
		4B989C2F13771A3700109A30 /* OFSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B989C2E13771A3700109A30 /* OFSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BB25E88139C388A00F574EA /* OFObject+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E82139C388A00F574EA /* OFObject+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BB25E89139C388A00F574EA /* OFObject+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E83139C388A00F574EA /* OFObject+Serialization.m */; };
		4BB25E8A139C388A00F574EA /* OFString+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E84139C388A00F574EA /* OFString+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BB25E8B139C388A00F574EA /* OFString+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E85139C388A00F574EA /* OFString+Serialization.m */; };
		4BB25E8C139C388A00F574EA /* OFXMLElement+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E86139C388A00F574EA /* OFXMLElement+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BB25E8D139C388A00F574EA /* OFXMLElement+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E87139C388A00F574EA /* OFXMLElement+Serialization.m */; };
		4BD98C03133814220048DD5B /* objfw-defs.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD98C011338140B0048DD5B /* objfw-defs.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BDF37B51338055600F9A81A /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDF37B41338055600F9A81A /* config.h */; };
		4BF33AFB133807590059CEF7 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B3D23761337FBC800DD29B8 /* ObjFW.framework */; };
		4BF33AFC133807A20059CEF7 /* OFArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF66E1235358D0076B512 /* OFArrayTests.m */; };
		4BF33AFD133807A20059CEF7 /* OFBlockTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0E412DF4259005C7A0C /* OFBlockTests.m */; };
		4BF33AFE133807A20059CEF7 /* OFDataArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF66F1235358D0076B512 /* OFDataArrayTests.m */; };
		4BF33AFF133807A20059CEF7 /* OFDateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0E512DF4259005C7A0C /* OFDateTests.m */; };
523
524
525
526
527
528
529






530
531
532
533
534
535
536
537
538
539
540
541
		4B99250F12E0780000215DBE /* OFHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFHTTPRequest.h; path = src/OFHTTPRequest.h; sourceTree = "<group>"; };
		4B99251012E0780000215DBE /* OFHTTPRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFHTTPRequest.m; path = src/OFHTTPRequest.m; sourceTree = "<group>"; };
		4BAF5F46123460C900F4E111 /* OFCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCollection.h; path = src/OFCollection.h; sourceTree = "<group>"; };
		4BAF5F47123460C900F4E111 /* OFStreamObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamObserver.h; path = src/OFStreamObserver.h; sourceTree = "<group>"; };
		4BAF5F48123460C900F4E111 /* OFStreamObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamObserver.m; path = src/OFStreamObserver.m; sourceTree = "<group>"; };
		4BAF5F49123460C900F4E111 /* OFStreamSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamSocket.h; path = src/OFStreamSocket.h; sourceTree = "<group>"; };
		4BAF5F4A123460C900F4E111 /* OFStreamSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamSocket.m; path = src/OFStreamSocket.m; sourceTree = "<group>"; };






		4BB50DCF12F863C700C9393F /* of_asprintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = of_asprintf.h; path = src/of_asprintf.h; sourceTree = SOURCE_ROOT; };
		4BB50DD012F863C700C9393F /* of_asprintf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = of_asprintf.m; path = src/of_asprintf.m; sourceTree = SOURCE_ROOT; };
		4BBA36C411406AB700CBA3AC /* atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic.h; path = src/atomic.h; sourceTree = "<group>"; };
		4BBA36C511406AB700CBA3AC /* macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macros.h; path = src/macros.h; sourceTree = "<group>"; };
		4BC5E7D5137F0D0E0076F962 /* OFSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFSerialization.m; path = src/OFSerialization.m; sourceTree = "<group>"; };
		4BD86D801237A6C600ED9912 /* OFBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFBlock.h; path = src/OFBlock.h; sourceTree = SOURCE_ROOT; };
		4BD86D811237A6C600ED9912 /* OFBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFBlock.m; path = src/OFBlock.m; sourceTree = SOURCE_ROOT; };
		4BD98C011338140B0048DD5B /* objfw-defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "objfw-defs.h"; path = "src/objfw-defs.h"; sourceTree = SOURCE_ROOT; };
		4BDF37B41338055600F9A81A /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = SOURCE_ROOT; };
		4BE17AD812FD744C002CEB0B /* foundation-compat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "foundation-compat.m"; path = "src/foundation-compat.m"; sourceTree = SOURCE_ROOT; };
		4BE17AD912FD746D002CEB0B /* OFDataArray+Hashing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFDataArray+Hashing.h"; path = "src/OFDataArray+Hashing.h"; sourceTree = SOURCE_ROOT; };
		4BE17ADA12FD746D002CEB0B /* OFDataArray+Hashing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFDataArray+Hashing.m"; path = "src/OFDataArray+Hashing.m"; sourceTree = SOURCE_ROOT; };







>
>
>
>
>
>




<







528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544

545
546
547
548
549
550
551
		4B99250F12E0780000215DBE /* OFHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFHTTPRequest.h; path = src/OFHTTPRequest.h; sourceTree = "<group>"; };
		4B99251012E0780000215DBE /* OFHTTPRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFHTTPRequest.m; path = src/OFHTTPRequest.m; sourceTree = "<group>"; };
		4BAF5F46123460C900F4E111 /* OFCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCollection.h; path = src/OFCollection.h; sourceTree = "<group>"; };
		4BAF5F47123460C900F4E111 /* OFStreamObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamObserver.h; path = src/OFStreamObserver.h; sourceTree = "<group>"; };
		4BAF5F48123460C900F4E111 /* OFStreamObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamObserver.m; path = src/OFStreamObserver.m; sourceTree = "<group>"; };
		4BAF5F49123460C900F4E111 /* OFStreamSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamSocket.h; path = src/OFStreamSocket.h; sourceTree = "<group>"; };
		4BAF5F4A123460C900F4E111 /* OFStreamSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamSocket.m; path = src/OFStreamSocket.m; sourceTree = "<group>"; };
		4BB25E82139C388A00F574EA /* OFObject+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFObject+Serialization.h"; path = "src/OFObject+Serialization.h"; sourceTree = "<group>"; };
		4BB25E83139C388A00F574EA /* OFObject+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFObject+Serialization.m"; path = "src/OFObject+Serialization.m"; sourceTree = "<group>"; };
		4BB25E84139C388A00F574EA /* OFString+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFString+Serialization.h"; path = "src/OFString+Serialization.h"; sourceTree = "<group>"; };
		4BB25E85139C388A00F574EA /* OFString+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFString+Serialization.m"; path = "src/OFString+Serialization.m"; sourceTree = "<group>"; };
		4BB25E86139C388A00F574EA /* OFXMLElement+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFXMLElement+Serialization.h"; path = "src/OFXMLElement+Serialization.h"; sourceTree = "<group>"; };
		4BB25E87139C388A00F574EA /* OFXMLElement+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFXMLElement+Serialization.m"; path = "src/OFXMLElement+Serialization.m"; sourceTree = "<group>"; };
		4BB50DCF12F863C700C9393F /* of_asprintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = of_asprintf.h; path = src/of_asprintf.h; sourceTree = SOURCE_ROOT; };
		4BB50DD012F863C700C9393F /* of_asprintf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = of_asprintf.m; path = src/of_asprintf.m; sourceTree = SOURCE_ROOT; };
		4BBA36C411406AB700CBA3AC /* atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic.h; path = src/atomic.h; sourceTree = "<group>"; };
		4BBA36C511406AB700CBA3AC /* macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macros.h; path = src/macros.h; sourceTree = "<group>"; };

		4BD86D801237A6C600ED9912 /* OFBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFBlock.h; path = src/OFBlock.h; sourceTree = SOURCE_ROOT; };
		4BD86D811237A6C600ED9912 /* OFBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFBlock.m; path = src/OFBlock.m; sourceTree = SOURCE_ROOT; };
		4BD98C011338140B0048DD5B /* objfw-defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "objfw-defs.h"; path = "src/objfw-defs.h"; sourceTree = SOURCE_ROOT; };
		4BDF37B41338055600F9A81A /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = SOURCE_ROOT; };
		4BE17AD812FD744C002CEB0B /* foundation-compat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "foundation-compat.m"; path = "src/foundation-compat.m"; sourceTree = SOURCE_ROOT; };
		4BE17AD912FD746D002CEB0B /* OFDataArray+Hashing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFDataArray+Hashing.h"; path = "src/OFDataArray+Hashing.h"; sourceTree = SOURCE_ROOT; };
		4BE17ADA12FD746D002CEB0B /* OFDataArray+Hashing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFDataArray+Hashing.m"; path = "src/OFDataArray+Hashing.m"; sourceTree = SOURCE_ROOT; };
792
793
794
795
796
797
798


799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816


817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832


833
834
835
836
837
838
839
				4B6799741099E7C50041064A /* OFMutableString.m */,
				4B511B7A139C0A34003764A5 /* OFNull.h */,
				4B511B7B139C0A34003764A5 /* OFNull.m */,
				4B6799751099E7C50041064A /* OFNumber.h */,
				4B6799761099E7C50041064A /* OFNumber.m */,
				4B6799771099E7C50041064A /* OFObject.h */,
				4B6799781099E7C50041064A /* OFObject.m */,


				4B6799791099E7C50041064A /* OFPlugin.h */,
				4B67997A1099E7C50041064A /* OFPlugin.m */,
				4B981CDE116F71DD00294DB7 /* OFSeekableStream.h */,
				4B981CDF116F71DD00294DB7 /* OFSeekableStream.m */,
				4B989C2E13771A3700109A30 /* OFSerialization.h */,
				4BC5E7D5137F0D0E0076F962 /* OFSerialization.m */,
				4BF1BCC411C9663F0025511F /* OFSHA1Hash.h */,
				4BF1BCC511C9663F0025511F /* OFSHA1Hash.m */,
				4B67997D1099E7C50041064A /* OFStream.h */,
				4B67997E1099E7C50041064A /* OFStream.m */,
				4BAF5F47123460C900F4E111 /* OFStreamObserver.h */,
				4BAF5F48123460C900F4E111 /* OFStreamObserver.m */,
				4BAF5F49123460C900F4E111 /* OFStreamSocket.h */,
				4BAF5F4A123460C900F4E111 /* OFStreamSocket.m */,
				4B67997F1099E7C50041064A /* OFString.h */,
				4B6799801099E7C50041064A /* OFString.m */,
				4BF1BCC611C9663F0025511F /* OFString+Hashing.h */,
				4BF1BCC711C9663F0025511F /* OFString+Hashing.m */,


				4BF1BCC811C9663F0025511F /* OFString+URLEncoding.h */,
				4BF1BCC911C9663F0025511F /* OFString+URLEncoding.m */,
				4BF1BCCA11C9663F0025511F /* OFString+XMLEscaping.h */,
				4BF1BCCB11C9663F0025511F /* OFString+XMLEscaping.m */,
				4BF1BCCC11C9663F0025511F /* OFString+XMLUnescaping.h */,
				4BF1BCCD11C9663F0025511F /* OFString+XMLUnescaping.m */,
				4B6799811099E7C50041064A /* OFTCPSocket.h */,
				4B6799821099E7C50041064A /* OFTCPSocket.m */,
				4B6799831099E7C50041064A /* OFThread.h */,
				4B6799841099E7C50041064A /* OFThread.m */,
				4B4A61F212DF5EA20048F3F2 /* OFURL.h */,
				4B4A61F312DF5EA20048F3F2 /* OFURL.m */,
				4BF1BCCE11C9663F0025511F /* OFXMLAttribute.h */,
				4BF1BCCF11C9663F0025511F /* OFXMLAttribute.m */,
				4B6799871099E7C50041064A /* OFXMLElement.h */,
				4B6799881099E7C50041064A /* OFXMLElement.m */,


				4B0D249411DFAA3D00ED6FFC /* OFXMLElementBuilder.h */,
				4B0D249511DFAA3D00ED6FFC /* OFXMLElementBuilder.m */,
				4B6799891099E7C50041064A /* OFXMLParser.h */,
				4B67998A1099E7C50041064A /* OFXMLParser.m */,
				4B6AF97310A8D4450003FB0A /* ObjFW.h */,
				4B6799561099E7C50041064A /* asprintf.h */,
				4B6AF96C10A8D3E40003FB0A /* asprintf.m */,







>
>





<












>
>
















>
>







802
803
804
805
806
807
808
809
810
811
812
813
814
815

816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
				4B6799741099E7C50041064A /* OFMutableString.m */,
				4B511B7A139C0A34003764A5 /* OFNull.h */,
				4B511B7B139C0A34003764A5 /* OFNull.m */,
				4B6799751099E7C50041064A /* OFNumber.h */,
				4B6799761099E7C50041064A /* OFNumber.m */,
				4B6799771099E7C50041064A /* OFObject.h */,
				4B6799781099E7C50041064A /* OFObject.m */,
				4BB25E82139C388A00F574EA /* OFObject+Serialization.h */,
				4BB25E83139C388A00F574EA /* OFObject+Serialization.m */,
				4B6799791099E7C50041064A /* OFPlugin.h */,
				4B67997A1099E7C50041064A /* OFPlugin.m */,
				4B981CDE116F71DD00294DB7 /* OFSeekableStream.h */,
				4B981CDF116F71DD00294DB7 /* OFSeekableStream.m */,
				4B989C2E13771A3700109A30 /* OFSerialization.h */,

				4BF1BCC411C9663F0025511F /* OFSHA1Hash.h */,
				4BF1BCC511C9663F0025511F /* OFSHA1Hash.m */,
				4B67997D1099E7C50041064A /* OFStream.h */,
				4B67997E1099E7C50041064A /* OFStream.m */,
				4BAF5F47123460C900F4E111 /* OFStreamObserver.h */,
				4BAF5F48123460C900F4E111 /* OFStreamObserver.m */,
				4BAF5F49123460C900F4E111 /* OFStreamSocket.h */,
				4BAF5F4A123460C900F4E111 /* OFStreamSocket.m */,
				4B67997F1099E7C50041064A /* OFString.h */,
				4B6799801099E7C50041064A /* OFString.m */,
				4BF1BCC611C9663F0025511F /* OFString+Hashing.h */,
				4BF1BCC711C9663F0025511F /* OFString+Hashing.m */,
				4BB25E84139C388A00F574EA /* OFString+Serialization.h */,
				4BB25E85139C388A00F574EA /* OFString+Serialization.m */,
				4BF1BCC811C9663F0025511F /* OFString+URLEncoding.h */,
				4BF1BCC911C9663F0025511F /* OFString+URLEncoding.m */,
				4BF1BCCA11C9663F0025511F /* OFString+XMLEscaping.h */,
				4BF1BCCB11C9663F0025511F /* OFString+XMLEscaping.m */,
				4BF1BCCC11C9663F0025511F /* OFString+XMLUnescaping.h */,
				4BF1BCCD11C9663F0025511F /* OFString+XMLUnescaping.m */,
				4B6799811099E7C50041064A /* OFTCPSocket.h */,
				4B6799821099E7C50041064A /* OFTCPSocket.m */,
				4B6799831099E7C50041064A /* OFThread.h */,
				4B6799841099E7C50041064A /* OFThread.m */,
				4B4A61F212DF5EA20048F3F2 /* OFURL.h */,
				4B4A61F312DF5EA20048F3F2 /* OFURL.m */,
				4BF1BCCE11C9663F0025511F /* OFXMLAttribute.h */,
				4BF1BCCF11C9663F0025511F /* OFXMLAttribute.m */,
				4B6799871099E7C50041064A /* OFXMLElement.h */,
				4B6799881099E7C50041064A /* OFXMLElement.m */,
				4BB25E86139C388A00F574EA /* OFXMLElement+Serialization.h */,
				4BB25E87139C388A00F574EA /* OFXMLElement+Serialization.m */,
				4B0D249411DFAA3D00ED6FFC /* OFXMLElementBuilder.h */,
				4B0D249511DFAA3D00ED6FFC /* OFXMLElementBuilder.m */,
				4B6799891099E7C50041064A /* OFXMLParser.h */,
				4B67998A1099E7C50041064A /* OFXMLParser.m */,
				4B6AF97310A8D4450003FB0A /* ObjFW.h */,
				4B6799561099E7C50041064A /* asprintf.h */,
				4B6AF96C10A8D3E40003FB0A /* asprintf.m */,
957
958
959
960
961
962
963

964
965
966
967
968
969
970
971
972

973
974
975
976
977
978
979
980

981
982
983
984
985
986
987
				4B3D23CC1337FCB000DD29B8 /* OFMD5Hash.h in Headers */,
				4B3D23CD1337FCB000DD29B8 /* OFMutableArray.h in Headers */,
				4B3D23CE1337FCB000DD29B8 /* OFMutableDictionary.h in Headers */,
				4B3D23CF1337FCB000DD29B8 /* OFMutableString.h in Headers */,
				4B511B7C139C0A34003764A5 /* OFNull.h in Headers */,
				4B3D23D01337FCB000DD29B8 /* OFNumber.h in Headers */,
				4B3D23D11337FCB000DD29B8 /* OFObject.h in Headers */,

				4B3D23D21337FCB000DD29B8 /* OFPlugin.h in Headers */,
				4B3D23D31337FCB000DD29B8 /* OFSeekableStream.h in Headers */,
				4B989C2F13771A3700109A30 /* OFSerialization.h in Headers */,
				4B3D23D41337FCB000DD29B8 /* OFSHA1Hash.h in Headers */,
				4B3D23D51337FCB000DD29B8 /* OFStream.h in Headers */,
				4B3D23D61337FCB000DD29B8 /* OFStreamObserver.h in Headers */,
				4B3D23D71337FCB000DD29B8 /* OFStreamSocket.h in Headers */,
				4B3D23D81337FCB000DD29B8 /* OFString.h in Headers */,
				4B3D23D91337FCB000DD29B8 /* OFString+Hashing.h in Headers */,

				4B3D23DA1337FCB000DD29B8 /* OFString+URLEncoding.h in Headers */,
				4B3D23DB1337FCB000DD29B8 /* OFString+XMLEscaping.h in Headers */,
				4B3D23DC1337FCB000DD29B8 /* OFString+XMLUnescaping.h in Headers */,
				4B3D23DD1337FCB000DD29B8 /* OFTCPSocket.h in Headers */,
				4B3D23DE1337FCB000DD29B8 /* OFThread.h in Headers */,
				4B3D23DF1337FCB000DD29B8 /* OFURL.h in Headers */,
				4B3D23E01337FCB000DD29B8 /* OFXMLAttribute.h in Headers */,
				4B3D23E11337FCB000DD29B8 /* OFXMLElement.h in Headers */,

				4B3D23E21337FCB000DD29B8 /* OFXMLElementBuilder.h in Headers */,
				4B3D23E31337FCB000DD29B8 /* OFXMLParser.h in Headers */,
				4B3D23E41337FCB000DD29B8 /* ObjFW.h in Headers */,
				4B3D23E51337FCB000DD29B8 /* asprintf.h in Headers */,
				4B3D23E61337FCB000DD29B8 /* atomic.h in Headers */,
				4B3D23E71337FCB000DD29B8 /* base64.h in Headers */,
				4B3D23E81337FCB000DD29B8 /* macros.h in Headers */,







>









>








>







972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
				4B3D23CC1337FCB000DD29B8 /* OFMD5Hash.h in Headers */,
				4B3D23CD1337FCB000DD29B8 /* OFMutableArray.h in Headers */,
				4B3D23CE1337FCB000DD29B8 /* OFMutableDictionary.h in Headers */,
				4B3D23CF1337FCB000DD29B8 /* OFMutableString.h in Headers */,
				4B511B7C139C0A34003764A5 /* OFNull.h in Headers */,
				4B3D23D01337FCB000DD29B8 /* OFNumber.h in Headers */,
				4B3D23D11337FCB000DD29B8 /* OFObject.h in Headers */,
				4BB25E88139C388A00F574EA /* OFObject+Serialization.h in Headers */,
				4B3D23D21337FCB000DD29B8 /* OFPlugin.h in Headers */,
				4B3D23D31337FCB000DD29B8 /* OFSeekableStream.h in Headers */,
				4B989C2F13771A3700109A30 /* OFSerialization.h in Headers */,
				4B3D23D41337FCB000DD29B8 /* OFSHA1Hash.h in Headers */,
				4B3D23D51337FCB000DD29B8 /* OFStream.h in Headers */,
				4B3D23D61337FCB000DD29B8 /* OFStreamObserver.h in Headers */,
				4B3D23D71337FCB000DD29B8 /* OFStreamSocket.h in Headers */,
				4B3D23D81337FCB000DD29B8 /* OFString.h in Headers */,
				4B3D23D91337FCB000DD29B8 /* OFString+Hashing.h in Headers */,
				4BB25E8A139C388A00F574EA /* OFString+Serialization.h in Headers */,
				4B3D23DA1337FCB000DD29B8 /* OFString+URLEncoding.h in Headers */,
				4B3D23DB1337FCB000DD29B8 /* OFString+XMLEscaping.h in Headers */,
				4B3D23DC1337FCB000DD29B8 /* OFString+XMLUnescaping.h in Headers */,
				4B3D23DD1337FCB000DD29B8 /* OFTCPSocket.h in Headers */,
				4B3D23DE1337FCB000DD29B8 /* OFThread.h in Headers */,
				4B3D23DF1337FCB000DD29B8 /* OFURL.h in Headers */,
				4B3D23E01337FCB000DD29B8 /* OFXMLAttribute.h in Headers */,
				4B3D23E11337FCB000DD29B8 /* OFXMLElement.h in Headers */,
				4BB25E8C139C388A00F574EA /* OFXMLElement+Serialization.h in Headers */,
				4B3D23E21337FCB000DD29B8 /* OFXMLElementBuilder.h in Headers */,
				4B3D23E31337FCB000DD29B8 /* OFXMLParser.h in Headers */,
				4B3D23E41337FCB000DD29B8 /* ObjFW.h in Headers */,
				4B3D23E51337FCB000DD29B8 /* asprintf.h in Headers */,
				4B3D23E61337FCB000DD29B8 /* atomic.h in Headers */,
				4B3D23E71337FCB000DD29B8 /* base64.h in Headers */,
				4B3D23E81337FCB000DD29B8 /* macros.h in Headers */,
1202
1203
1204
1205
1206
1207
1208

1209
1210

1211
1212
1213
1214
1215
1216
1217
1218

1219
1220
1221
1222
1223
1224
1225
1226

1227
1228
1229
1230
1231
1232
1233
				4B3D23971337FC0D00DD29B8 /* OFHash.m in Sources */,
				4B3D23981337FC0D00DD29B8 /* OFHTTPRequest.m in Sources */,
				4B3D23991337FC0D00DD29B8 /* OFList.m in Sources */,
				4B3D239A1337FC0D00DD29B8 /* OFMD5Hash.m in Sources */,
				4B3D239B1337FC0D00DD29B8 /* OFMutableArray.m in Sources */,
				4B3D239C1337FC0D00DD29B8 /* OFMutableDictionary.m in Sources */,
				4B3D239D1337FC0D00DD29B8 /* OFMutableString.m in Sources */,

				4B3D239E1337FC0D00DD29B8 /* OFNumber.m in Sources */,
				4B3D239F1337FC0D00DD29B8 /* OFObject.m in Sources */,

				4B3D23A01337FC0D00DD29B8 /* OFPlugin.m in Sources */,
				4B3D23A11337FC0D00DD29B8 /* OFSeekableStream.m in Sources */,
				4B3D23A21337FC0D00DD29B8 /* OFSHA1Hash.m in Sources */,
				4B3D23A31337FC0D00DD29B8 /* OFStream.m in Sources */,
				4B3D23A41337FC0D00DD29B8 /* OFStreamObserver.m in Sources */,
				4B3D23A51337FC0D00DD29B8 /* OFStreamSocket.m in Sources */,
				4B3D23A61337FC0D00DD29B8 /* OFString.m in Sources */,
				4B3D23A71337FC0D00DD29B8 /* OFString+Hashing.m in Sources */,

				4B3D23A81337FC0D00DD29B8 /* OFString+URLEncoding.m in Sources */,
				4B3D23A91337FC0D00DD29B8 /* OFString+XMLEscaping.m in Sources */,
				4B3D23AA1337FC0D00DD29B8 /* OFString+XMLUnescaping.m in Sources */,
				4B3D23AB1337FC0D00DD29B8 /* OFTCPSocket.m in Sources */,
				4B3D23AC1337FC0D00DD29B8 /* OFThread.m in Sources */,
				4B3D23AD1337FC0D00DD29B8 /* OFURL.m in Sources */,
				4B3D23AE1337FC0D00DD29B8 /* OFXMLAttribute.m in Sources */,
				4B3D23AF1337FC0D00DD29B8 /* OFXMLElement.m in Sources */,

				4B3D23B01337FC0D00DD29B8 /* OFXMLElementBuilder.m in Sources */,
				4B3D23B11337FC0D00DD29B8 /* OFXMLParser.m in Sources */,
				4B3D23B31337FC0D00DD29B8 /* base64.m in Sources */,
				4B3D23B41337FC0D00DD29B8 /* iso_8859_15.m in Sources */,
				4B3D23B51337FC0D00DD29B8 /* foundation-compat.m in Sources */,
				4B3D23EE1337FFD000DD29B8 /* of_asprintf.m in Sources */,
				4B3D23B91337FC0D00DD29B8 /* unicode.m in Sources */,







>


>








>








>







1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
				4B3D23971337FC0D00DD29B8 /* OFHash.m in Sources */,
				4B3D23981337FC0D00DD29B8 /* OFHTTPRequest.m in Sources */,
				4B3D23991337FC0D00DD29B8 /* OFList.m in Sources */,
				4B3D239A1337FC0D00DD29B8 /* OFMD5Hash.m in Sources */,
				4B3D239B1337FC0D00DD29B8 /* OFMutableArray.m in Sources */,
				4B3D239C1337FC0D00DD29B8 /* OFMutableDictionary.m in Sources */,
				4B3D239D1337FC0D00DD29B8 /* OFMutableString.m in Sources */,
				4B511B7D139C0A34003764A5 /* OFNull.m in Sources */,
				4B3D239E1337FC0D00DD29B8 /* OFNumber.m in Sources */,
				4B3D239F1337FC0D00DD29B8 /* OFObject.m in Sources */,
				4BB25E89139C388A00F574EA /* OFObject+Serialization.m in Sources */,
				4B3D23A01337FC0D00DD29B8 /* OFPlugin.m in Sources */,
				4B3D23A11337FC0D00DD29B8 /* OFSeekableStream.m in Sources */,
				4B3D23A21337FC0D00DD29B8 /* OFSHA1Hash.m in Sources */,
				4B3D23A31337FC0D00DD29B8 /* OFStream.m in Sources */,
				4B3D23A41337FC0D00DD29B8 /* OFStreamObserver.m in Sources */,
				4B3D23A51337FC0D00DD29B8 /* OFStreamSocket.m in Sources */,
				4B3D23A61337FC0D00DD29B8 /* OFString.m in Sources */,
				4B3D23A71337FC0D00DD29B8 /* OFString+Hashing.m in Sources */,
				4BB25E8B139C388A00F574EA /* OFString+Serialization.m in Sources */,
				4B3D23A81337FC0D00DD29B8 /* OFString+URLEncoding.m in Sources */,
				4B3D23A91337FC0D00DD29B8 /* OFString+XMLEscaping.m in Sources */,
				4B3D23AA1337FC0D00DD29B8 /* OFString+XMLUnescaping.m in Sources */,
				4B3D23AB1337FC0D00DD29B8 /* OFTCPSocket.m in Sources */,
				4B3D23AC1337FC0D00DD29B8 /* OFThread.m in Sources */,
				4B3D23AD1337FC0D00DD29B8 /* OFURL.m in Sources */,
				4B3D23AE1337FC0D00DD29B8 /* OFXMLAttribute.m in Sources */,
				4B3D23AF1337FC0D00DD29B8 /* OFXMLElement.m in Sources */,
				4BB25E8D139C388A00F574EA /* OFXMLElement+Serialization.m in Sources */,
				4B3D23B01337FC0D00DD29B8 /* OFXMLElementBuilder.m in Sources */,
				4B3D23B11337FC0D00DD29B8 /* OFXMLParser.m in Sources */,
				4B3D23B31337FC0D00DD29B8 /* base64.m in Sources */,
				4B3D23B41337FC0D00DD29B8 /* iso_8859_15.m in Sources */,
				4B3D23B51337FC0D00DD29B8 /* foundation-compat.m in Sources */,
				4B3D23EE1337FFD000DD29B8 /* of_asprintf.m in Sources */,
				4B3D23B91337FC0D00DD29B8 /* unicode.m in Sources */,
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
				4B55A100133ABEA900B58A93 /* OFThreadJoinFailedException.m in Sources */,
				4B55A102133ABEA900B58A93 /* OFThreadStartFailedException.m in Sources */,
				4B55A104133ABEA900B58A93 /* OFThreadStillRunningException.m in Sources */,
				4B17FFAA133A34E7003E6DCD /* OFTruncatedDataException.m in Sources */,
				4B17FFB6133A375B003E6DCD /* OFUnboundNamespaceException.m in Sources */,
				4B17FFB2133A3664003E6DCD /* OFUnsupportedProtocolException.m in Sources */,
				4B55A117133AC24600B58A93 /* OFWriteFailedException.m in Sources */,
				4BC5E7D6137F0D0E0076F962 /* OFSerialization.m in Sources */,
				4B511B7D139C0A34003764A5 /* OFNull.m in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4BF33AEC133807310059CEF7 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (







<
<







1301
1302
1303
1304
1305
1306
1307


1308
1309
1310
1311
1312
1313
1314
				4B55A100133ABEA900B58A93 /* OFThreadJoinFailedException.m in Sources */,
				4B55A102133ABEA900B58A93 /* OFThreadStartFailedException.m in Sources */,
				4B55A104133ABEA900B58A93 /* OFThreadStillRunningException.m in Sources */,
				4B17FFAA133A34E7003E6DCD /* OFTruncatedDataException.m in Sources */,
				4B17FFB6133A375B003E6DCD /* OFUnboundNamespaceException.m in Sources */,
				4B17FFB2133A3664003E6DCD /* OFUnsupportedProtocolException.m in Sources */,
				4B55A117133AC24600B58A93 /* OFWriteFailedException.m in Sources */,


			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4BF33AEC133807310059CEF7 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (

Modified src/Makefile from [62f4d67d74] to [cb23e9a2ea].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

31
32
33
34
35
36
37
38
39

40
41
42
43
44
45
46
47

48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
include ../extra.mk

SUBDIRS = exceptions

LIB = ${OBJFW_SHARED_LIB}
LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}
STATIC_LIB = ${OBJFW_STATIC_LIB}

SRCS = OFApplication.m		\
       OFArray.m		\
       OFAutoreleasePool.m	\
       OFBlock.m		\
       OFConstantString.m	\
       OFDataArray.m		\
       OFDataArray+Hashing.m	\
       OFDate.m			\
       OFDictionary.m		\
       OFFile.m			\
       OFHash.m			\
       OFHTTPRequest.m		\
       OFEnumerator.m		\
       OFList.m			\
       OFMD5Hash.m		\
       OFMutableArray.m		\
       OFMutableDictionary.m	\
       OFMutableString.m	\
       OFNull.m			\
       OFNumber.m		\
       OFObject.m		\

       ${OFPLUGIN_M}		\
       OFSeekableStream.m	\
       OFSerialization.m	\
       OFSHA1Hash.m		\
       OFStream.m		\
       OFStreamObserver.m	\
       OFStreamSocket.m		\
       OFString.m		\
       OFString+Hashing.m	\

       OFString+URLEncoding.m	\
       OFString+XMLEscaping.m	\
       OFString+XMLUnescaping.m	\
       OFTCPSocket.m		\
       ${OFTHREAD_M}		\
       OFURL.m			\
       OFXMLAttribute.m		\
       OFXMLElement.m		\

       OFXMLElementBuilder.m	\
       OFXMLParser.m		\
       base64.m			\
       of_asprintf.m		\
       unicode.m

INCLUDES := ${SRCS:.m=.h}	\
	    OFCollection.h	\

	    ObjFW.h		\
	    asprintf.h		\
	    ${ATOMIC_H}		\
	    macros.h		\
	    objfw-defs.h	\
	    ${THREADING_H}










|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
<
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
>
|
|
|
|




>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
include ../extra.mk

SUBDIRS = exceptions

LIB = ${OBJFW_SHARED_LIB}
LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}
STATIC_LIB = ${OBJFW_STATIC_LIB}

SRCS = OFApplication.m			\
       OFArray.m			\
       OFAutoreleasePool.m		\
       OFBlock.m			\
       OFConstantString.m		\
       OFDataArray.m			\
       OFDataArray+Hashing.m		\
       OFDate.m				\
       OFDictionary.m			\
       OFFile.m				\
       OFHash.m				\
       OFHTTPRequest.m			\
       OFEnumerator.m			\
       OFList.m				\
       OFMD5Hash.m			\
       OFMutableArray.m			\
       OFMutableDictionary.m		\
       OFMutableString.m		\
       OFNull.m				\
       OFNumber.m			\
       OFObject.m			\
       OFObject+Serialization.m		\
       ${OFPLUGIN_M}			\
       OFSeekableStream.m		\

       OFSHA1Hash.m			\
       OFStream.m			\
       OFStreamObserver.m		\
       OFStreamSocket.m			\
       OFString.m			\
       OFString+Hashing.m		\
       OFString+Serialization.m		\
       OFString+URLEncoding.m		\
       OFString+XMLEscaping.m		\
       OFString+XMLUnescaping.m		\
       OFTCPSocket.m			\
       ${OFTHREAD_M}			\
       OFURL.m				\
       OFXMLAttribute.m			\
       OFXMLElement.m			\
       OFXMLElement+Serialization.m	\
       OFXMLElementBuilder.m		\
       OFXMLParser.m			\
       base64.m				\
       of_asprintf.m			\
       unicode.m

INCLUDES := ${SRCS:.m=.h}	\
	    OFCollection.h	\
	    OFSerialization.h	\
	    ObjFW.h		\
	    asprintf.h		\
	    ${ATOMIC_H}		\
	    macros.h		\
	    objfw-defs.h	\
	    ${THREADING_H}

Modified src/OFArray.m from [c8688826fd] to [d9849bf024].

245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
							       selector: _cmd];

		enumerator = [[element
		    elementsForName: @"object"
			  namespace: OF_SERIALIZATION_NS] objectEnumerator];
		pool2 = [[OFAutoreleasePool alloc] init];
		while ((child = [enumerator nextObject]) != nil) {
			id object = [OFSerialization
			    objectByDeserializingXMLElement: child];

			[array addItem: &object];
			[object retain];

			[pool2 releaseObjects];
		}








<
|







245
246
247
248
249
250
251

252
253
254
255
256
257
258
259
							       selector: _cmd];

		enumerator = [[element
		    elementsForName: @"object"
			  namespace: OF_SERIALIZATION_NS] objectEnumerator];
		pool2 = [[OFAutoreleasePool alloc] init];
		while ((child = [enumerator nextObject]) != nil) {

			id object = [child objectByDeserializing];

			[array addItem: &object];
			[object retain];

			[pool2 releaseObjects];
		}

Modified src/OFDictionary.m from [c7b3cd8862] to [7e880e912a].

511
512
513
514
515
516
517
518
519
520
521
522

523
524

525
526
527
528
529
530
531
				 namespace: OF_SERIALIZATION_NS];

			if (keyElement == nil || valueElement == nil)
				@throw [OFInvalidArgumentException
				    newWithClass: isa
					selector: _cmd];

			key = [OFSerialization objectByDeserializingXMLElement:
			    [keyElement elementForName: @"object"
					     namespace: OF_SERIALIZATION_NS]];
			object = [OFSerialization
			    objectByDeserializingXMLElement:

			    [valueElement elementForName: @"object"
					       namespace: OF_SERIALIZATION_NS]];


			[dictionary setObject: object
				       forKey: key];

			[pool2 releaseObjects];
		}








<
|
|
<
|
>
|
|
>







511
512
513
514
515
516
517

518
519

520
521
522
523
524
525
526
527
528
529
530
531
				 namespace: OF_SERIALIZATION_NS];

			if (keyElement == nil || valueElement == nil)
				@throw [OFInvalidArgumentException
				    newWithClass: isa
					selector: _cmd];


			key = [[keyElement elementForName: @"object"
						namespace: OF_SERIALIZATION_NS]

			    objectByDeserializing];
			object = [[valueElement
			    elementForName: @"object"
				 namespace: OF_SERIALIZATION_NS]
			    objectByDeserializing];

			[dictionary setObject: object
				       forKey: key];

			[pool2 releaseObjects];
		}

Modified src/OFList.m from [6e8e3f47bf] to [7d0862de76].

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
							       selector: _cmd];

		enumerator = [[element
		    elementsForName: @"object"
			  namespace: OF_SERIALIZATION_NS] objectEnumerator];
		pool2 = [[OFAutoreleasePool alloc] init];
		while ((child = [enumerator nextObject]) != nil) {
			id object = [OFSerialization
			    objectByDeserializingXMLElement: child];

			[self appendObject: object];

			[pool2 releaseObjects];
		}

		[pool release];







<
|







53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
							       selector: _cmd];

		enumerator = [[element
		    elementsForName: @"object"
			  namespace: OF_SERIALIZATION_NS] objectEnumerator];
		pool2 = [[OFAutoreleasePool alloc] init];
		while ((child = [enumerator nextObject]) != nil) {

			id object = [child objectByDeserializing];

			[self appendObject: object];

			[pool2 releaseObjects];
		}

		[pool release];

Added src/OFObject+Serialization.h version [cd5c724b06].















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * Copyright (c) 2008, 2009, 2010, 2011
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"

@class OFString;

#ifdef __cplusplus
extern "C" {
#endif
extern int _OFObject_Serialization_reference;
#ifdef __cplusplus
}
#endif

/**
 * \brief A category that provides methods for serializing objects.
 */
@interface OFObject (OFSerialization)
/**
 * \brief Creates a string by serializing the receiver.
 *
 * \return The object serialized as a string
 */
- (OFString*)stringBySerializing;
@end

Added src/OFObject+Serialization.m version [8fb7c383c5].





























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
 * Copyright (c) 2008, 2009, 2010, 2011
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFObject.h"
#import "OFObject+Serialization.h"
#import "OFSerialization.h"
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFAutoreleasePool.h"

#import "OFNotImplementedException.h"

int _OFObject_Serialization_reference;

@implementation OFObject (Serialization)
- (OFString*)stringBySerializing
{
	OFAutoreleasePool *pool;
	OFXMLElement *element;
	OFXMLElement *root;
	OFString *ret;

	if (![self conformsToProtocol: @protocol(OFSerialization)])
		@throw [OFNotImplementedException
		    newWithClass: isa
			selector: @selector(stringBySerializing)];

	pool = [[OFAutoreleasePool alloc] init];
	element = [(id)self XMLElementBySerializing];

	root = [OFXMLElement elementWithName: @"serialization"
				   namespace: OF_SERIALIZATION_NS];
	[root addChild: element];

	ret = [@"<?xml version='1.0' encoding='UTF-8'?>\n"
	    stringByAppendingString: [root XMLString]];
	[ret retain];

	@try {
		[pool release];
	} @catch (id e) {
		[ret release];
	}

	return [ret autorelease];
}
@end

Modified src/OFObject.h from [441f3c4a6d] to [482cb22a3c].

526
527
528
529
530
531
532


533
534
535
536
537
538
539
540
541
542
 * \brief Compares the object with another object.
 *
 * \param object An object to compare the object to
 * \return The result of the comparison
 */
- (of_comparison_result_t)compare: (id)object;
@end



#ifdef __cplusplus
extern "C" {
#endif
extern id objc_getProperty(id, SEL, ptrdiff_t, BOOL);
extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, BOOL);
extern size_t of_pagesize;
#ifdef __cplusplus
}
#endif







>
>










526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
 * \brief Compares the object with another object.
 *
 * \param object An object to compare the object to
 * \return The result of the comparison
 */
- (of_comparison_result_t)compare: (id)object;
@end

#import "OFObject+Serialization.h"

#ifdef __cplusplus
extern "C" {
#endif
extern id objc_getProperty(id, SEL, ptrdiff_t, BOOL);
extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, BOOL);
extern size_t of_pagesize;
#ifdef __cplusplus
}
#endif

Modified src/OFObject.m from [78d403774f] to [4dfae6fcca].

117
118
119
120
121
122
123






124
125
126
127
128
129
130
#endif

const char*
_NSPrintForDebugger(id object)
{
	return [[object description] cString];
}







@implementation OFObject
+ (void)load
{
#ifdef NEED_OBJC_SYNC_INIT
	if (!objc_sync_init()) {
		fputs("Runtime error: objc_sync_init() failed!\n", stderr);







>
>
>
>
>
>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#endif

const char*
_NSPrintForDebugger(id object)
{
	return [[object description] cString];
}

/* References for static linking */
void _references_to_categories_of_OFObject(void)
{
	_OFObject_Serialization_reference = 1;
}

@implementation OFObject
+ (void)load
{
#ifdef NEED_OBJC_SYNC_INIT
	if (!objc_sync_init()) {
		fputs("Runtime error: objc_sync_init() failed!\n", stderr);

Modified src/OFSerialization.h from [9b361d0e27] to [34e6599afb].

12
13
14
15
16
17
18

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"


@class OFString;
@class OFXMLElement;

#define OF_SERIALIZATION_NS @"https://webkeks.org/objfw/serialization"

/**
 * \brief A protocol for serializing objects.
 */
@protocol OFSerialization <OFObject>
/**
 * \brief Initializes the object with the specified XML element serialization.
 *
 * \param element An OFXMLElement with the serialized object
 * \return An initialized object
 */
- initWithSerialization: (OFXMLElement*)element;

/**
 * \brief Serializes the object into an XML element.
 *
 * \return The object serialized into an XML element
 */
- (OFXMLElement*)XMLElementBySerializing;
@end

/**
 * \brief A class that provides class methods for serializing and deserializing
 *	  objects.
 */
@interface OFSerialization: OFObject
/**
 * \brief Creates a string by serializing the specified object.
 *
 * \param object The object to serialize
 * \return The object serialized as a string
 */
+ (OFString*)stringBySerializingObject: (id <OFSerialization>)object;

/**
 * \brief Deserializes the specified string into an object.
 *
 * \param string The string describing the serialized object
 * \return The deserialized object
 */
+ (id)objectByDeserializingString: (OFString*)string;

/**
 * \brief Deserializes the specified XML element into an object.
 *
 * \param string The XML element describing the serialized object
 * \return The deserialized object
 */
+ (id)objectByDeserializingXMLElement: (OFXMLElement*)element;
@end







>
|

<
<




















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
12
13
14
15
16
17
18
19
20
21


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41






























 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"

#define OF_SERIALIZATION_NS @"https://webkeks.org/objfw/serialization"

@class OFXMLElement;



/**
 * \brief A protocol for serializing objects.
 */
@protocol OFSerialization <OFObject>
/**
 * \brief Initializes the object with the specified XML element serialization.
 *
 * \param element An OFXMLElement with the serialized object
 * \return An initialized object
 */
- initWithSerialization: (OFXMLElement*)element;

/**
 * \brief Serializes the object into an XML element.
 *
 * \return The object serialized into an XML element
 */
- (OFXMLElement*)XMLElementBySerializing;
@end






























Deleted src/OFSerialization.m version [9ec952ceec].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*
 * Copyright (c) 2008, 2009, 2010, 2011
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME)
# import <objc/runtime.h>
#elif defined(OF_OLD_GNU_RUNTIME)
# import <objc/objc-api.h>
#endif

#import "OFSerialization.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFXMLElement.h"
#import "OFAutoreleasePool.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"

#if defined(OF_OBJFW_RUNTIME) || defined(OF_OLD_GNU_RUNTIME)
# define objc_lookUpClass objc_lookup_class
#endif

@implementation OFSerialization
+ (OFString*)stringBySerializingObject: (id <OFSerialization>)object
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFXMLElement *element = [object XMLElementBySerializing];
	OFXMLElement *root;
	OFString *ret;

	root = [OFXMLElement elementWithName: @"serialization"
				   namespace: OF_SERIALIZATION_NS];
	[root addChild: element];

	ret = [@"<?xml version='1.0' encoding='UTF-8'?>\n"
	    stringByAppendingString: [root XMLString]];
	[ret retain];

	@try {
		[pool release];
	} @catch (id e) {
		[ret release];
	}

	return [ret autorelease];
}

+ (id)objectByDeserializingString: (OFString*)string
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFXMLElement *root = [OFXMLElement elementWithXMLString: string];
	OFArray *elements;
	id object;

	elements = [root elementsForName: @"object"
			       namespace: OF_SERIALIZATION_NS];

	if ([elements count] != 1)
		@throw [OFInvalidArgumentException newWithClass: self
						       selector: _cmd];

	object = [[self objectByDeserializingXMLElement: [elements firstObject]]
	    retain];

	@try {
		[pool release];
	} @catch (id e) {
		[object release];
		@throw e;
	}

	return [object autorelease];
}

+ (id)objectByDeserializingXMLElement: (OFXMLElement*)element
{
	OFAutoreleasePool *pool;
	OFString *className;
	Class class;
	id object;

	if (element == nil)
		return nil;

	pool = [[OFAutoreleasePool alloc] init];
	className = [[element attributeForName: @"class"] stringValue];
	if (className == nil)
		@throw [OFInvalidArgumentException newWithClass: self
						       selector: _cmd];

	class = objc_lookUpClass([className cString]);
	if (class == Nil)
		@throw [OFNotImplementedException newWithClass: Nil];

	if (![class instancesRespondToSelector:
	    @selector(initWithSerialization:)])
		@throw [OFNotImplementedException
		    newWithClass: class
			selector: @selector(initWithSerialization:)];

	object = [[class alloc] initWithSerialization: element];

	@try {
		[pool release];
	} @catch (id e) {
		[object release];
		@throw e;
	}

	return [object autorelease];
}

- init
{
	Class c = isa;
	[self release];
	@throw [OFNotImplementedException newWithClass: c
					      selector: _cmd];
}
@end
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































Added src/OFString+Serialization.h version [16fd8bca74].











































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright (c) 2008, 2009, 2010, 2011
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString.h"

#ifdef __cplusplus
extern "C" {
#endif
extern int _OFString_Serialization_reference;
#ifdef __cplusplus
}
#endif

/**
 * \brief A category that provides methods for deserializing objects.
 */
@interface OFString (OFSerialization)
/**
 * \brief Deserializes the receiver into an object.
 *
 * \return The deserialized object
 */
- (id)objectByDeserializing;
@end

Added src/OFString+Serialization.m version [4e08e43153].

















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * Copyright (c) 2008, 2009, 2010, 2011
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFString.h"
#import "OFString+Serialization.h"
#import "OFSerialization.h"
#import "OFArray.h"
#import "OFXMLElement.h"
#import "OFAutoreleasePool.h"

#import "OFInvalidArgumentException.h"

int _OFString_Serialization_reference;

@implementation OFString (Serialization)
- (id)objectByDeserializing
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFXMLElement *root = [OFXMLElement elementWithXMLString: self];
	OFArray *elements;
	id object;

	elements = [root elementsForName: @"object"
			       namespace: OF_SERIALIZATION_NS];

	if ([elements count] != 1)
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];

	object = [[[elements firstObject] objectByDeserializing] retain];

	@try {
		[pool release];
	} @catch (id e) {
		[object release];
		@throw e;
	}

	return [object autorelease];
}
@end

Modified src/OFString.h from [2dc2045c14] to [e4ec21f536].

699
700
701
702
703
704
705

706
707
708
 */
- (void)writeToFile: (OFString*)path;
@end

#import "OFConstantString.h"
#import "OFMutableString.h"
#import "OFString+Hashing.h"

#import "OFString+URLEncoding.h"
#import "OFString+XMLEscaping.h"
#import "OFString+XMLUnescaping.h"







>



699
700
701
702
703
704
705
706
707
708
709
 */
- (void)writeToFile: (OFString*)path;
@end

#import "OFConstantString.h"
#import "OFMutableString.h"
#import "OFString+Hashing.h"
#import "OFString+Serialization.h"
#import "OFString+URLEncoding.h"
#import "OFString+XMLEscaping.h"
#import "OFString+XMLUnescaping.h"

Modified src/OFString.m from [56cd9db202] to [e6606bec8f].

55
56
57
58
59
60
61

62
63
64
65
66
67
68
extern const uint16_t of_iso_8859_15[256];
extern const uint16_t of_windows_1252[256];

/* References for static linking */
void _references_to_categories_of_OFString(void)
{
	_OFString_Hashing_reference = 1;

	_OFString_URLEncoding_reference = 1;
	_OFString_XMLEscaping_reference = 1;
	_OFString_XMLUnescaping_reference = 1;
}

static inline int
memcasecmp(const char *first, const char *second, size_t length)







>







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
extern const uint16_t of_iso_8859_15[256];
extern const uint16_t of_windows_1252[256];

/* References for static linking */
void _references_to_categories_of_OFString(void)
{
	_OFString_Hashing_reference = 1;
	_OFString_Serialization_reference = 1;
	_OFString_URLEncoding_reference = 1;
	_OFString_XMLEscaping_reference = 1;
	_OFString_XMLUnescaping_reference = 1;
}

static inline int
memcasecmp(const char *first, const char *second, size_t length)

Added src/OFXMLElement+Serialization.h version [25bdafaf8a].











































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright (c) 2008, 2009, 2010, 2011
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFXMLElement.h"

#ifdef __cplusplus
extern "C" {
#endif
extern int _OFXMLElement_Serialization_reference;
#ifdef __cplusplus
}
#endif

/**
 * \brief A category that provides methods for deserializing objects.
 */
@interface OFXMLElement (OFSerialization)
/**
 * \brief Deserializes the receiver into an object.
 *
 * \return The deserialized object
 */
- (id)objectByDeserializing;
@end

Added src/OFXMLElement+Serialization.m version [7fc442d7ba].























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
 * Copyright (c) 2008, 2009, 2010, 2011
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME)
# import <objc/runtime.h>
#elif defined(OF_OLD_GNU_RUNTIME)
# import <objc/objc-api.h>
#endif

#import "OFXMLElement.h"
#import "OFXMLElement+Serialization.h"
#import "OFSerialization.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"

#import "OFInvalidArgumentException.h"
#import "OFNotImplementedException.h"

#if defined(OF_OBJFW_RUNTIME) || defined(OF_OLD_GNU_RUNTIME)
# define objc_lookUpClass objc_lookup_class
#endif

int _OFXMLElement_Serialization_reference;

@implementation OFXMLElement (Serialization)
- (id)objectByDeserializing
{
	OFAutoreleasePool *pool;
	OFString *className;
	Class class;
	id <OFSerialization> object;

	pool = [[OFAutoreleasePool alloc] init];
	className = [[self attributeForName: @"class"] stringValue];
	if (className == nil)
		@throw [OFNotImplementedException
		    newWithClass: nil
			selector: @selector(initWithSerialization:)];

	class = objc_lookUpClass([className cString]);
	if (class == Nil)
		@throw [OFNotImplementedException newWithClass: Nil];

	if (![class conformsToProtocol: @protocol(OFSerialization)])
		@throw [OFNotImplementedException
		    newWithClass: class
			selector: @selector(initWithSerialization:)];

	object = [[class alloc] initWithSerialization: self];

	@try {
		[pool release];
	} @catch (id e) {
		[object release];
		@throw e;
	}

	return [object autorelease];
}
@end

Modified src/OFXMLElement.h from [9b5b383592] to [d808ad9d11].

382
383
384
385
386
387
388


 * \param elementName The name of the elements
 * \param elementNS The namespace of the elements
 * \return The child elements with the specified name and namespace
 */
- (OFArray*)elementsForName: (OFString*)elementName
		  namespace: (OFString*)elementNS;
@end









>
>
382
383
384
385
386
387
388
389
390
 * \param elementName The name of the elements
 * \param elementNS The namespace of the elements
 * \return The child elements with the specified name and namespace
 */
- (OFArray*)elementsForName: (OFString*)elementName
		  namespace: (OFString*)elementNS;
@end

#import "OFXMLElement+Serialization.h"

Modified src/OFXMLElement.m from [3bbec56037] to [07cdc30ecf].

30
31
32
33
34
35
36






37
38
39
40
41
42
43

#import "OFInvalidArgumentException.h"
#import "OFMalformedXMLException.h"
#import "OFNotImplementedException.h"
#import "OFUnboundNamespaceException.h"

#import "macros.h"







@interface OFXMLElement_OFXMLElementBuilderDelegate: OFObject
{
@public
	OFXMLElement *element;
}
@end







>
>
>
>
>
>







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

#import "OFInvalidArgumentException.h"
#import "OFMalformedXMLException.h"
#import "OFNotImplementedException.h"
#import "OFUnboundNamespaceException.h"

#import "macros.h"

/* References for static linking */
void _references_to_categories_of_OFXMLElement(void)
{
	_OFXMLElement_Serialization_reference = 1;
}

@interface OFXMLElement_OFXMLElementBuilderDelegate: OFObject
{
@public
	OFXMLElement *element;
}
@end
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
			 namespace: OF_SERIALIZATION_NS];
		namespacesElement = [element
		    elementForName: @"namespaces"
			 namespace: OF_SERIALIZATION_NS];
		childrenElement = [element elementForName: @"children"
						namespace: OF_SERIALIZATION_NS];

		attributes = [[OFSerialization objectByDeserializingXMLElement:
		    [attributesElement elementForName: @"object"
					    namespace: OF_SERIALIZATION_NS]]
		    retain];
		namespaces = [[OFSerialization objectByDeserializingXMLElement:
		    [namespacesElement elementForName: @"object"
					    namespace: OF_SERIALIZATION_NS]]
		    retain];
		children = [[OFSerialization objectByDeserializingXMLElement:
		    [childrenElement elementForName: @"object"
					  namespace: OF_SERIALIZATION_NS]]
		    retain];

		if (!((name != nil || ns != nil || defaultNamespace != nil ||
		    [attributes count] > 0 || [namespaces count] > 0 ||
		    [children count] > 0) ^ (characters != nil) ^
		    (CDATA != nil) ^ (comment != nil)))
			@throw [OFInvalidArgumentException newWithClass: isa







|
|
|

|
|
|

|
|
|







323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
			 namespace: OF_SERIALIZATION_NS];
		namespacesElement = [element
		    elementForName: @"namespaces"
			 namespace: OF_SERIALIZATION_NS];
		childrenElement = [element elementForName: @"children"
						namespace: OF_SERIALIZATION_NS];

		attributes = [[[attributesElement
		    elementForName: @"object"
			 namespace: OF_SERIALIZATION_NS] objectByDeserializing]
		    retain];
		namespaces = [[[namespacesElement
		    elementForName: @"object"
			 namespace: OF_SERIALIZATION_NS] objectByDeserializing]
		    retain];
		children = [[[childrenElement
		    elementForName: @"object"
			 namespace: OF_SERIALIZATION_NS] objectByDeserializing]
		    retain];

		if (!((name != nil || ns != nil || defaultNamespace != nil ||
		    [attributes count] > 0 || [namespaces count] > 0 ||
		    [children count] > 0) ^ (characters != nil) ^
		    (CDATA != nil) ^ (comment != nil)))
			@throw [OFInvalidArgumentException newWithClass: isa

Modified tests/OFSerializationTests.m from [b1cb4df2c6] to [f8cccb7ff5].

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
	[l appendObject: @"Wo\rld!\nHow are you?"];
	[l appendObject: [OFURL URLWithString: @"https://webkeks.org/"]];
	[l appendObject: [OFXMLElement elementWithXMLString: @"<x><y/></x>"]];

	[d setObject: @"list"
	      forKey: l];

	TEST(@"Serialization",
	    (s = [OFSerialization stringBySerializingObject: d]) &&
	    [s isEqual: expected])

	TEST(@"Deserialization",
	    [[OFSerialization objectByDeserializingString: s] isEqual: d])

	[pool drain];
}
@end







<
|
|

|
|




85
86
87
88
89
90
91

92
93
94
95
96
97
98
99
100
	[l appendObject: @"Wo\rld!\nHow are you?"];
	[l appendObject: [OFURL URLWithString: @"https://webkeks.org/"]];
	[l appendObject: [OFXMLElement elementWithXMLString: @"<x><y/></x>"]];

	[d setObject: @"list"
	      forKey: l];


	TEST(@"-[stringBySerializing]",
	    (s = [d stringBySerializing]) && [s isEqual: expected])

	TEST(@"-[objectByDeserializing]",
	    [[s objectByDeserializing] isEqual: d])

	[pool drain];
}
@end