summaryrefslogtreecommitdiff
path: root/tikzit/src/osx/Graph+Coder.m
diff options
context:
space:
mode:
authorrandomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64>2012-01-09 11:00:50 +0000
committerrandomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64>2012-01-09 11:00:50 +0000
commita8a8dfb90d6a51ae369c042c95162f45754c7c4b (patch)
tree0e7a5f82febebe7129ebfb015f05b114064c39fd /tikzit/src/osx/Graph+Coder.m
parente1cf0babff63e670e0d550b4072c22649a117fa7 (diff)
Move tikzit into "trunk" directory
git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@365 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
Diffstat (limited to 'tikzit/src/osx/Graph+Coder.m')
-rw-r--r--tikzit/src/osx/Graph+Coder.m25
1 files changed, 25 insertions, 0 deletions
diff --git a/tikzit/src/osx/Graph+Coder.m b/tikzit/src/osx/Graph+Coder.m
new file mode 100644
index 0000000..6a3f650
--- /dev/null
+++ b/tikzit/src/osx/Graph+Coder.m
@@ -0,0 +1,25 @@
+//
+// 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 *ass = [[TikzGraphAssembler alloc] init];
+ [ass parseTikz:tikz forGraph:self];
+ return self;
+}
+
+- (void)encodeWithCoder:(NSCoder*)coder {
+ [coder encodeObject:[self tikz]];
+}
+
+@end