aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPGroupNode.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPGroupNode.m')
-rw-r--r--Source/SPGroupNode.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/SPGroupNode.m b/Source/SPGroupNode.m
index 6687b29e..182a96f7 100644
--- a/Source/SPGroupNode.m
+++ b/Source/SPGroupNode.m
@@ -25,6 +25,9 @@
#import "SPGroupNode.h"
+// Constants
+static const NSString *SPGroupNodeNameKey = @"SPGroupNodeName";
+
@implementation SPGroupNode
@synthesize nodeName;
@@ -68,6 +71,25 @@
}
#pragma mark -
+#pragma mark Coding protocol methods
+
+- (id)initWithCoder:(NSCoder *)coder
+{
+ if ((self = [super initWithCoder:coder])) {
+ [self setNodeName:[coder decodeObjectForKey:SPGroupNodeNameKey]];
+ }
+
+ return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder
+{
+ [super encodeWithCoder:coder];
+
+ [coder encodeObject:[self nodeName] forKey:SPGroupNodeNameKey];
+}
+
+#pragma mark -
#pragma mark Other
- (NSString *)description