Package logilab :: Package common :: Module graph :: Class DotBackend
[frames] | no frames]

Class DotBackend

source code

object --+
         |
        DotBackend

Dot File backend.

Instance Methods
 
__init__(self, graphname, rankdir=None, size=None, ratio=None, charset='utf-8', renderer='dot', additionnal_param={})
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
emit(self, line)
Adds <line> to final output.
source code
 
emit_edge(self, name1, name2, **props)
emit an edge from <name1> to <name2>.
source code
 
emit_node(self, name, **props)
emit a node with given properties.
source code
 
generate(self, outputfile=None, dotfile=None)
Generates a graph file.
source code
 
get_source(self)
returns self._source
source code

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

Properties
  source
returns self._source

Inherited from object: __class__

Method Details

__init__(self, graphname, rankdir=None, size=None, ratio=None, charset='utf-8', renderer='dot', additionnal_param={})
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

emit_edge(self, name1, name2, **props)

source code 
emit an edge from <name1> to <name2>.
edge properties: see http://www.graphviz.org/doc/info/attrs.html

emit_node(self, name, **props)

source code 
emit a node with given properties.
node properties: see http://www.graphviz.org/doc/info/attrs.html

generate(self, outputfile=None, dotfile=None)

source code 
Generates a graph file.

:param outputfile: filename and path [defaults to graphname.png]
:param dotfile: filename and path [defaults to graphname.dot]

:rtype: str
:return: a path to the generated file


Property Details

source

returns self._source

Get Method:
get_source(self) - returns self._source