HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VdfGrapherOptions Class Reference

#include <grapherOptions.h>

Classes

struct  NodeLimit
 

Public Types

enum  DisplayStyle { DisplayStyleFull = 0, DisplayStyleNoLabels, DisplayStyleSummary }
 
using NodeFilterCallback = std::function< bool(const VdfNode &nodeToFilter)>
 
using NodeStyleCallback = std::function< DisplayStyle(const VdfNode &node, const VdfConnectionVector &drawnIn, const VdfConnectionVector &drawnOut)>
 
typedef std::vector< NodeLimitNodeLimitVector
 

Public Member Functions

VDF_API VdfGrapherOptions ()
 
void SetDrawMasks (bool drawMasks)
 
void SetDrawAffectsMasks (bool drawMasks)
 
bool GetDrawMasks () const
 
bool GetDrawAffectsMasks () const
 
void SetPrintSingleOutputs (bool enable)
 
bool GetPrintSingleOutputs () const
 
void SetPageSize (double width, double height)
 
double GetPageHeight () const
 
double GetPageWidth () const
 
void SetUniqueIds (bool uniqueIds)
 
bool GetUniqueIds () const
 
void SetOmitUnconnectedSpecs (bool omit)
 
bool GetOmitUnconnectedSpecs () const
 
void SetDrawColorizedConnectionsOnly (bool drawColorizedConnectionsOnly)
 
bool GetDrawColorizedConnectionsOnly () const
 
void AddNodeToGraph (const VdfNode &node, int maxInDepth, int maxOutDepth)
 
void SetColor (const VdfObjectPtr &object, const TfToken &color)
 
TfToken GetColor (const VdfObjectPtr &object) const
 
void SetAnnotation (const VdfObjectPtr &object, const std::string &text)
 
std::string GetAnnotation (const VdfObjectPtr &object) const
 
const NodeLimitVectorGetNodesToGraph () const
 
void SetNodeFilterCallback (const NodeFilterCallback &callback)
 
const NodeFilterCallbackGetNodeFilterCallback () const
 Returns the callback used to filter nodes out of the graph. More...
 
void SetNodeStyleCallback (const NodeStyleCallback &callback)
 
const NodeStyleCallbackGetNodeStyleCallback () const
 
void SetDisplayStyle (DisplayStyle style)
 
DisplayStyle GetDisplayStyle () const
 

Static Public Member Functions

static VDF_API bool DebugNameFilter (const std::vector< std::string > &nameList, bool includeIfInNameList, const VdfNode &node)
 

Detailed Description

This class can be used to configure aspects of VdfGrapher's output.

Definition at line 35 of file grapherOptions.h.

Member Typedef Documentation

using VdfGrapherOptions::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 57 of file grapherOptions.h.

Definition at line 83 of file grapherOptions.h.

using VdfGrapherOptions::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 66 of file grapherOptions.h.

Member Enumeration Documentation

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.

Enumerator
DisplayStyleFull 
DisplayStyleNoLabels 
DisplayStyleSummary 

Definition at line 46 of file grapherOptions.h.

Constructor & Destructor Documentation

VDF_API VdfGrapherOptions::VdfGrapherOptions ( )

Member Function Documentation

void VdfGrapherOptions::AddNodeToGraph ( const VdfNode node,
int  maxInDepth,
int  maxOutDepth 
)
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 VDF_API bool VdfGrapherOptions::DebugNameFilter ( const std::vector< std::string > &  nameList,
bool  includeIfInNameList,
const VdfNode node 
)
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.

std::string VdfGrapherOptions::GetAnnotation ( const VdfObjectPtr object) const
inline

Returns the annotation for object or the empty string if none was set.

Definition at line 210 of file grapherOptions.h.

TfToken VdfGrapherOptions::GetColor ( const VdfObjectPtr object) const
inline

Returns the color for object or the empty TfToken if none was set.

Definition at line 196 of file grapherOptions.h.

DisplayStyle VdfGrapherOptions::GetDisplayStyle ( ) const
inline

Returns the default display style for a node.

Definition at line 265 of file grapherOptions.h.

bool VdfGrapherOptions::GetDrawAffectsMasks ( ) const
inline

Returns whether or not masks will be draw on the connections.

Definition at line 107 of file grapherOptions.h.

bool VdfGrapherOptions::GetDrawColorizedConnectionsOnly ( ) const
inline

Returns whether connections that have not a color set via SetColor() should not be drawn.

Definition at line 169 of file grapherOptions.h.

bool VdfGrapherOptions::GetDrawMasks ( ) const
inline

Returns whether or not masks will be draw on the connections.

Definition at line 103 of file grapherOptions.h.

const NodeFilterCallback& VdfGrapherOptions::GetNodeFilterCallback ( ) const
inline

Returns the callback used to filter nodes out of the graph.

Definition at line 228 of file grapherOptions.h.

const NodeLimitVector& VdfGrapherOptions::GetNodesToGraph ( ) const
inline

Returns the list of nodes that should be graphed.

Definition at line 216 of file grapherOptions.h.

const NodeStyleCallback& VdfGrapherOptions::GetNodeStyleCallback ( ) const
inline

Returns the (optional) callback used to style nodes.

Definition at line 241 of file grapherOptions.h.

bool VdfGrapherOptions::GetOmitUnconnectedSpecs ( ) const
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.

double VdfGrapherOptions::GetPageHeight ( ) const
inline

Returns the page height

Definition at line 131 of file grapherOptions.h.

double VdfGrapherOptions::GetPageWidth ( ) const
inline

Returns the page width

Definition at line 135 of file grapherOptions.h.

bool VdfGrapherOptions::GetPrintSingleOutputs ( ) const
inline

Returns true, if skipping single outputs is enabled.

Definition at line 117 of file grapherOptions.h.

bool VdfGrapherOptions::GetUniqueIds ( ) const
inline

Returns whether or not the graph should use unique ids.

Definition at line 148 of file grapherOptions.h.

void VdfGrapherOptions::SetAnnotation ( const VdfObjectPtr object,
const std::string &  text 
)
inline

Sets an annotation text for object which gets rendered for the object.

Definition at line 203 of file grapherOptions.h.

void VdfGrapherOptions::SetColor ( const VdfObjectPtr object,
const TfToken color 
)
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.

void VdfGrapherOptions::SetDisplayStyle ( DisplayStyle  style)
inline

Sets the default display style for nodes.

Definition at line 259 of file grapherOptions.h.

void VdfGrapherOptions::SetDrawAffectsMasks ( bool  drawMasks)
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.

void VdfGrapherOptions::SetDrawColorizedConnectionsOnly ( bool  drawColorizedConnectionsOnly)
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.

void VdfGrapherOptions::SetDrawMasks ( bool  drawMasks)
inline

When drawMasks is true, the masks on the connections will be drawn.

Definition at line 93 of file grapherOptions.h.

void VdfGrapherOptions::SetNodeFilterCallback ( const NodeFilterCallback callback)
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.

void VdfGrapherOptions::SetNodeStyleCallback ( const NodeStyleCallback callback)
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.

void VdfGrapherOptions::SetOmitUnconnectedSpecs ( bool  omit)
inline

When omit is set, unconnected specs will be omitted.

Definition at line 152 of file grapherOptions.h.

void VdfGrapherOptions::SetPageSize ( double  width,
double  height 
)
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.

void VdfGrapherOptions::SetPrintSingleOutputs ( bool  enable)
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.

void VdfGrapherOptions::SetUniqueIds ( bool  uniqueIds)
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.


The documentation for this class was generated from the following file: