diff options
author | Alex Merry <dev@randomguy3.me.uk> | 2013-03-24 15:52:33 +0000 |
---|---|---|
committer | Alex Merry <dev@randomguy3.me.uk> | 2013-03-24 16:47:10 +0000 |
commit | 1a111979e01a6081cbea69e40accebe16e6155e5 (patch) | |
tree | 41b63d722c48a2ff5f6b8d69135f151c561de5bb /tikzit/src/common/Graph.h | |
parent | 2724cb0739c4b2b2187f31634f5a6c97b6f91c87 (diff) |
Add methods to Graph to create from tikz
These are just convenience wrappers for TikzGraphAssembler. As a
result, non of the GTK code uses TikzGraphAssembler directly.
Diffstat (limited to 'tikzit/src/common/Graph.h')
-rw-r--r-- | tikzit/src/common/Graph.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tikzit/src/common/Graph.h b/tikzit/src/common/Graph.h index f5d8bed..1f98858 100644 --- a/tikzit/src/common/Graph.h +++ b/tikzit/src/common/Graph.h @@ -361,6 +361,41 @@ */ + (Graph*)graph; +/** + * Initialize an empty graph + */ +- (id)init; + +/** + * Constructs a graph from the given tikz code + * + * See TikzGraphAssembler for more information about the error argument. + */ ++ (Graph*)graphFromTikz:(NSString*)tikz error:(NSError**)e; + +/** + * Constructs a graph from the given tikz code + */ ++ (Graph*)graphFromTikz:(NSString*)tikz; + +/** + * Initialize an empty graph from the given tikz code + * + * Note that this may not return the same object it was called on, + * and will return nil if parsing failed. + * + * See TikzGraphAssembler for more information about the error argument. + */ +- (id)initFromTikz:(NSString*)tikz error:(NSError**)e; + +/** + * Initialize an empty graph from the given tikz code + * + * Note that this may not return the same object it was called on, + * and will return nil if parsing failed. + */ +- (id)initFromTikz:(NSString*)tikz; + @end // vi:ft=objc:noet:ts=4:sts=4:sw=4 |