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

#include <grapher.h>

Static Public Member Functions

Static API
static VDF_API void GraphToFile (const VdfNetwork &network, const std::string &filename)
 
static VDF_API void GraphToFile (const VdfNetwork &network, const std::string &filename, const VdfGrapherOptions &options)
 
static VDF_API void GraphToTemporaryFile (const VdfNetwork &network, const VdfGrapherOptions &options)
 
static VDF_API void GraphNodeNeighborhood (const VdfNode &node, int maxInDepth, int maxOutDepth, const std::vector< std::string > &exclude=std::vector< std::string >())
 
static VDF_API std::vector
< const VdfNode * > 
GetNodesNamed (const VdfNetwork &network, const std::string &name)
 
static VDF_API std::string GetDotCommand (const std::string &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");

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

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

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

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

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

static VDF_API void VdfGrapher::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.

static VDF_API void VdfGrapher::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.

static VDF_API void VdfGrapher::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.

static VDF_API void VdfGrapher::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: