]> err.no Git - sope/blob - sope-ical/NGiCal/iCalTrigger.m
9891168a499d17f3465c3d14721b4e22fc4aefc8
[sope] / sope-ical / NGiCal / iCalTrigger.m
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
6   SOPE is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the
8   Free Software Foundation; either version 2, or (at your option) any
9   later version.
10
11   SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12   WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14   License for more details.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with SOPE; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21
22 #include "iCalTrigger.h"
23 #include "common.h"
24
25 @implementation iCalTrigger
26
27 - (void)dealloc {
28   [self->valueType release];
29   [self->value     release];
30   [super dealloc];
31 }
32
33 /* NSCopying */
34
35 - (id)copyWithZone:(NSZone *)_zone {
36   iCalTrigger *new;
37   
38   new = [super copyWithZone:_zone];
39   
40   new->valueType = [self->valueType copyWithZone:_zone];
41   new->value     = [self->value     copyWithZone:_zone];
42   
43   return new;
44 }
45
46 /* accessors */
47
48 - (void)setValue:(NSString *)_value {
49   ASSIGNCOPY(self->value, _value);
50 }
51 - (NSString *)value {
52   return self->value;
53 }
54
55 - (void)setValueType:(NSString *)_value {
56   ASSIGNCOPY(self->valueType, _value);
57 }
58 - (NSString *)valueType {
59   return self->valueType;
60 }
61
62 /* descriptions */
63
64 - (NSString *)description {
65   NSMutableString *ms;
66
67   ms = [NSMutableString stringWithCapacity:128];
68   [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
69
70   if (self->valueType)
71     [ms appendFormat:@" type=%@", self->valueType];
72   if (self->value)
73     [ms appendFormat:@" value=%@", self->value];
74   
75   [ms appendString:@">"];
76   return ms;
77 }
78
79 @end /* iCalTrigger */