Posted By

benjamin on 10/29/09


Tagged

class c dependency cpp graph dot graphviz


Versions (?)

Class Dependency Graphs for C++


 / Published in: Bash
 

URL: http://www.myoutsourcedbrain.com/2009/08/mex-function-for-mahalanobis-function.html

bash 3-line shell script for visualization of c++ class dependencies with graphviz. Please see my blog post for details and leave comments there.

  1. echo "digraph G {"> diagram.dot
  2. sed -n -e "s/class [ ]*\([a-zA-Z0-9_]*\)[ ]*:[ ]*public [ ]*\([a-zA-Z0-9_]*\)[ ]*[{][ ]*/\1 -> \2 ;/p" *.h >> diagram.dot
  3. echo "}" >> diagram.dot

Report this snippet  

You need to login to post a comment.