GVZGraph.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at http://www.graphviz.org/
  9. *************************************************************************/
  10. #import <Foundation/Foundation.h>
  11. #include "gvc.h"
  12. @class GVGraphArguments;
  13. @class GVGraphDefaultAttributes;
  14. @interface GVZGraph : NSObject
  15. {
  16. @public
  17. graph_t *_graph;
  18. @protected
  19. BOOL _freeLastLayout;
  20. GVGraphArguments *_arguments;
  21. GVGraphDefaultAttributes *_graphAttributes;
  22. GVGraphDefaultAttributes *_defaultNodeAttributes;
  23. GVGraphDefaultAttributes *_defaultEdgeAttributes;
  24. }
  25. @property(readonly) graph_t *graph;
  26. @property(readonly) GVGraphArguments *arguments;
  27. @property(readonly) GVGraphDefaultAttributes *graphAttributes;
  28. @property(readonly) GVGraphDefaultAttributes *defaultNodeAttributes;
  29. @property(readonly) GVGraphDefaultAttributes *defaultEdgeAttributes;
  30. + (void)initialize;
  31. + (NSArray *)pluginsWithAPI:(api_t)api;
  32. - (id)initWithURL:(NSURL *)URL error:(NSError **)outError;
  33. - (NSData *)renderWithFormat:(NSString *)format;
  34. - (void)renderWithFormat:(NSString*)format toURL:(NSURL *)URL;
  35. - (void)noteChanged:(BOOL)relayout;
  36. - (BOOL)writeToURL:(NSURL *)URL error:(NSError **)outError;
  37. - (void)dealloc;
  38. @end
  39. extern NSString *const GVGraphvizErrorDomain;
  40. enum {
  41. GVNoError,
  42. GVFileParseError
  43. };