@implementation iCalPerson
++ (int)version {
+ return [super version] + 0 /* v0 */;
+}
++ (void)initialize {
+ NSAssert2([super version] == 0,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
- (void)dealloc {
[self->cn release];
[self->email release];
[super dealloc];
}
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+ iCalPerson *new;
+
+ new = [super copyWithZone:_zone];
+
+ ASSIGNCOPY(new->cn, self->cn);
+ ASSIGNCOPY(new->email, self->email);
+ ASSIGNCOPY(new->rsvp, self->rsvp);
+ ASSIGNCOPY(new->partStat, self->partStat);
+ ASSIGNCOPY(new->role, self->role);
+ ASSIGNCOPY(new->xuid, self->xuid);
+
+ return new;
+}
+
/* accessors */
- (void)setCn:(NSString *)_s {
}
- (BOOL)hasSameEmailAddress:(iCalPerson *)_other {
- return IS_EQUAL([self email], [_other email], isEqualToString:);
+ return IS_EQUAL([[self email] lowercaseString],
+ [[_other email] lowercaseString],
+ isEqualToString:);
}
/* descriptions */