Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Does there exist a software solution of some form that has the ability to map out the actions of calling a function.

So what I mean is, let's say that we have the following class.

public class Foo
{
    public Foo()
    {
       if (this.SomeProperty)
       {
           DoSomething();
       }
    }

    private void DoSomething()
    {
        var Bar = new Bar();
        Bar.DoSomethingElse();
    }
}

public class Bar
{
    public void DoSomethingElse()
    {
        //call something else or whatever here.
    }
}

Would there be something that would generate a flow chart (or some kind of map of sorts) of this if I were to say, what does creating a Foo do?

I'm asking this because a large majority of our code base was written on the fly without any kinds of documentation, and I'm just trying to help map out some behavior and make sure that it is all understood.

share|improve this question

3 Answers 3

doxygen works well, for many different languages

From the web site:

tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, Tcl, and to some extent D.

Doxygen can help you in three ways:

  1. It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (in LaTeX) from a set of documented source files. There is also support for generating output in RTF (MS-Word), PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code.
  2. You can configure doxygen to extract the code structure from undocumented source files. This is very useful to quickly find your way in large source distributions. Doxygen can also visualize the relations between the various elements by means of include dependency graphs, inheritance diagrams, and collaboration diagrams, which are all generated automatically.
  3. You can also use doxygen for creating normal documentation (as I did for the doxygen user manual and web-site).

Doxygen is developed under Mac OS X and Linux, but... it runs on most other Unix flavors as well. Furthermore, executables for Windows are available....

share|improve this answer
    
And it's free! +1 –  Peter K. Jul 12 '11 at 9:19
1  
@gnat: an excellent edit, point taken –  Steven A. Lowe May 1 '13 at 0:30

You can check out NDepend http://www.ndepend.com not exactly what you want but close. A good help to diving into complex systems.

NDepend gives you a way to analyze dependencies using graphs and matrixes. It also has a lot of metrics prebuilt and you can also use Linq to make code queries.

share|improve this answer

I haven't used it extensively yet, however it appears that UModel from Altova will do just that. I have created some of these diagrams myself automatically from code with the trial version of this application.

I ended up purchasing the tool based on my trial experience and it seems to be the right tool for me since it automates much of the diagram building.

share|improve this answer
    
To append to my answer, I ended up purchasing this product based on my trial experience and it seems to be the right tool for me since it automates much of the diagram building. –  Rig Jul 17 '11 at 15:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.