adium 2498:2a4ac0570326: Propertyize
commits at adium.im
commits at adium.im
Sat Jun 13 00:58:02 UTC 2009
details: http://hg.adium.im/adium/rev/2a4ac0570326
revision: 2498:2a4ac0570326
author: David Smith <catfish.man at gmail.com>
date: Fri Jun 12 17:57:30 2009 -0700
Propertyize
diffs (64 lines):
diff -r c8989ebb1f2b -r 2a4ac0570326 Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.h
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.h Fri Jun 12 17:52:50 2009 -0700
+++ b/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.h Fri Jun 12 17:57:30 2009 -0700
@@ -37,7 +37,7 @@
};
@interface AWEzvXMLNode : NSObject {
- NSString *name;
+ NSString *name;
int type;
NSMutableDictionary *attributes;
NSMutableArray *children;
@@ -45,13 +45,12 @@
}
- (id) initWithType:(int)type name:(NSString *)name;
-- (int) type;
-- (NSArray *)children;
+ at property (readonly, nonatomic) int type;
+ at property (readonly, nonatomic) NSArray *children;
+ at property (readonly, nonatomic) NSDictionary *attributes;
+ at property (readwrite, copy, nonatomic) NSString *name;
+ at property (readonly, nonatomic) NSString *xmlString;
- (void) addChild:(AWEzvXMLNode *)node;
-- (NSDictionary *)attributes;
- (void) addAttribute:(NSString *)property withValue:(NSString *)value;
-- (NSString *)name;
-- (void) setName:(NSString *)name;
-- (NSString *)xmlString;
@end
diff -r c8989ebb1f2b -r 2a4ac0570326 Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.m
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.m Fri Jun 12 17:52:50 2009 -0700
+++ b/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.m Fri Jun 12 17:57:30 2009 -0700
@@ -58,9 +58,8 @@
[super dealloc];
}
-- (int) type {
- return type;
-}
+ at synthesize type, name;
+
- (NSArray *)children {
return [[children copy] autorelease];
}
@@ -76,17 +75,6 @@
[attributes setObject:value forKey:property];
}
-- (NSString *)name {
- return name;
-}
-
-- (void) setName:(NSString *)theName {
- if (name != theName) {
- [name release];
- name = [theName retain];
- }
-}
-
- (NSString *)xmlString {
NSMutableString *string;
NSString *key;
More information about the commits
mailing list