Loading...
Searching...
No Matches
grapher.h
Go to the documentation of this file.
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_EXEC_VDF_GRAPHER_H
8#define PXR_EXEC_VDF_GRAPHER_H
9
11
12#include "pxr/pxr.h"
13
14#include "pxr/exec/vdf/api.h"
15#include "pxr/exec/vdf/types.h"
16
17#include <string>
18#include <vector>
19
20PXR_NAMESPACE_OPEN_SCOPE
21
23class VdfNetwork;
24class VdfNode;
25
53{
54public:
55
58
63 VDF_API
64 static void GraphToFile(const VdfNetwork &network,
65 const std::string &filename);
66
71 VDF_API
72 static void GraphToFile(const VdfNetwork &network,
73 const std::string &filename,
74 const VdfGrapherOptions &options);
75
81 VDF_API
82 static void GraphToTemporaryFile(const VdfNetwork &network,
83 const VdfGrapherOptions &options);
84
87 VDF_API
89 const VdfNode &node,
90 int maxInDepth, int maxOutDepth,
91 const std::vector<std::string> &exclude = std::vector<std::string>());
92
96 VDF_API
97 static std::vector<const VdfNode *> GetNodesNamed(
98 const VdfNetwork &network,
99 const std::string &name);
100
101
105 VDF_API
106 static std::string GetDotCommand(const std::string &dotFileName);
107
108
110
111};
112
114
115PXR_NAMESPACE_CLOSE_SCOPE
116
117#endif
This class is used to produce printable graphs of Vdf networks.
Definition: grapher.h:53
static VDF_API void GraphToFile(const VdfNetwork &network, const std::string &filename, const VdfGrapherOptions &options)
Produces a graph of the given network and writes it to filename.
static VDF_API std::vector< const VdfNode * > GetNodesNamed(const VdfNetwork &network, const std::string &name)
Returns the list of all registered nodes in the given network with the given name.
static VDF_API std::string GetDotCommand(const std::string &dotFileName)
Returns a string that represents a shell command that will view the file dotFileName.
static VDF_API void GraphNodeNeighborhood(const VdfNode &node, int maxInDepth, int maxOutDepth, const std::vector< std::string > &exclude=std::vector< std::string >())
Produces a graph in the neighborhood of node.
static VDF_API void GraphToFile(const VdfNetwork &network, const std::string &filename)
Produces a graph of the given network and writes it to filename.
static VDF_API void GraphToTemporaryFile(const VdfNetwork &network, const VdfGrapherOptions &options)
Produces a graph of the given network and writes it to a temporary file.
This class can be used to configure aspects of VdfGrapher's output.
A VdfNetwork is a collection of VdfNodes and their connections.
Definition: network.h:60
This is the base class for all nodes in a VdfNetwork.
Definition: node.h:53