![]() |
|
This class can be used to configure aspects of VdfGrapher's output. More...
#include <grapherOptions.h>
Classes | |
| struct | NodeLimit |
| This struct is used to allow the grapher to graph a subset of the nodes. More... | |
Public Types | |
| enum | DisplayStyle { DisplayStyleFull = 0 , DisplayStyleNoLabels , DisplayStyleSummary } |
| The display styles for nodes. More... | |
| using | NodeFilterCallback = std::function< bool(const VdfNode &nodeToFilter)> |
| This typedef describes the function signature for callbacks used to filter nodes out of the graph. | |
| using | NodeStyleCallback = std::function< DisplayStyle(const VdfNode &node, const VdfConnectionVector &drawnIn, const VdfConnectionVector &drawnOut)> |
| This callback is used to determine what style a specific node should be rendered with regardless what was set via SetDisplayStyle(). | |
| typedef std::vector< NodeLimit > | NodeLimitVector |
Public Member Functions | |
| void | SetDrawMasks (bool drawMasks) |
When drawMasks is true, the masks on the connections will be drawn. | |
| void | SetDrawAffectsMasks (bool drawMasks) |
When drawMasks is true, the affects masks on node outputs will be drawn. | |
| bool | GetDrawMasks () const |
| Returns whether or not masks will be draw on the connections. | |
| bool | GetDrawAffectsMasks () const |
| Returns whether or not masks will be draw on the connections. | |
| void | SetPrintSingleOutputs (bool enable) |
When enable is false, nodes containing only a single output, won't render their full connector to reduce clutter. | |
| bool | GetPrintSingleOutputs () const |
| Returns true, if skipping single outputs is enabled. | |
| void | SetPageSize (double width, double height) |
| Sets the desired size of the page output. | |
| double | GetPageHeight () const |
| Returns the page height. | |
| double | GetPageWidth () const |
| Returns the page width. | |
| void | SetUniqueIds (bool uniqueIds) |
When uniqueIds is false, the graph will be printed without using unique ids for node names and ports. | |
| bool | GetUniqueIds () const |
| Returns whether or not the graph should use unique ids. | |
| void | SetOmitUnconnectedSpecs (bool omit) |
When omit is set, unconnected specs will be omitted. | |
| bool | GetOmitUnconnectedSpecs () const |
| Returns whether or not the produced graph should include unconnected specs (ie. | |
| void | SetDrawColorizedConnectionsOnly (bool drawColorizedConnectionsOnly) |
When drawColorizedConnectionsOnly is set, only connections that have a color set via SetColor() will be drawn. | |
| bool | GetDrawColorizedConnectionsOnly () const |
| Returns whether connections that have not a color set via SetColor() should not be drawn. | |
| void | AddNodeToGraph (const VdfNode &node, int maxInDepth, int maxOutDepth) |
Adds node to the list of nodes to be graphed. | |
| void | SetColor (const VdfObjectPtr &object, const TfToken &color) |
Sets a color for object which can be a connection or node. | |
| TfToken | GetColor (const VdfObjectPtr &object) const |
Returns the color for object or the empty TfToken if none was set. | |
| void | SetAnnotation (const VdfObjectPtr &object, const std::string &text) |
Sets an annotation text for object which gets rendered for the object. | |
| std::string | GetAnnotation (const VdfObjectPtr &object) const |
Returns the annotation for object or the empty string if none was set. | |
| const NodeLimitVector & | GetNodesToGraph () const |
| Returns the list of nodes that should be graphed. | |
| void | SetNodeFilterCallback (const NodeFilterCallback &callback) |
| Sets the callback used used to filter nodes out of the graph. | |
| const NodeFilterCallback & | GetNodeFilterCallback () const |
| Returns the callback used to filter nodes out of the graph. | |
| void | SetNodeStyleCallback (const NodeStyleCallback &callback) |
| Sets the callback used used to style nodes. | |
| const NodeStyleCallback & | GetNodeStyleCallback () const |
| Returns the (optional) callback used to style nodes. | |
| void | SetDisplayStyle (DisplayStyle style) |
| Sets the default display style for nodes. | |
| DisplayStyle | GetDisplayStyle () const |
| Returns the default display style for a node. | |
Static Public Member Functions | |
| static VDF_API bool | DebugNameFilter (const std::vector< std::string > &nameList, bool includeIfInNameList, const VdfNode &node) |
| Filters nodes based on debug names, when used as a NodeFilterCallback. | |
This class can be used to configure aspects of VdfGrapher's output.
Definition at line 35 of file grapherOptions.h.
| using NodeFilterCallback = std::function< bool (const VdfNode &nodeToFilter)> |
This typedef describes the function signature for callbacks used to filter nodes out of the graph.
Returns true if node should be in the graph, false if it should be left out.
Definition at line 56 of file grapherOptions.h.
| typedef std::vector<NodeLimit> NodeLimitVector |
Definition at line 83 of file grapherOptions.h.
| using NodeStyleCallback = std::function< DisplayStyle ( const VdfNode &node, const VdfConnectionVector &drawnIn, const VdfConnectionVector &drawnOut)> |
This callback is used to determine what style a specific node should be rendered with regardless what was set via SetDisplayStyle().
Definition at line 62 of file grapherOptions.h.
| enum DisplayStyle |
The display styles for nodes.
DisplayStyleFull: this is the default style and draws the full node. DisplayStyleNoLabels: this draws the node as a box with a name in it. DisplayStyleSummary: this draws the node as a small filled circle.
Definition at line 46 of file grapherOptions.h.
|
inline |
Adds node to the list of nodes to be graphed.
If this list is empty, the entire graph will be printed. The parameters maxInDepth and maxOutDepth determine the the depths of the traversal in both directions.
Definition at line 179 of file grapherOptions.h.
|
static |
Filters nodes based on debug names, when used as a NodeFilterCallback.
If any of the strings in nameList are a substring of the debug name of node, returns includeIfInNameList, including/excluding node from the graph.
|
inline |
Returns the annotation for object or the empty string if none was set.
Definition at line 210 of file grapherOptions.h.
|
inline |
Returns the color for object or the empty TfToken if none was set.
Definition at line 196 of file grapherOptions.h.
|
inline |
Returns the default display style for a node.
Definition at line 265 of file grapherOptions.h.
|
inline |
Returns whether or not masks will be draw on the connections.
Definition at line 107 of file grapherOptions.h.
|
inline |
Returns whether connections that have not a color set via SetColor() should not be drawn.
Definition at line 169 of file grapherOptions.h.
|
inline |
Returns whether or not masks will be draw on the connections.
Definition at line 103 of file grapherOptions.h.
|
inline |
Returns the callback used to filter nodes out of the graph.
Definition at line 228 of file grapherOptions.h.
|
inline |
Returns the list of nodes that should be graphed.
Definition at line 216 of file grapherOptions.h.
|
inline |
Returns the (optional) callback used to style nodes.
Definition at line 241 of file grapherOptions.h.
|
inline |
Returns whether or not the produced graph should include unconnected specs (ie.
input and output ports).
Definition at line 157 of file grapherOptions.h.
|
inline |
Returns the page height.
Definition at line 131 of file grapherOptions.h.
|
inline |
Returns the page width.
Definition at line 135 of file grapherOptions.h.
|
inline |
Returns true, if skipping single outputs is enabled.
Definition at line 117 of file grapherOptions.h.
|
inline |
Returns whether or not the graph should use unique ids.
Definition at line 148 of file grapherOptions.h.
|
inline |
Sets an annotation text for object which gets rendered for the object.
Definition at line 203 of file grapherOptions.h.
|
inline |
Sets a color for object which can be a connection or node.
Color must be in a format that is understood by dot. Lowercase English color names usually work, (e.g. "red", "green", "blue").
Definition at line 188 of file grapherOptions.h.
|
inline |
Sets the default display style for nodes.
Definition at line 259 of file grapherOptions.h.
|
inline |
When drawMasks is true, the affects masks on node outputs will be drawn.
Setting this to true implies SetPrintSingleOutputs() true as well.
Definition at line 99 of file grapherOptions.h.
|
inline |
When drawColorizedConnectionsOnly is set, only connections that have a color set via SetColor() will be drawn.
Definition at line 162 of file grapherOptions.h.
|
inline |
When drawMasks is true, the masks on the connections will be drawn.
Definition at line 93 of file grapherOptions.h.
|
inline |
Sets the callback used used to filter nodes out of the graph.
If callback returns true the node should be in the graph, if false if it should be left out.
Definition at line 223 of file grapherOptions.h.
|
inline |
Sets the callback used used to style nodes.
This style will override the default style set via SetDisplayStyle().
Definition at line 235 of file grapherOptions.h.
|
inline |
When omit is set, unconnected specs will be omitted.
Definition at line 152 of file grapherOptions.h.
|
inline |
Sets the desired size of the page output.
Setting the width and height to -1 will disable the page statement in the dot file altogther (which is useful when outputting as .tif file).
Definition at line 124 of file grapherOptions.h.
|
inline |
When enable is false, nodes containing only a single output, won't render their full connector to reduce clutter.
Definition at line 112 of file grapherOptions.h.
|
inline |
When uniqueIds is false, the graph will be printed without using unique ids for node names and ports.
This will likely produce a graph that is not valid for graphing, but can be very useful for comparing output in a test, where we need ids to be exactly the same after each run.
Definition at line 144 of file grapherOptions.h.