Overview
Comment: | Add OFXMLNode as a common base class for OFXMLElement & OFXMLAttribute. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
96c3df8f6721dc1cf86e19636b0fb9dc |
User & Date: | js on 2011-09-28 00:05:27 |
Other Links: | manifest | tags |
Context
2011-09-28
| ||
14:21 | Fix build on Win32. check-in: e0e6da8a27 user: js tags: trunk | |
00:05 | Add OFXMLNode as a common base class for OFXMLElement & OFXMLAttribute. check-in: 96c3df8f67 user: js tags: trunk | |
2011-09-25
| ||
22:14 | Add missing files to Xcode project. check-in: 8307a85283 user: js tags: trunk | |
Changes
Modified ObjFW.xcodeproj/project.pbxproj from [81f11b54c6] to [479e86685c].
︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ); name = configure; productName = configure; }; /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ 4B17FF73133A2A76003E6DCD /* OFException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF71133A28FC003E6DCD /* OFException.m */; }; 4B17FF74133A2AAB003E6DCD /* OFException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF70133A28FC003E6DCD /* OFException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B17FF77133A2B18003E6DCD /* OFNotImplementedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF75133A2B18003E6DCD /* OFNotImplementedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B17FF78133A2B18003E6DCD /* OFNotImplementedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF76133A2B18003E6DCD /* OFNotImplementedException.m */; }; 4B17FF7B133A2C15003E6DCD /* OFOutOfRangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF79133A2C14003E6DCD /* OFOutOfRangeException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B17FF7C133A2C15003E6DCD /* OFOutOfRangeException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF7A133A2C15003E6DCD /* OFOutOfRangeException.m */; }; 4B17FF7F133A2D17003E6DCD /* OFAllocFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF7D133A2D16003E6DCD /* OFAllocFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; | > > | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ); name = configure; productName = configure; }; /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ 4B11005C14329B9A003A45D8 /* OFXMLNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B11005A14329B9A003A45D8 /* OFXMLNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B11005D14329B9A003A45D8 /* OFXMLNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B11005B14329B9A003A45D8 /* OFXMLNode.m */; }; 4B17FF73133A2A76003E6DCD /* OFException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF71133A28FC003E6DCD /* OFException.m */; }; 4B17FF74133A2AAB003E6DCD /* OFException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF70133A28FC003E6DCD /* OFException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B17FF77133A2B18003E6DCD /* OFNotImplementedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF75133A2B18003E6DCD /* OFNotImplementedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B17FF78133A2B18003E6DCD /* OFNotImplementedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF76133A2B18003E6DCD /* OFNotImplementedException.m */; }; 4B17FF7B133A2C15003E6DCD /* OFOutOfRangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF79133A2C14003E6DCD /* OFOutOfRangeException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B17FF7C133A2C15003E6DCD /* OFOutOfRangeException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF7A133A2C15003E6DCD /* OFOutOfRangeException.m */; }; 4B17FF7F133A2D17003E6DCD /* OFAllocFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF7D133A2D16003E6DCD /* OFAllocFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
︙ | ︙ | |||
377 378 379 380 381 382 383 384 385 386 387 388 389 390 | /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 4B0108C910EB8C9300631877 /* OFEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFEnumerator.h; path = src/OFEnumerator.h; sourceTree = "<group>"; }; 4B0108CA10EB8C9300631877 /* OFEnumerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFEnumerator.m; path = src/OFEnumerator.m; sourceTree = "<group>"; }; 4B0D249411DFAA3D00ED6FFC /* OFXMLElementBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLElementBuilder.h; path = src/OFXMLElementBuilder.h; sourceTree = "<group>"; }; 4B0D249511DFAA3D00ED6FFC /* OFXMLElementBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLElementBuilder.m; path = src/OFXMLElementBuilder.m; sourceTree = "<group>"; }; 4B175C1D116D130B003C99CB /* OFApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFApplication.h; path = src/OFApplication.h; sourceTree = "<group>"; }; 4B175C1E116D130B003C99CB /* OFApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFApplication.m; path = src/OFApplication.m; sourceTree = "<group>"; }; 4B17FF70133A28FC003E6DCD /* OFException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFException.h; path = src/exceptions/OFException.h; sourceTree = "<group>"; }; 4B17FF71133A28FC003E6DCD /* OFException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFException.m; path = src/exceptions/OFException.m; sourceTree = "<group>"; }; 4B17FF75133A2B18003E6DCD /* OFNotImplementedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFNotImplementedException.h; path = src/exceptions/OFNotImplementedException.h; sourceTree = "<group>"; }; 4B17FF76133A2B18003E6DCD /* OFNotImplementedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFNotImplementedException.m; path = src/exceptions/OFNotImplementedException.m; sourceTree = "<group>"; }; 4B17FF79133A2C14003E6DCD /* OFOutOfRangeException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFOutOfRangeException.h; path = src/exceptions/OFOutOfRangeException.h; sourceTree = "<group>"; }; | > > | 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 4B0108C910EB8C9300631877 /* OFEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFEnumerator.h; path = src/OFEnumerator.h; sourceTree = "<group>"; }; 4B0108CA10EB8C9300631877 /* OFEnumerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFEnumerator.m; path = src/OFEnumerator.m; sourceTree = "<group>"; }; 4B0D249411DFAA3D00ED6FFC /* OFXMLElementBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLElementBuilder.h; path = src/OFXMLElementBuilder.h; sourceTree = "<group>"; }; 4B0D249511DFAA3D00ED6FFC /* OFXMLElementBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLElementBuilder.m; path = src/OFXMLElementBuilder.m; sourceTree = "<group>"; }; 4B11005A14329B9A003A45D8 /* OFXMLNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLNode.h; path = src/OFXMLNode.h; sourceTree = "<group>"; }; 4B11005B14329B9A003A45D8 /* OFXMLNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLNode.m; path = src/OFXMLNode.m; sourceTree = "<group>"; }; 4B175C1D116D130B003C99CB /* OFApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFApplication.h; path = src/OFApplication.h; sourceTree = "<group>"; }; 4B175C1E116D130B003C99CB /* OFApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFApplication.m; path = src/OFApplication.m; sourceTree = "<group>"; }; 4B17FF70133A28FC003E6DCD /* OFException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFException.h; path = src/exceptions/OFException.h; sourceTree = "<group>"; }; 4B17FF71133A28FC003E6DCD /* OFException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFException.m; path = src/exceptions/OFException.m; sourceTree = "<group>"; }; 4B17FF75133A2B18003E6DCD /* OFNotImplementedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFNotImplementedException.h; path = src/exceptions/OFNotImplementedException.h; sourceTree = "<group>"; }; 4B17FF76133A2B18003E6DCD /* OFNotImplementedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFNotImplementedException.m; path = src/exceptions/OFNotImplementedException.m; sourceTree = "<group>"; }; 4B17FF79133A2C14003E6DCD /* OFOutOfRangeException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFOutOfRangeException.h; path = src/exceptions/OFOutOfRangeException.h; sourceTree = "<group>"; }; |
︙ | ︙ | |||
974 975 976 977 978 979 980 981 982 983 984 985 986 987 | 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 */, 4BBA36C411406AB700CBA3AC /* atomic.h */, 4B3D236D1337FB5800DD29B8 /* base64.h */, | > > | 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 | 4BF1BCCF11C9663F0025511F /* OFXMLAttribute.m */, 4B6799871099E7C50041064A /* OFXMLElement.h */, 4B6799881099E7C50041064A /* OFXMLElement.m */, 4BB25E86139C388A00F574EA /* OFXMLElement+Serialization.h */, 4BB25E87139C388A00F574EA /* OFXMLElement+Serialization.m */, 4B0D249411DFAA3D00ED6FFC /* OFXMLElementBuilder.h */, 4B0D249511DFAA3D00ED6FFC /* OFXMLElementBuilder.m */, 4B11005A14329B9A003A45D8 /* OFXMLNode.h */, 4B11005B14329B9A003A45D8 /* OFXMLNode.m */, 4B6799891099E7C50041064A /* OFXMLParser.h */, 4B67998A1099E7C50041064A /* OFXMLParser.m */, 4B6AF97310A8D4450003FB0A /* ObjFW.h */, 4B6799561099E7C50041064A /* asprintf.h */, 4B6AF96C10A8D3E40003FB0A /* asprintf.m */, 4BBA36C411406AB700CBA3AC /* atomic.h */, 4B3D236D1337FB5800DD29B8 /* base64.h */, |
︙ | ︙ | |||
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 | 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 */, 4BD98C03133814220048DD5B /* objfw-defs.h in Headers */, | > | 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 | 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 */, 4B11005C14329B9A003A45D8 /* OFXMLNode.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 */, 4BD98C03133814220048DD5B /* objfw-defs.h in Headers */, |
︙ | ︙ | |||
1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 | 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 */, 4B3D23BA1337FC0D00DD29B8 /* windows_1252.m in Sources */, | > | 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 | 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 */, 4B11005D14329B9A003A45D8 /* OFXMLNode.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 */, 4B3D23BA1337FC0D00DD29B8 /* windows_1252.m in Sources */, |
︙ | ︙ |
Modified src/Makefile from [131aa12a4d] to [ee37de6c1a].
︙ | ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | 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 \ | > | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | OFTCPSocket.m \ ${OFTHREAD_M} \ OFURL.m \ OFXMLAttribute.m \ OFXMLElement.m \ OFXMLElement+Serialization.m \ OFXMLElementBuilder.m \ OFXMLNode.m \ OFXMLParser.m \ base64.m \ of_asprintf.m \ unicode.m INCLUDES := ${SRCS:.m=.h} \ OFCollection.h \ |
︙ | ︙ |
Modified src/OFXMLAttribute.h from [2566508396] to [eddee0e92c].
︙ | ︙ | |||
10 11 12 13 14 15 16 | * * 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. */ | | < | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | * * 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 "OFXMLNode.h" @class OFString; /** * \brief A representation of an attribute of an XML element as an object. */ @interface OFXMLAttribute: OFXMLNode { @public OFString *name; OFString *ns; OFString *stringValue; } |
︙ | ︙ | |||
69 70 71 72 73 74 75 | /** * \brief Returns the namespace of the attribute as an autoreleased OFString. * * \return The namespace of the attribute as an autoreleased OFString */ - (OFString*)namespace; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 68 69 70 71 72 73 74 75 | /** * \brief Returns the namespace of the attribute as an autoreleased OFString. * * \return The namespace of the attribute as an autoreleased OFString */ - (OFString*)namespace; @end |
Modified src/OFXMLAttribute.m from [04b01cd2af] to [bdb655cad5].
︙ | ︙ | |||
103 104 105 106 107 108 109 | } - (OFString*)stringValue { return [[stringValue copy] autorelease]; } | < < < < < < < < < < < < < < < < < < < < | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | } - (OFString*)stringValue { return [[stringValue copy] autorelease]; } - (BOOL)isEqual: (id)object { OFXMLAttribute *otherAttribute; if (![object isKindOfClass: [OFXMLAttribute class]]) return NO; |
︙ | ︙ |
Modified src/OFXMLElement.h from [3e8ea2da55] to [5d2497256d].
︙ | ︙ | |||
10 11 12 13 14 15 16 | * * 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. */ | < < | > | | 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 | * * 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 "OFXMLNode.h" @class OFString; @class OFArray; @class OFMutableString; @class OFMutableArray; @class OFMutableDictionary; @class OFXMLAttribute; /** * \brief A class which stores an XML element. */ @interface OFXMLElement: OFXMLNode { OFString *name; OFString *ns; OFString *defaultNamespace; OFMutableArray *attributes; OFMutableDictionary *namespaces; OFMutableArray *children; |
︙ | ︙ | |||
297 298 299 300 301 302 303 | * \brief Removes all children and sets the string value to the specified * string. * * \param stringValue The new string value for the element */ - (void)setStringValue: (OFString*)stringValue; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | * \brief Removes all children and sets the string value to the specified * string. * * \param stringValue The new string value for the element */ - (void)setStringValue: (OFString*)stringValue; /** * \brief Adds the specified attribute. * * If an attribute with the same name and namespace already exists, it is not * added. * * \param attribute The attribute to add |
︙ | ︙ |
Modified src/OFXMLElement.m from [9e3650faaf] to [1474c4b15e].
︙ | ︙ | |||
495 496 497 498 499 500 501 | [ret makeImmutable]; [pool release]; return ret; } | < < < < < < < < < < < < < < < < < < < < | 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | [ret makeImmutable]; [pool release]; return ret; } - (OFString*)_XMLStringWithParent: (OFXMLElement*)parent namespaces: (OFDictionary*)allNamespaces indentation: (unsigned int)indentation level: (size_t)level { OFAutoreleasePool *pool, *pool2; char *cString; |
︙ | ︙ | |||
798 799 800 801 802 803 804 | { return [self _XMLStringWithParent: nil namespaces: nil indentation: indentation level: 0]; } | < < < < < | 778 779 780 781 782 783 784 785 786 787 788 789 790 791 | { return [self _XMLStringWithParent: nil namespaces: nil indentation: indentation level: 0]; } - (OFXMLElement*)XMLElementBySerializing { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFXMLElement *element; element = [OFXMLElement elementWithName: [self className] namespace: OF_SERIALIZATION_NS]; |
︙ | ︙ |
Added src/OFXMLNode.h version [708d83d554].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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. */ #import "OFObject.h" #import "OFSerialization.h" /** * \brief A class which stores an XML element. */ @interface OFXMLNode: OFObject <OFCopying, OFSerialization> /** * \brief Returns the contents of the receiver as a string value. * * \return A string with the string value */ - (OFString*)stringValue; /** * \brief Returns the contents of the receiver as a decimal value. * * \return An integer with the decimal value */ - (intmax_t)decimalValue; /** * \brief Returns the contents of the receiver as a hexadecimal value. * * \return An integer with the hexadecimal value */ - (uintmax_t)hexadecimalValue; /** * \brief Returns the contents of the receiver as a float value. * * \return A float with the float value */ - (float)floatValue; /** * \brief Returns the contents of the receiver as a double value. * * \return A double with the double value */ - (double)doubleValue; /** * \brief Returns an OFString representing the OFXMLNode as an XML string. * * \return An OFString representing the OFXMLNode as an XML string */ - (OFString*)XMLString; /** * \brief Returns an OFString representing the OFXMLNode as an XML string with * indentation. * * \param indentation The indentation for the XML string * \return An OFString representing the OFXMLNode as an XML string with * indentation */ - (OFString*)XMLStringWithIndentation: (unsigned int)indentation; @end |
Added src/OFXMLNode.m version [702f1c18a8].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* * 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 "OFXMLNode.h" #import "OFNotImplementedException.h" @implementation OFXMLNode - initWithSerialization: (OFXMLElement*)element { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } - (OFString*)stringValue { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (intmax_t)decimalValue { return [[self stringValue] decimalValue]; } - (uintmax_t)hexadecimalValue { return [[self stringValue] hexadecimalValue]; } - (float)floatValue { return [[self stringValue] floatValue]; } - (double)doubleValue { return [[self stringValue] doubleValue]; } - (OFString*)XMLString { return [self XMLStringWithIndentation: 0]; } - (OFString*)XMLStringWithIndentation: (unsigned int)indentation { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (OFString*)description { return [self XMLStringWithIndentation: 2]; } - (OFXMLElement*)XMLElementBySerializing { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - copy { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } @end |