Add new getGraphProperties that may be specialized by graphs
authorChris Lattner <sabre@nondot.org>
Thu, 10 Oct 2002 22:29:10 +0000 (22:29 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 10 Oct 2002 22:29:10 +0000 (22:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4108 91177308-0d34-0410-b5e6-96231b3b80d8

include/Support/DOTGraphTraits.h
include/llvm/Support/DOTGraphTraits.h

index 28cf3651792c5678aa4aa9a978cb71071d81381b..ca7c463f1c715c1b975e06fb43cdd73440f0ec77 100644 (file)
@@ -23,6 +23,14 @@ struct DefaultDOTGraphTraits {
   ///
   static std::string getGraphName(void *Graph) { return ""; }
 
+  /// getGraphProperties - Return any custom properties that should be included
+  /// in the top level graph structure for dot.  By default, we resize the graph
+  /// to fit on a letter size page.
+  ///
+  static std::string getGraphProperties(void *Graph) {
+    return "\tsize=\"7.5,10\";\n";    // Size to fit on a page
+  }
+
   /// getNodeLabel - Given a node and a pointer to the top level graph, return
   /// the label to print in the node.
   static std::string getNodeLabel(void *Node, void *Graph) { return ""; }
index 28cf3651792c5678aa4aa9a978cb71071d81381b..ca7c463f1c715c1b975e06fb43cdd73440f0ec77 100644 (file)
@@ -23,6 +23,14 @@ struct DefaultDOTGraphTraits {
   ///
   static std::string getGraphName(void *Graph) { return ""; }
 
+  /// getGraphProperties - Return any custom properties that should be included
+  /// in the top level graph structure for dot.  By default, we resize the graph
+  /// to fit on a letter size page.
+  ///
+  static std::string getGraphProperties(void *Graph) {
+    return "\tsize=\"7.5,10\";\n";    // Size to fit on a page
+  }
+
   /// getNodeLabel - Given a node and a pointer to the top level graph, return
   /// the label to print in the node.
   static std::string getNodeLabel(void *Node, void *Graph) { return ""; }