From 1a111979e01a6081cbea69e40accebe16e6155e5 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Sun, 24 Mar 2013 15:52:33 +0000 Subject: 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. --- tikzit/src/common/Graph.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'tikzit/src/common/Graph.h') 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 -- cgit v1.2.3