Loading...
Searching...
No Matches
VdfGrapher Class Reference

This class is used to produce printable graphs of Vdf networks. More...

#include <grapher.h>

Static Public Member Functions

Static API
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 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 void GraphToTemporaryFile (const VdfNetwork &network, const VdfGrapherOptions &options)
 Produces a graph of the given network and writes it to a temporary file.
 
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 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.
 

Detailed Description

This class is used to produce printable graphs of Vdf networks.

The simplest way to use this class is to use the convenient static methods:

C++ Code Sample

VdfGrapher::GraphToFile(network, "filename.dot");
static VDF_API void GraphToFile(const VdfNetwork &network, const std::string &filename)
Produces a graph of the given network and writes it to filename.

Note: The command to be used for generating graphs should be:

dot -Gsize=80,80 -Gpage=95,95 -Tps <in.dot> | epstopdf --filter -o <out.pdf>

For viewing use:

acroread <out.pdf>

Definition at line 52 of file grapher.h.

Member Function Documentation

◆ GetDotCommand()

static VDF_API std::string GetDotCommand ( const std::string &  dotFileName)
static

Returns a string that represents a shell command that will view the file dotFileName.

◆ GetNodesNamed()

static VDF_API std::vector< const VdfNode * > GetNodesNamed ( const VdfNetwork network,
const std::string &  name 
)
static

Returns the list of all registered nodes in the given network with the given name.

◆ GraphNodeNeighborhood()

static VDF_API void GraphNodeNeighborhood ( const VdfNode node,
int  maxInDepth,
int  maxOutDepth,
const std::vector< std::string > &  exclude = std::vector< std::string >() 
)
static

Produces a graph in the neighborhood of node.

◆ GraphToFile() [1/2]

static VDF_API void GraphToFile ( const VdfNetwork network,
const std::string &  filename 
)
static

Produces a graph of the given network and writes it to filename.

Uses the default grapher options.

◆ GraphToFile() [2/2]

static VDF_API void GraphToFile ( const VdfNetwork network,
const std::string &  filename,
const VdfGrapherOptions options 
)
static

Produces a graph of the given network and writes it to filename.

The given options are used to configure the output.

◆ GraphToTemporaryFile()

static VDF_API void GraphToTemporaryFile ( const VdfNetwork network,
const VdfGrapherOptions options 
)
static

Produces a graph of the given network and writes it to a temporary file.

The given options are used to configure the output.


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