DOTGraphTraits.h (221345) | DOTGraphTraits.h (234353) |
---|---|
1//===-- llvm/Support/DotGraphTraits.h - Customize .dot output ---*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 28 unchanged lines hidden (view full) --- 37 38public: 39 explicit DefaultDOTGraphTraits(bool simple=false) : IsSimple (simple) {} 40 41 /// getGraphName - Return the label for the graph as a whole. Printed at the 42 /// top of the graph. 43 /// 44 template<typename GraphType> | 1//===-- llvm/Support/DotGraphTraits.h - Customize .dot output ---*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 28 unchanged lines hidden (view full) --- 37 38public: 39 explicit DefaultDOTGraphTraits(bool simple=false) : IsSimple (simple) {} 40 41 /// getGraphName - Return the label for the graph as a whole. Printed at the 42 /// top of the graph. 43 /// 44 template<typename GraphType> |
45 static std::string getGraphName(const GraphType& Graph) { return ""; } | 45 static std::string getGraphName(const GraphType &) { return ""; } |
46 47 /// getGraphProperties - Return any custom properties that should be included 48 /// in the top level graph structure for dot. 49 /// 50 template<typename GraphType> | 46 47 /// getGraphProperties - Return any custom properties that should be included 48 /// in the top level graph structure for dot. 49 /// 50 template<typename GraphType> |
51 static std::string getGraphProperties(const GraphType& Graph) { | 51 static std::string getGraphProperties(const GraphType &) { |
52 return ""; 53 } 54 55 /// renderGraphFromBottomUp - If this function returns true, the graph is 56 /// emitted bottom-up instead of top-down. This requires graphviz 2.0 to work 57 /// though. 58 static bool renderGraphFromBottomUp() { 59 return false; 60 } 61 62 /// isNodeHidden - If the function returns true, the given node is not 63 /// displayed in the graph. | 52 return ""; 53 } 54 55 /// renderGraphFromBottomUp - If this function returns true, the graph is 56 /// emitted bottom-up instead of top-down. This requires graphviz 2.0 to work 57 /// though. 58 static bool renderGraphFromBottomUp() { 59 return false; 60 } 61 62 /// isNodeHidden - If the function returns true, the given node is not 63 /// displayed in the graph. |
64 static bool isNodeHidden(const void *Node) { | 64 static bool isNodeHidden(const void *) { |
65 return false; 66 } 67 68 /// getNodeLabel - Given a node and a pointer to the top level graph, return 69 /// the label to print in the node. 70 template<typename GraphType> | 65 return false; 66 } 67 68 /// getNodeLabel - Given a node and a pointer to the top level graph, return 69 /// the label to print in the node. 70 template<typename GraphType> |
71 std::string getNodeLabel(const void *Node, const GraphType& Graph) { | 71 std::string getNodeLabel(const void *, const GraphType &) { |
72 return ""; 73 } 74 75 /// hasNodeAddressLabel - If this method returns true, the address of the node 76 /// is added to the label of the node. 77 template<typename GraphType> | 72 return ""; 73 } 74 75 /// hasNodeAddressLabel - If this method returns true, the address of the node 76 /// is added to the label of the node. 77 template<typename GraphType> |
78 static bool hasNodeAddressLabel(const void *Node, const GraphType& Graph) { | 78 static bool hasNodeAddressLabel(const void *, const GraphType &) { |
79 return false; 80 } 81 82 /// If you want to specify custom node attributes, this is the place to do so 83 /// 84 template<typename GraphType> | 79 return false; 80 } 81 82 /// If you want to specify custom node attributes, this is the place to do so 83 /// 84 template<typename GraphType> |
85 static std::string getNodeAttributes(const void *Node, 86 const GraphType& Graph) { | 85 static std::string getNodeAttributes(const void *, 86 const GraphType &) { |
87 return ""; 88 } 89 90 /// If you want to override the dot attributes printed for a particular edge, 91 /// override this method. 92 template<typename EdgeIter, typename GraphType> | 87 return ""; 88 } 89 90 /// If you want to override the dot attributes printed for a particular edge, 91 /// override this method. 92 template<typename EdgeIter, typename GraphType> |
93 static std::string getEdgeAttributes(const void *Node, EdgeIter EI, 94 const GraphType& Graph) { | 93 static std::string getEdgeAttributes(const void *, EdgeIter, 94 const GraphType &) { |
95 return ""; 96 } 97 98 /// getEdgeSourceLabel - If you want to label the edge source itself, 99 /// implement this method. 100 template<typename EdgeIter> | 95 return ""; 96 } 97 98 /// getEdgeSourceLabel - If you want to label the edge source itself, 99 /// implement this method. 100 template<typename EdgeIter> |
101 static std::string getEdgeSourceLabel(const void *Node, EdgeIter I) { | 101 static std::string getEdgeSourceLabel(const void *, EdgeIter) { |
102 return ""; 103 } 104 105 /// edgeTargetsEdgeSource - This method returns true if this outgoing edge 106 /// should actually target another edge source, not a node. If this method is 107 /// implemented, getEdgeTarget should be implemented. 108 template<typename EdgeIter> | 102 return ""; 103 } 104 105 /// edgeTargetsEdgeSource - This method returns true if this outgoing edge 106 /// should actually target another edge source, not a node. If this method is 107 /// implemented, getEdgeTarget should be implemented. 108 template<typename EdgeIter> |
109 static bool edgeTargetsEdgeSource(const void *Node, EdgeIter I) { | 109 static bool edgeTargetsEdgeSource(const void *, EdgeIter) { |
110 return false; 111 } 112 113 /// getEdgeTarget - If edgeTargetsEdgeSource returns true, this method is 114 /// called to determine which outgoing edge of Node is the target of this 115 /// edge. 116 template<typename EdgeIter> | 110 return false; 111 } 112 113 /// getEdgeTarget - If edgeTargetsEdgeSource returns true, this method is 114 /// called to determine which outgoing edge of Node is the target of this 115 /// edge. 116 template<typename EdgeIter> |
117 static EdgeIter getEdgeTarget(const void *Node, EdgeIter I) { | 117 static EdgeIter getEdgeTarget(const void *, EdgeIter I) { |
118 return I; 119 } 120 121 /// hasEdgeDestLabels - If this function returns true, the graph is able 122 /// to provide labels for edge destinations. 123 static bool hasEdgeDestLabels() { 124 return false; 125 } 126 127 /// numEdgeDestLabels - If hasEdgeDestLabels, this function returns the 128 /// number of incoming edge labels the given node has. | 118 return I; 119 } 120 121 /// hasEdgeDestLabels - If this function returns true, the graph is able 122 /// to provide labels for edge destinations. 123 static bool hasEdgeDestLabels() { 124 return false; 125 } 126 127 /// numEdgeDestLabels - If hasEdgeDestLabels, this function returns the 128 /// number of incoming edge labels the given node has. |
129 static unsigned numEdgeDestLabels(const void *Node) { | 129 static unsigned numEdgeDestLabels(const void *) { |
130 return 0; 131 } 132 133 /// getEdgeDestLabel - If hasEdgeDestLabels, this function returns the 134 /// incoming edge label with the given index in the given node. | 130 return 0; 131 } 132 133 /// getEdgeDestLabel - If hasEdgeDestLabels, this function returns the 134 /// incoming edge label with the given index in the given node. |
135 static std::string getEdgeDestLabel(const void *Node, unsigned i) { | 135 static std::string getEdgeDestLabel(const void *, unsigned) { |
136 return ""; 137 } 138 139 /// addCustomGraphFeatures - If a graph is made up of more than just 140 /// straight-forward nodes and edges, this is the place to put all of the 141 /// custom stuff necessary. The GraphWriter object, instantiated with your 142 /// GraphType is passed in as an argument. You may call arbitrary methods on 143 /// it to add things to the output graph. 144 /// 145 template<typename GraphType, typename GraphWriter> | 136 return ""; 137 } 138 139 /// addCustomGraphFeatures - If a graph is made up of more than just 140 /// straight-forward nodes and edges, this is the place to put all of the 141 /// custom stuff necessary. The GraphWriter object, instantiated with your 142 /// GraphType is passed in as an argument. You may call arbitrary methods on 143 /// it to add things to the output graph. 144 /// 145 template<typename GraphType, typename GraphWriter> |
146 static void addCustomGraphFeatures(const GraphType& Graph, GraphWriter &GW) {} | 146 static void addCustomGraphFeatures(const GraphType &, GraphWriter &) {} |
147}; 148 149 150/// DOTGraphTraits - Template class that can be specialized to customize how 151/// graphs are converted to 'dot' graphs. When specializing, you may inherit 152/// from DefaultDOTGraphTraits if you don't need to override everything. 153/// 154template <typename Ty> 155struct DOTGraphTraits : public DefaultDOTGraphTraits { 156 DOTGraphTraits (bool simple=false) : DefaultDOTGraphTraits (simple) {} 157}; 158 159} // End llvm namespace 160 161#endif | 147}; 148 149 150/// DOTGraphTraits - Template class that can be specialized to customize how 151/// graphs are converted to 'dot' graphs. When specializing, you may inherit 152/// from DefaultDOTGraphTraits if you don't need to override everything. 153/// 154template <typename Ty> 155struct DOTGraphTraits : public DefaultDOTGraphTraits { 156 DOTGraphTraits (bool simple=false) : DefaultDOTGraphTraits (simple) {} 157}; 158 159} // End llvm namespace 160 161#endif |