summaryrefslogtreecommitdiff
path: root/tikzit-1/src/osx/Graph+Coder.m
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit-1/src/osx/Graph+Coder.m')
-rw-r--r--tikzit-1/src/osx/Graph+Coder.m24
1 files changed, 24 insertions, 0 deletions
diff --git a/tikzit-1/src/osx/Graph+Coder.m b/tikzit-1/src/osx/Graph+Coder.m
new file mode 100644
index 0000000..7d3787e
--- /dev/null
+++ b/tikzit-1/src/osx/Graph+Coder.m
@@ -0,0 +1,24 @@
+//
+// Graph+Coder.m
+// TikZiT
+//
+// Created by Aleks Kissinger on 27/04/2010.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "Graph+Coder.h"
+#import "TikzGraphAssembler.h"
+
+@implementation Graph(Coder)
+
+- (id)initWithCoder:(NSCoder*)coder {
+ NSString *tikz = [coder decodeObject];
+ [TikzGraphAssembler parseTikz:tikz forGraph:self];
+ return self;
+}
+
+- (void)encodeWithCoder:(NSCoder*)coder {
+ [coder encodeObject:[self tikz]];
+}
+
+@end