Public Member Functions | Public Attributes
rqt_decision_graph.pydot.Graph Class Reference
Inheritance diagram for rqt_decision_graph.pydot.Graph:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def add_edge
def add_node
def add_subgraph
def del_edge
def del_node
def get_edge
def get_edge_defaults
def get_edge_list
def get_edges
def get_graph_defaults
def get_graph_type
def get_name
def get_next_sequence_number
def get_node
def get_node_defaults
def get_node_list
def get_nodes
def get_simplify
def get_strict
def get_subgraph
def get_subgraph_list
def get_subgraphs
def get_suppress_disconnected
def get_top_graph_type
def get_type
def set_edge_defaults
def set_graph_defaults
def set_name
def set_node_defaults
def set_parent_graph
def set_simplify
def set_strict
def set_suppress_disconnected
def set_type
def to_string

Public Attributes

 obj_dict

Detailed Description

Class representing a graph in Graphviz's dot language.

This class implements the methods to work on a representation
of a graph in Graphviz's dot language.

graph(graph_name='G', graph_type='digraph',
    strict=False, suppress_disconnected=False, attribute=value, ...)

graph_name:
    the graph's name
graph_type:
    can be 'graph' or 'digraph'
suppress_disconnected:
    defaults to False, which will remove from the
    graph any disconnected nodes.
simplify:
    if True it will avoid displaying equal edges, i.e.
    only one edge between two nodes. removing the
    duplicated ones.

All the attributes defined in the Graphviz dot language should
be supported.

Attributes can be set through the dynamically generated methods:

 set_[attribute name], i.e. set_size, set_fontname

or using the instance's attributes:

 Graph.obj_dict['attributes'][attribute name], i.e.

    graph_instance.obj_dict['attributes']['label']
    graph_instance.obj_dict['attributes']['fontname']

Definition at line 1042 of file pydot.py.


Constructor & Destructor Documentation

def rqt_decision_graph.pydot.Graph.__init__ (   self,
  graph_name = 'G',
  obj_dict = None,
  graph_type = 'digraph',
  strict = False,
  suppress_disconnected = False,
  simplify = False,
  attrs 
)

Definition at line 1078 of file pydot.py.


Member Function Documentation

def rqt_decision_graph.pydot.Graph.add_edge (   self,
  graph_edge 
)
Adds an edge object to the graph.

It takes a edge object as its only argument and returns
None.

Definition at line 1333 of file pydot.py.

def rqt_decision_graph.pydot.Graph.add_node (   self,
  graph_node 
)
Adds a node object to the graph.

It takes a node object as its only argument and returns
None.

Definition at line 1235 of file pydot.py.

def rqt_decision_graph.pydot.Graph.add_subgraph (   self,
  sgraph 
)
Adds an subgraph object to the graph.

It takes a subgraph object as its only argument and returns
None.

Definition at line 1452 of file pydot.py.

def rqt_decision_graph.pydot.Graph.del_edge (   self,
  src_or_list,
  dst = None,
  index = None 
)
Delete an edge from the graph.

Given an edge's (source, destination) node names all
matching edges(s) will be deleted if 'index' is not
specified or set to None.
If there are several matching edges and 'index' is
given, only the edge in that position will be deleted.

'index' should be an integer specifying the position
of the edge to delete. If index is larger than the
number of matching edges, no action is taken.

If edges are deleted it returns True. If no action
is taken it returns False.

Definition at line 1355 of file pydot.py.

def rqt_decision_graph.pydot.Graph.del_node (   self,
  name,
  index = None 
)
Delete a node from the graph.

Given a node's name all node(s) with that same name
will be deleted if 'index' is not specified or set
to None.
If there are several nodes with that same name and
'index' is given, only the node in that position
will be deleted.

'index' should be an integer specifying the position
of the node to delete. If index is larger than the
number of nodes with that name, no action is taken.

If nodes are deleted it returns True. If no action
is taken it returns False.

Definition at line 1257 of file pydot.py.

