Package schrodinger :: Package application :: Package desmond :: Package antlr3 :: Module dottreegen :: Class DOTTreeGenerator
[hide private]
[frames] | no frames]

Class DOTTreeGenerator

object --+
         |
        DOTTreeGenerator

A utility class to generate DOT diagrams (graphviz) from arbitrary trees. You can pass in your own templates and can pass in any kind of tree or use Tree interface method.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
toDOT(self, tree, adaptor=None, treeST=_treeST, edgeST=_edgeST)
 
toDOTDefineNodes(self, tree, adaptor, treeST, knownNodes=None)
 
toDOTDefineEdges(self, tree, adaptor, treeST, edgeST)
 
getNodeST(self, adaptor, t)
 
getNodeNumber(self, t)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _treeST = stringtemplate3.StringTemplate(template= ("digraph {...
  _nodeST = stringtemplate3.StringTemplate(template= "$name$ [la...
  _edgeST = stringtemplate3.StringTemplate(template= "$parent$ -...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

Class Variable Details [hide private]

_treeST

Value:
stringtemplate3.StringTemplate(template= ("digraph {\n"+ "  ordering=o\
ut;\n"+ "  ranksep=.4;\n"+ "  node [shape=plaintext, fixedsize=true, f\
ontsize=11, fontname=\"Courier\",\n"+ "        width=.25, height=.25];\
\n"+ "  edge [arrowsize=.5]\n"+ "  $nodes$\n"+ "  $edges$\n"+ "}\n"))

_nodeST

Value:
stringtemplate3.StringTemplate(template= "$name$ [label=\"$text$\"];\n\
")

_edgeST

Value:
stringtemplate3.StringTemplate(template= "$parent$ -> $child$ // \"$pa\
rentText$\" -> \"$childText$\"\n")