Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fast sketching tools for drawing C/C++ structs, pointers, etc

I would like to know what do you use to sketch relations between different entities in C/C++. This can be a very broad issue, so I'll try to clarify a bit more my question and give an example.

I'm looking for something that is simple enough as a user, and let me sketch easily containers, pointers, etc... in an informal way. The aim is to document some structs relations to pass them to junior developers. A look at the drawings is supposed to accelerate the understanding of the code.

My solutions at this moment are to use:

1) Paper & pencil. 2) Microsoft PowerPoint/Word Autoshapes. 3) Freeware Dia.

Other ones could be:

4) Microsoft Visio, but my company does not own licenses. 5) UML tools. I don't want to go this way. This is what I mean a more formal solution. I know tools like Rational Rose are xxx, and I tried boUML and violet and they are fine in some parts, but I prefer the flexibility of options 1), 2) or 3).

Finally, let me write down a more concrete example:

Let's say I what to sketch a map that contains another map as the mapped value, and that one contains a struct as the mapped value, that holds a vector of pointers of a type and a pointer to other type. Also, there exist other structs that hold pointers to the objects pointed by the previous map, so there are objects pointed from different places.

This is just one example I have, but you can easily come with one from you experience.

What would you use to sketch this example or another similar you have dealt with?

Best regards, Tomas.

like image 213
nephewtom Avatar asked May 03 '10 15:05

nephewtom


4 Answers

Visio is great for quickly creating these types of illustrations / diagrams. I recommend at least trying to get your company to purchase a license.

If Visio is truly not an option for you, the next step may be to consider Open Source alternatives to Visio.

like image 159
Justin Ethier Avatar answered Oct 24 '22 00:10

Justin Ethier


I have two things I use.

  1. My whiteboard. Whiteboards are really tough to beat for diagramming something quickly.
  2. UMLPad. It's small, so it doesn't have a ton of unrelated features to deal with, it is targeted to UML diagrams, and it is GPL.
like image 36
T.E.D. Avatar answered Oct 24 '22 01:10

T.E.D.


For design issues, involving thoughts by a good many people, we've used "Post-It Design". The idea is simple:

  • Pick a whiteboard
  • Represent an entity as a Post-It (name + some comments)
  • Draw the relationships on the white board moving the post-its around as required

And when you're done ? Photo of the whole thing for perenity emailed to the persons involved :)

It may seem artisanal but it really remind me of the paper design approach to GUIs.

like image 37
Matthieu M. Avatar answered Oct 24 '22 01:10

Matthieu M.


Have you tried Google Doc's Drawing? The link is one of the diagrams I've done with it.

like image 24
Xavier Ho Avatar answered Oct 24 '22 02:10

Xavier Ho