summaryrefslogtreecommitdiff
path: root/tikzit/src/osx/Graph+Coder.m
blob: 7d3787ef38a7f7d2db98796142e21952638c92aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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