From 8daef801bc9b4402550e44e337bf8317c60acaaa Mon Sep 17 00:00:00 2001 From: helge Date: Fri, 15 Jul 2005 11:20:03 +0000 Subject: [PATCH] added class version checks git-svn-id: http://svn.opengroupware.org/SOPE/trunk@908 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-ical/NGiCal/ChangeLog | 4 ++++ sope-ical/NGiCal/NGVCardAddress.m | 9 +++++++++ sope-ical/NGiCal/NGVCardName.m | 9 +++++++++ sope-ical/NGiCal/NGVCardOrg.m | 9 +++++++++ sope-ical/NGiCal/NGVCardPhone.m | 9 +++++++++ sope-ical/NGiCal/NGVCardSimpleValue.m | 9 +++++++++ sope-ical/NGiCal/NGVCardStrArrayValue.m | 9 +++++++++ sope-ical/NGiCal/NGVCardValue.m | 4 ++++ sope-ical/NGiCal/Version | 2 +- sope-ical/NGiCal/iCalCalendar.m | 9 +++++++++ sope-ical/NGiCal/iCalEntityObject.m | 9 +++++++++ sope-ical/NGiCal/iCalEvent.m | 9 +++++++++ sope-ical/NGiCal/iCalFreeBusy.m | 9 +++++++++ sope-ical/NGiCal/iCalJournal.m | 9 +++++++-- sope-ical/NGiCal/iCalObject.m | 4 ++++ sope-ical/NGiCal/iCalPerson.m | 9 +++++++++ sope-ical/NGiCal/iCalRepeatableEntityObject.m | 9 +++++++++ sope-ical/NGiCal/iCalToDo.m | 9 +++++++++ 18 files changed, 137 insertions(+), 3 deletions(-) diff --git a/sope-ical/NGiCal/ChangeLog b/sope-ical/NGiCal/ChangeLog index 7417bd40..6826f0dd 100644 --- a/sope-ical/NGiCal/ChangeLog +++ b/sope-ical/NGiCal/ChangeLog @@ -1,3 +1,7 @@ +2005-07-15 Helge Hess + + * added fragile base class version checks (v4.5.55) + 2005-07-15 Marcus Mueller * iCalObject.[hm], iCalEntityObject.m, iCalToDo.m, iCalAlarm.m, diff --git a/sope-ical/NGiCal/NGVCardAddress.m b/sope-ical/NGiCal/NGVCardAddress.m index 3cfc7b22..b25905f1 100644 --- a/sope-ical/NGiCal/NGVCardAddress.m +++ b/sope-ical/NGiCal/NGVCardAddress.m @@ -24,6 +24,15 @@ @implementation NGVCardAddress ++ (int)version { + return [super version] + 0 /* v0 */; +} ++ (void)initialize { + NSAssert2([super version] == 0, + @"invalid superclass (%@) version %i !", + NSStringFromClass([self superclass]), [super version]); +} + - (id)initWithDictionary:(NSDictionary *)_plist group:(NSString *)_group types:(NSArray *)_types arguments:(NSDictionary *)_a { diff --git a/sope-ical/NGiCal/NGVCardName.m b/sope-ical/NGiCal/NGVCardName.m index 897e2ac3..06be3f96 100644 --- a/sope-ical/NGiCal/NGVCardName.m +++ b/sope-ical/NGiCal/NGVCardName.m @@ -24,6 +24,15 @@ @implementation NGVCardName ++ (int)version { + return [super version] + 0 /* v0 */; +} ++ (void)initialize { + NSAssert2([super version] == 0, + @"invalid superclass (%@) version %i !", + NSStringFromClass([self superclass]), [super version]); +} + - (id)initWithPropertyList:(id)_plist group:(NSString *)_group types:(NSArray *)_types arguments:(NSDictionary *)_a { diff --git a/sope-ical/NGiCal/NGVCardOrg.m b/sope-ical/NGiCal/NGVCardOrg.m index 4acb83e1..fd9b6b34 100644 --- a/sope-ical/NGiCal/NGVCardOrg.m +++ b/sope-ical/NGiCal/NGVCardOrg.m @@ -24,6 +24,15 @@ @implementation NGVCardOrg ++ (int)version { + return [super version] + 0 /* v0 */; +} ++ (void)initialize { + NSAssert2([super version] == 0, + @"invalid superclass (%@) version %i !", + NSStringFromClass([self superclass]), [super version]); +} + - (id)initWithName:(NSString *)_name units:(NSArray *)_units group:(NSString *)_grp types:(NSArray *)_tps arguments:(NSDictionary *)_a { diff --git a/sope-ical/NGiCal/NGVCardPhone.m b/sope-ical/NGiCal/NGVCardPhone.m index 1707609a..1cc4c7d8 100644 --- a/sope-ical/NGiCal/NGVCardPhone.m +++ b/sope-ical/NGiCal/NGVCardPhone.m @@ -24,4 +24,13 @@ @implementation NGVCardPhone ++ (int)version { + return [super version] + 0 /* v0 */; +} ++ (void)initialize { + NSAssert2([super version] == 0, + @"invalid superclass (%@) version %i !", + NSStringFromClass([self superclass]), [super version]); +} + @end /* NGVCardPhone */ diff --git a/sope-ical/NGiCal/NGVCardSimpleValue.m b/sope-ical/NGiCal/NGVCardSimpleValue.m index 05fcc077..7ef6b228 100644 --- a/sope-ical/NGiCal/NGVCardSimpleValue.m +++ b/sope-ical/NGiCal/NGVCardSimpleValue.m @@ -24,6 +24,15 @@ @implementation NGVCardSimpleValue ++ (int)version { + return [super version] + 0 /* v0 */; +} ++ (void)initialize { + NSAssert2([super version] == 0, + @"invalid superclass (%@) version %i !", + NSStringFromClass([self superclass]), [super version]); +} + - (id)initWithValue:(NSString *)_value group:(NSString *)_group types:(NSArray *)_types arguments:(NSDictionary *)_a { diff --git a/sope-ical/NGiCal/NGVCardStrArrayValue.m b/sope-ical/NGiCal/NGVCardStrArrayValue.m index decbbbd4..e62faba7 100644 --- a/sope-ical/NGiCal/NGVCardStrArrayValue.m +++ b/sope-ical/NGiCal/NGVCardStrArrayValue.m @@ -24,6 +24,15 @@ @implementation NGVCardStrArrayValue ++ (int)version { + return [super version] + 0 /* v0 */; +} ++ (void)initialize { + NSAssert2([super version] == 0, + @"invalid superclass (%@) version %i !", + NSStringFromClass([self superclass]), [super version]); +} + - (id)initWithArray:(NSArray *)_plist group:(NSString *)_group types:(NSArray *)_types arguments:(NSDictionary *)_a { diff --git a/sope-ical/NGiCal/NGVCardValue.m b/sope-ical/NGiCal/NGVCardValue.m index b5476a8e..1d9aa6d7 100644 --- a/sope-ical/NGiCal/NGVCardValue.m +++ b/sope-ical/NGiCal/NGVCardValue.m @@ -25,6 +25,10 @@ @implementation NGVCardValue ++ (int)version { + return [super version] + 0 /* v0 */; +} + - (id)initWithGroup:(NSString *)_group types:(NSArray *)_types arguments:(NSDictionary *)_a { diff --git a/sope-ical/NGiCal/Version b/sope-ical/NGiCal/Version index 632bc18a..b734319b 100644 --- a/sope-ical/NGiCal/Version +++ b/sope-ical/NGiCal/Version @@ -2,7 +2,7 @@ MAJOR_VERSION=4 MINOR_VERSION=5 -SUBMINOR_VERSION:=54 +SUBMINOR_VERSION:=55 # v4.5.40 requires NGExtensions v4.5.145 # v4.5.37 requires NGExtensions v4.5.140 diff --git a/sope-ical/NGiCal/iCalCalendar.m b/sope-ical/NGiCal/iCalCalendar.m index d0664c77..8c6a19d0 100644 --- a/sope-ical/NGiCal/iCalCalendar.m +++ b/sope-ical/NGiCal/iCalCalendar.m @@ -37,6 +37,15 @@ static id parser = nil; // THREAD static SaxObjectDecoder *sax = nil; // THREAD ++ (int)version { + return [super version] + 0 /* v0 */; +} ++ (void)initialize { + NSAssert2([super version] == 0, + @"invalid superclass (%@) version %i !", + NSStringFromClass([self superclass]), [super version]); +} + + (id)iCalParser { if (sax == nil) { sax = [[SaxObjectDecoder alloc] initWithMappingNamed:@"NGiCal"];; diff --git a/sope-ical/NGiCal/iCalEntityObject.m b/sope-ical/NGiCal/iCalEntityObject.m index f92ec060..6f78e6c5 100644 --- a/sope-ical/NGiCal/iCalEntityObject.m +++ b/sope-ical/NGiCal/iCalEntityObject.m @@ -29,6 +29,15 @@ @implementation iCalEntityObject ++ (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->uid release]; [self->summary release]; diff --git a/sope-ical/NGiCal/iCalEvent.m b/sope-ical/NGiCal/iCalEvent.m index 94c4aebd..a6945a4f 100644 --- a/sope-ical/NGiCal/iCalEvent.m +++ b/sope-ical/NGiCal/iCalEvent.m @@ -33,6 +33,15 @@ @implementation iCalEvent ++ (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->endDate release]; [self->duration release]; diff --git a/sope-ical/NGiCal/iCalFreeBusy.m b/sope-ical/NGiCal/iCalFreeBusy.m index 4305a864..742e4ad5 100644 --- a/sope-ical/NGiCal/iCalFreeBusy.m +++ b/sope-ical/NGiCal/iCalFreeBusy.m @@ -25,6 +25,15 @@ @implementation iCalFreeBusy ++ (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->entries release]; [self->organizer release]; diff --git a/sope-ical/NGiCal/iCalJournal.m b/sope-ical/NGiCal/iCalJournal.m index e9bce125..dfbcf1c4 100644 --- a/sope-ical/NGiCal/iCalJournal.m +++ b/sope-ical/NGiCal/iCalJournal.m @@ -24,8 +24,13 @@ @implementation iCalJournal -- (void)dealloc { - [super dealloc]; ++ (int)version { + return [super version] + 0 /* v0 */; +} ++ (void)initialize { + NSAssert2([super version] == 0, + @"invalid superclass (%@) version %i !", + NSStringFromClass([self superclass]), [super version]); } /* ical typing */ diff --git a/sope-ical/NGiCal/iCalObject.m b/sope-ical/NGiCal/iCalObject.m index dae28d70..f985391a 100644 --- a/sope-ical/NGiCal/iCalObject.m +++ b/sope-ical/NGiCal/iCalObject.m @@ -24,6 +24,10 @@ @implementation iCalObject ++ (int)version { + return 0; +} + // what shall we take, if no timeZone is specified in dateValues static NSTimeZone *defTZ = nil; + (void)setICalDefaultTimeZone:(NSTimeZone *)_timeZone { diff --git a/sope-ical/NGiCal/iCalPerson.m b/sope-ical/NGiCal/iCalPerson.m index 12533d06..2069d084 100644 --- a/sope-ical/NGiCal/iCalPerson.m +++ b/sope-ical/NGiCal/iCalPerson.m @@ -24,6 +24,15 @@ @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]; diff --git a/sope-ical/NGiCal/iCalRepeatableEntityObject.m b/sope-ical/NGiCal/iCalRepeatableEntityObject.m index a5fca2b6..90c27dda 100644 --- a/sope-ical/NGiCal/iCalRepeatableEntityObject.m +++ b/sope-ical/NGiCal/iCalRepeatableEntityObject.m @@ -27,6 +27,15 @@ @implementation iCalRepeatableEntityObject ++ (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->rRules release]; [self->exRules release]; diff --git a/sope-ical/NGiCal/iCalToDo.m b/sope-ical/NGiCal/iCalToDo.m index 4859674e..0bc2259e 100644 --- a/sope-ical/NGiCal/iCalToDo.m +++ b/sope-ical/NGiCal/iCalToDo.m @@ -25,6 +25,15 @@ @implementation iCalToDo ++ (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->due release]; [self->percentComplete release]; -- 2.39.5