]> err.no Git - sope/commitdiff
NSCopying support added
authorznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 15 Jul 2005 09:59:52 +0000 (09:59 +0000)
committerznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 15 Jul 2005 09:59:52 +0000 (09:59 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@906 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

13 files changed:
sope-ical/NGiCal/ChangeLog
sope-ical/NGiCal/Version
sope-ical/NGiCal/iCalAlarm.m
sope-ical/NGiCal/iCalCalendar.m
sope-ical/NGiCal/iCalEntityObject.m
sope-ical/NGiCal/iCalEvent.m
sope-ical/NGiCal/iCalFreeBusy.m
sope-ical/NGiCal/iCalObject.h
sope-ical/NGiCal/iCalObject.m
sope-ical/NGiCal/iCalPerson.m
sope-ical/NGiCal/iCalRepeatableEntityObject.m
sope-ical/NGiCal/iCalToDo.m
sope-ical/NGiCal/iCalTrigger.m

index 6dc41f035f9f6c76e7ae4e0cce8b4284203dcf96..7417bd409f3dbe04109605190ffdc7b2edb281e8 100644 (file)
@@ -1,3 +1,10 @@
+2005-07-15  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * iCalObject.[hm], iCalEntityObject.m, iCalToDo.m, iCalAlarm.m,
+         iCalPerson.m, iCalCalendar.m, iCalEvent.m, iCalTrigger.m,
+         iCalObject.m, iCalFreeBusy.m, iCalRepeatableEntityObject.m:
+         added NSCopying (v4.5.54)
+
 2005-07-15  Helge Hess  <helge.hess@opengroupware.org>
 
        * v4.5.53
index d2b964f05e61163c56d990ac2ab61c17533ff7c0..632bc18a75a13f21bc93737a638b8b47a97ee5b7 100644 (file)
@@ -2,7 +2,7 @@
 
 MAJOR_VERSION=4
 MINOR_VERSION=5
-SUBMINOR_VERSION:=53
+SUBMINOR_VERSION:=54
 
 # v4.5.40 requires NGExtensions v4.5.145
 # v4.5.37 requires NGExtensions v4.5.140
index 151ffdfd15929b442401a02b2ac81b69fd496a7b..b7a20dd6877becaf0ae5d51dc3a312cf95a84669 100644 (file)
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalAlarm *new;
+  
+  new = [super copyWithZone:_zone];
+  
+  ASSIGNCOPY(new->trigger,        self->trigger);
+  ASSIGNCOPY(new->comment,        self->comment);
+  ASSIGNCOPY(new->action,         self->action);
+  ASSIGNCOPY(new->attach,         self->attach);
+  ASSIGNCOPY(new->recurrenceRule, self->recurrenceRule);
+  
+  return new;
+}
+
 /* accessors */
 
 - (void)setTrigger:(id)_value {
index 9bdddcbab33558c06bf4fcd85c66a1f4a70690da..d0664c772eacd88b6e2bb8c9b03a10dd38781b9b 100644 (file)
@@ -124,6 +124,27 @@ static SaxObjectDecoder          *sax    = nil; // THREAD
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalCalendar *new;
+  
+  new = [super copyWithZone:_zone];
+
+  ASSIGNCOPY(new->version,  self->version);
+  ASSIGNCOPY(new->calscale, self->calscale);
+  ASSIGNCOPY(new->prodId,   self->prodId);
+  ASSIGNCOPY(new->method,   self->method);
+
+  ASSIGNCOPY(new->todos,     self->todos);
+  ASSIGNCOPY(new->events,    self->events);
+  ASSIGNCOPY(new->journals,  self->journals);
+  ASSIGNCOPY(new->freeBusys, self->freeBusys);
+  ASSIGNCOPY(new->timezones, self->timezones);
+
+  return new;
+}
+
 /* accessors */
 
 - (void)setCalscale:(NSString *)_value {
index d1e5ce50342d994541a37a3a79b7fb7859b33ad8..f92ec0605034e12dc79550268327ab6c7edbed06 100644 (file)
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalEntityObject *new;
+
+  new = [super copyWithZone:_zone];
+
+  ASSIGNCOPY(new->uid,          self->uid);
+  ASSIGNCOPY(new->summary,      self->summary);
+  new->timestamp = self->timestamp;
+  ASSIGNCOPY(new->created,      self->created);
+  ASSIGNCOPY(new->lastModified, self->lastModified);
+  ASSIGNCOPY(new->startDate,    self->startDate);
+  ASSIGNCOPY(new->accessClass,  self->accessClass);
+  ASSIGNCOPY(new->priority,     self->priority);
+  ASSIGNCOPY(new->alarms,       self->alarms);
+  ASSIGNCOPY(new->organizer,    self->organizer);
+  ASSIGNCOPY(new->attendees,    self->attendees);
+  ASSIGNCOPY(new->comment,      self->comment);
+  ASSIGNCOPY(new->sequence,     self->sequence);
+  ASSIGNCOPY(new->location,     self->location);
+  ASSIGNCOPY(new->status,       self->status);
+  ASSIGNCOPY(new->categories,   self->categories);
+  ASSIGNCOPY(new->userComment,  self->userComment);
+
+  return new;
+}
+
 /* accessors */
 
 - (void)setUid:(NSString *)_value {
index a0b71d5f193299653165f09bec806298d219581a..94c4aebd3004bcacc638affe026c629b792a982f 100644 (file)
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalEvent *new;
+  
+  new = [super copyWithZone:_zone];
+  
+  ASSIGNCOPY(new->endDate,      self->endDate);
+  ASSIGNCOPY(new->duration,     self->duration);
+  ASSIGNCOPY(new->transparency, self->transparency);
+
+  return new;
+}
+
 /* accessors */
 
 - (void)setEndDate:(NSCalendarDate *)_date {
index 60a6950ec1f429d3c82313204510ebe0435f56f6..4305a8646f6243ae51d038595d03bb14b2979a98 100644 (file)
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalFreeBusy *new;
+  
+  new = [super copyWithZone:_zone];
+  
+  ASSIGNCOPY(new->entries,   self->entries);
+  ASSIGNCOPY(new->organizer, self->organizer);
+  ASSIGNCOPY(new->startDate, self->startDate);
+  ASSIGNCOPY(new->endDate,   self->endDate);
+  ASSIGNCOPY(new->url,       self->url);
+  
+  return new;
+}
+
 /* accessors */
 
 - (void)setUrl:(NSString *)_url {
index 3cd26537f684ba6d3bbe732e7e0a32f2f0ea1cf9..c2a442a87da1bbec8ae810c761fb3b5731dc622f 100644 (file)
@@ -34,7 +34,7 @@
 
 @class NSTimeZone;
 
-@interface iCalObject : NSObject
+@interface iCalObject : NSObject <NSCopying>
 {
 }
 
index b8271acf03d11510d8d37ef6e2dcddb5e0762e5f..dae28d70880fd0e32d2ac1053944db8082a62e14 100644 (file)
@@ -37,6 +37,15 @@ static NSTimeZone *defTZ = nil;
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalObject *new;
+  
+  new = [[iCalObject allocWithZone:_zone] init];
+  return new;
+}
+
 /* KVC */
 
 - (void)takeValue:(id)_value forXKey:(id)_key {
index e4e99a04e757e68a1a5d68c090bf9afcd94b39dc..12533d061a6a890d34e2d2a194732ef7eaabb585 100644 (file)
   [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 {
index 6d9a0ea8743e72cb11efcee70f60102c52eaaefd..a5fca2b6f7603fe5bdc1f776fae2e5909a3c3d5c 100644 (file)
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalRepeatableEntityObject *new;
+
+  new = [super copyWithZone:_zone];
+  
+  ASSIGNCOPY(new->rRules,  self->rRules);
+  ASSIGNCOPY(new->exRules, self->exRules);
+  ASSIGNCOPY(new->exDates, self->exDates);
+
+  return new;
+}
+
 /* Accessors */
 
 - (void)removeAllRecurrenceRules {
index 13549b56cd81a730c32f5b7d0326ebf42989fdd5..4859674ec08294e6a57e061a3e02b9600c32a887 100644 (file)
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalToDo *new;
+  
+  new = [super copyWithZone:_zone];
+  
+  ASSIGNCOPY(new->due,   self->due);
+  ASSIGNCOPY(new->percentComplete, self->percentComplete);
+  ASSIGNCOPY(new->completed, self->completed);
+  
+  return new;
+}
+
 /* accessors */
 
 - (void)setPercentComplete:(NSString *)_value {
index 4ba3aac913e46513b4e585d1692e0da6d8176469..21fe30ae26e35cefd03f28b66c1b81f09ddce6d2 100644 (file)
   [super dealloc];
 }
 
+/* NSCopying */
+
+- (id)copyWithZone:(NSZone *)_zone {
+  iCalTrigger *new;
+  
+  new = [super copyWithZone:_zone];
+  
+  ASSIGNCOPY(new->valueType, self->valueType);
+  ASSIGNCOPY(new->value,     self->value);
+  
+  return new;
+}
+
 /* accessors */
 
 - (void)setValue:(NSString *)_value {