summaryrefslogtreecommitdiff
path: root/tikzit/src/common/GraphElementProperty.m
diff options
context:
space:
mode:
authorAlex Merry <dev@randomguy3.me.uk>2013-03-23 00:45:23 +0000
committerAlex Merry <dev@randomguy3.me.uk>2013-03-23 00:45:23 +0000
commit2aa4afed415b02add73c2dd5a3e9ccab90066d04 (patch)
treeaf135f127514fe047cb99b4f0c2ea7b87162acab /tikzit/src/common/GraphElementProperty.m
parentdbd620bbaf7f28728c2686737b6a1453caaebd25 (diff)
Make the parser more coherent
We build things up in stacks in the parser, rather than relying on TikzGraphAssembler so much. This makes tikzparser.ym easier to follow (IMHO).
Diffstat (limited to 'tikzit/src/common/GraphElementProperty.m')
-rw-r--r--tikzit/src/common/GraphElementProperty.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/tikzit/src/common/GraphElementProperty.m b/tikzit/src/common/GraphElementProperty.m
index 2eb6a5f..1e8ad3a 100644
--- a/tikzit/src/common/GraphElementProperty.m
+++ b/tikzit/src/common/GraphElementProperty.m
@@ -27,6 +27,16 @@
@implementation GraphElementProperty
++ (id)atom:(NSString*)n {
+ return [[[self alloc] initWithAtomName:n] autorelease];
+}
++ (id)property:(NSString*)k withValue:(NSString*)v {
+ return [[[self alloc] initWithPropertyValue:v forKey:k] autorelease];
+}
++ (id)keyMatching:(NSString*)k {
+ return [[[self alloc] initWithKeyMatching:k] autorelease];
+}
+
- (id)initWithAtomName:(NSString*)n {
[super init];
[self setKey:n];