def rqt_decision_graph.pydot.Graph.get_edge (   self,
  src_or_list,
  dst = None 
)
Retrieved an edge from the graph.

Given an edge's source and destination the corresponding
Edge instance(s) will be returned.

If one or more edges exist with that source and destination
a list of Edge instances is returned.
An empty list is returned otherwise.

Definition at line 1395 of file pydot.py.

Definition at line 1150 of file pydot.py.

Get the list of Edge instances.

This method returns the list of Edge instances
composing the graph.

Definition at line 1434 of file pydot.py.

Definition at line 1431 of file pydot.py.

Definition at line 1127 of file pydot.py.

Definition at line 1111 of file pydot.py.

Get the graph's name.

Definition at line 1191 of file pydot.py.

Definition at line 1230 of file pydot.py.

def rqt_decision_graph.pydot.Graph.get_node (   self,
  name 
)
Retrieve a node from the graph.

Given a node's name the corresponding Node
instance will be returned.

If one or more nodes exist with that name a list of
Node instances is returned.
An empty list is returned otherwise.

Definition at line 1288 of file pydot.py.

Definition at line 1139 of file pydot.py.

Get the list of Node instances.

This method returns the list of Node instances
composing the graph.

Definition at line 1315 of file pydot.py.

Get the list of Node instances.

Definition at line 1310 of file pydot.py.

Get whether to simplify or not.

Refer to set_simplify for more information.

Definition at line 1168 of file pydot.py.

def rqt_decision_graph.pydot.Graph.get_strict (   self,
  val 
)
Get graph's 'strict' mode (True, False).

This option is only valid for top level graphs.

Definition at line 1204 of file pydot.py.

def rqt_decision_graph.pydot.Graph.get_subgraph (   self,
  name 
)
Retrieved a subgraph from the graph.

Given a subgraph's name the corresponding
Subgraph instance will be returned.

If one or more subgraphs exist with the same name, a list of
Subgraph instances is returned.
An empty list is returned otherwise.

Definition at line 1474 of file pydot.py.

Get the list of Subgraph instances.

This method returns the list of Subgraph instances
in the graph.

Definition at line 1499 of file pydot.py.

Definition at line 1496 of file pydot.py.

Get if suppress disconnected is set.

Refer to set_suppress_disconnected for more information.

Definition at line 1222 of file pydot.py.

Definition at line 1114 of file pydot.py.

Get the graph's type, 'graph' or 'digraph'.

Definition at line 1181 of file pydot.py.

Definition at line 1147 of file pydot.py.

Definition at line 1124 of file pydot.py.

def rqt_decision_graph.pydot.Graph.set_name (   self,
  graph_name 
)
Set the graph's name.

Definition at line 1186 of file pydot.py.

Definition at line 1136 of file pydot.py.

def rqt_decision_graph.pydot.Graph.set_parent_graph (   self,
  parent_graph 
)

Reimplemented from rqt_decision_graph.pydot.Common.

Definition at line 1517 of file pydot.py.

def rqt_decision_graph.pydot.Graph.set_simplify (   self,
  simplify 
)
Set whether to simplify or not.

If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.

Definition at line 1158 of file pydot.py.

def rqt_decision_graph.pydot.Graph.set_strict (   self,
  val 
)
Set graph to 'strict' mode.

This option is only valid for top level graphs.

Definition at line 1196 of file pydot.py.

Suppress disconnected nodes in the output graph.

This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.

Definition at line 1212 of file pydot.py.

def rqt_decision_graph.pydot.Graph.set_type (   self,
  graph_type 
)
Set the graph's type, 'graph' or 'digraph'.

Definition at line 1176 of file pydot.py.

Returns a string representation of the graph in dot language.

It will return the graph and all its subelements in string from.

Definition at line 1533 of file pydot.py.


Member Data Documentation

Reimplemented from rqt_decision_graph.pydot.Common.

Reimplemented in rqt_decision_graph.pydot.Dot.

Definition at line 1078 of file pydot.py.


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


rqt_decision_graph
Author(s):
autogenerated on Wed Aug 26 2015 11:16:47