Class GraphViz
In: lib/graphviz/attrs.rb
lib/graphviz/edge.rb
lib/graphviz/node.rb
lib/graphviz/xml.rb
lib/graphviz.rb
Parent: Object

Copyright (C) 2004, 2005, 2006, 2007, 2008 Gregoire Lejeune <gregoire.lejeune@free.fr>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Methods

<<   []   []=   add_edge   add_graph   add_node   default   edge_count   name   new   node_count   options   output   save  

Included Modules

Constants

Classes and Modules

Class GraphViz::Attrs
Class GraphViz::Edge
Class GraphViz::Node
Class GraphViz::XML

Attributes

edge  [RW] 
node  [RW] 

Public Class methods

Change default options (:use, :path and :output)

Create a new graph object

Options :

  :output : Output format (Constants::FORMATS) (default : dot)
  :file : Output file name (default : none)
  :use : Program to use (Constants::PROGRAMS) (default : dot)
  :path : Program PATH
  :parent : Parent graph (default : none)
  :type : Graph type (Constants::GRAPHTYPE) (default : digraph)

Public Instance methods

Create an edge between the current cluster and the node or cluster oNode

Get the value of the graph attribut xAttrName

Set value xValue to the graph attribut xAttrName

Create a new edge

In:

  oNodeOne : First node (or node list)
  oNodeTwo : Second Node (or node list)
  *hOpt : Edge attributs

Create à new graph

In:

  xGraphName : Graph name
  *hOpt : Graph attributs

Create a new node

In:

  xNodeName : Name of the new node
  *hOpt : Node attributs

Return the GraphViz::Node object created

Get the number of edges

Get the graph name

Get the number of nodes

Generate the graph

Options :

  :output : Output format (Constants::FORMATS)
  :file : Output file name
  :use : Program to use (Constants::PROGRAMS)
  :path : Program PATH
save( *hOpt )

Alias for output

[Validate]