ObjFW  Check-in [33ac65f8f7]

Overview
Comment:Add OFCopying to OFXMLElement.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 33ac65f8f78ba34f8450424e6310facbb35fe3a449dbc5c37a62e62e53c280aa
User & Date: js on 2011-06-28 22:21:07
Other Links: manifest | tags
Context
2011-06-28
22:56
Add -[readStringWithLength:] to OFStream. check-in: 90a9d9475a user: js tags: trunk
22:21
Add OFCopying to OFXMLElement. check-in: 33ac65f8f7 user: js tags: trunk
22:20
Use isa as class for the copy where useful. check-in: 6d3b3d0468 user: js tags: trunk
Changes

Modified src/OFXMLElement.h from [311a0ed1a3] to [b36f7c7043].

23
24
25
26
27
28
29
30

31
32
33
34
35
36
37
23
24
25
26
27
28
29

30
31
32
33
34
35
36
37







-
+







@class OFMutableString;
@class OFMutableArray;
@class OFMutableDictionary;

/**
 * \brief A class which stores an XML element.
 */
@interface OFXMLElement: OFObject <OFSerialization>
@interface OFXMLElement: OFObject <OFCopying, OFSerialization>
{
	OFString *name;
	OFString *ns;
	OFString *defaultNamespace;
	OFMutableArray *attributes;
	OFMutableDictionary *namespaces;
	OFMutableArray *children;

Modified src/OFXMLElement.m from [4687f4ccbd] to [4fc586873f].

1124
1125
1126
1127
1128
1129
1130





1131
1132
1133
1134
1135
1136
1137
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142







+
+
+
+
+







	OF_HASH_ADD_INT32(hash, [CDATA hash]);
	OF_HASH_ADD_INT32(hash, [comment hash]);

	OF_HASH_FINALIZE(hash);

	return hash;
}

- copy
{
	return [[isa alloc] initWithElement: self];
}

- (void)dealloc
{
	[name release];
	[ns release];
	[defaultNamespace release];
	[attributes release];