X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sope-ical%2FNGiCal%2FNGVCardSimpleValue.m;h=05fcc077fbd5c99b4b5053581e7d0793a8cbde2a;hb=eb3ec572d9fe1516cb59db8ed7712570249835fc;hp=f4505ecbc1005a515534bcb6349d9a6edbccd4a4;hpb=e6ca6db2baa847ee4ca9aa3757d7626bd0909a27;p=sope diff --git a/sope-ical/NGiCal/NGVCardSimpleValue.m b/sope-ical/NGiCal/NGVCardSimpleValue.m index f4505ecb..05fcc077 100644 --- a/sope-ical/NGiCal/NGVCardSimpleValue.m +++ b/sope-ical/NGiCal/NGVCardSimpleValue.m @@ -19,11 +19,29 @@ 02111-1307, USA. */ -#include "NGVCardValue.h" +#include "NGVCardSimpleValue.h" #include "common.h" @implementation NGVCardSimpleValue +- (id)initWithValue:(NSString *)_value group:(NSString *)_group + types:(NSArray *)_types arguments:(NSDictionary *)_a +{ + if ((self = [super initWithGroup:_group types:_types arguments:_a]) != nil) { + self->value = [_value copy]; + } + return self; +} + +- (id)initWithGroup:(NSString *)_group types:(NSArray *)_types + arguments:(NSDictionary *)_a +{ + return [self initWithValue:nil group:_group types:_types arguments:_a]; +} +- (id)init { + return [self initWithValue:nil group:nil types:nil arguments:nil]; +} + - (void)dealloc { [self->value release]; [super dealloc]; @@ -61,4 +79,11 @@ return self; } +/* description */ + +- (void)appendAttributesToDescription:(NSMutableString *)_ms { + if (self->value != nil) [_ms appendFormat:@" value='%@'", self->value]; + [super appendAttributesToDescription:_ms]; +} + @end /* NGVCardSimpleValue */