File: read-graphviz.html

package info (click to toggle)
boost 1.32.0-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 93,952 kB
  • ctags: 128,458
  • sloc: cpp: 492,477; xml: 52,125; python: 13,519; ansic: 13,013; sh: 1,773; yacc: 853; makefile: 526; perl: 418; lex: 110; csh: 6
file content (102 lines) | stat: -rw-r--r-- 3,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102

<HTML>

<!--
  -- Copyright (c) Lie-Quan Lee and Jeremy Siek 2000, 2001
  --
  -- Permission to use, copy, modify, distribute and sell this software
  -- and its documentation for any purpose is hereby granted without fee,
  -- provided that the above copyright notice appears in all copies and
  -- that both that copyright notice and this permission notice appear
  -- in supporting documentation.  Silicon Graphics makes no
  -- representations about the suitability of this software for any
  -- purpose.  It is provided "as is" without express or implied warranty.
  -->
<Head>
<Title>Boost Graph Library: read graphviz</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" 
        ALINK="#ff0000"> 
<IMG SRC="../../../boost.png" 
     ALT="C++ Boost" width="277" height="86"> 

<BR Clear>

<H1><A NAME="sec:read-graphviz">
<TT>read_graphviz</TT>
</H1>

<pre>
(1)
void read_graphviz(const std::string& file, GraphvizDigraph& g);
(2)
void read_graphviz(FILE* file, GraphvizDigraph& g);
(3)
void read_graphviz(const std::string& file, GraphvizGraph& g);
(4)
void read_graphviz(FILE* file, GraphvizGraph& g);
</pre>

This is to read a file in AT&amp;T graphviz  format into a BGL graph. The
type of the BGL graph has to be either <tt>GraphvizDigraph</tt> or
<tt>GraphvizGraph</tt>. You need build the <tt>libbgl-viz.a</tt> library
and link the library into your program properly.

<H3>Where Defined</H3>

<P>
<a href="../../../boost/graph/graphviz.hpp"><TT>boost/graph/graphviz.hpp</TT></a>


<h3>How to build library <tt>libbgl-viz.a</tt></h3>
set <tt>CXX</tt> to be your compiler command. For example(in tcsh shell):
<pre>
setenv CXX "g++ -ftemplate-depth-100 -Wno-long-long"
</pre>
or (in bash shell):
<pre>
export CXX="g++ -ftemplate-depth-100 -Wno-long-long"
</pre>

Assume your boost top directory is <tt>boost_X_XX_X</tt>, then
<pre>
cd boost_X_XX_X/libs/graph/src
$CXX -I../../../ -I. -c *.cpp
ar -rc libbgl-viz.a *.o
ranlib libbgl-viz.a 
</pre>

Note that for some compilers, the process to build libraries is
slightly different. You should follow your compiler manual. For example,
to use Kuck and Associates C++ compiler to build the library:
<pre>
KCC +K0 --one_instantiation_per_object -I../../../ -I. -c *.cpp
KCC +K0 --one_instantiation_per_object -o libbgl-viz.a *.o
</pre>

<H3><A NAME="SECTION001330400000000000000">
Example</A>
</H3>

<P>
The example in <a
href="../example/graphviz.cpp"><TT>example/graphviz.cpp</TT></a>
demonstrates using the BGL read graphviz facilities.
</P>


<h3>See Also</h3>

<a href="./write-graphviz.html"><tt>write_graphviz</tt></a>


<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>

</BODY>
</HTML>