]> err.no Git - sope/blobdiff - sope-ical/NGiCal/NGVCardSimpleValue.m
more work on vCard parsing
[sope] / sope-ical / NGiCal / NGVCardSimpleValue.m
index f4505ecbc1005a515534bcb6349d9a6edbccd4a4..05fcc077fbd5c99b4b5053581e7d0793a8cbde2a 100644 (file)
   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];
   return self;
 }
 
+/* description */
+
+- (void)appendAttributesToDescription:(NSMutableString *)_ms {
+  if (self->value != nil) [_ms appendFormat:@" value='%@'", self->value];
+  [super appendAttributesToDescription:_ms];
+}
+
 @end /* NGVCardSimpleValue */