 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sat Dec 30, 2006 10:10 am Post subject: How to read large C++ code? |
|
|
How to quickly read large C++ code with hundreds of classes, thousands
of lines?
Thanks.
Jack |
|
| Back to top |
|
 |
Noah Roberts Guest
|
Posted: Sat Dec 30, 2006 10:10 am Post subject: Re: How to read large C++ code? |
|
|
junw2000 (AT) gmail (DOT) com wrote:
| Quote: | How to quickly read large C++ code with hundreds of classes, thousands
of lines?
|
You don't. You read pieces of it. |
|
| Back to top |
|
 |
Rolf Magnus Guest
|
Posted: Sat Dec 30, 2006 10:10 am Post subject: Re: How to read large C++ code? |
|
|
junw2000 (AT) gmail (DOT) com wrote:
| Quote: | How to quickly read large C++ code with hundreds of classes, thousands
of lines?
|
Well, if by "read" you mean "understand" and it doesn't have any useful
documentation, running doxygen over it with everything switched on in the
Doxyfile generates a good overview to get a start. |
|
| Back to top |
|
 |
Rolf Magnus Guest
|
Posted: Sun Dec 31, 2006 10:10 am Post subject: Re: How to read large C++ code? |
|
|
junw2000 (AT) gmail (DOT) com wrote:
| Quote: |
Rolf Magnus wrote:
junw2000 (AT) gmail (DOT) com wrote:
How to quickly read large C++ code with hundreds of classes, thousands
of lines?
Well, if by "read" you mean "understand" and it doesn't have any useful
documentation, running doxygen over it with everything switched on in the
Doxyfile generates a good overview to get a start.
Thanks. It seems to me that doxygen extracts the comments from the code
to generate a document about the code. But if the code is not well
commented, what will be generated by doxygen?
|
I think by default nothing. But you can toggle a switch in the Doxyfile to
still generate the documentation. It gives you lists of classes an
namespaces, inheritance hierarchy, and for every class a list of its
members. It can generate call graphs, collaboration diagrams and more if
you also insall the graphviz package. There is still plenty of information
doxygen can get, even if the code doesn't have proper comments.
| Quote: | Certainly, I need not understand each line of the large C++ code. For
some parts of the C++ code, I need to understand each line.
|
Doxygen can also be configured to include the source code of a function in
its documentation.
| Quote: | For the
rest, I need to understand the structure and logic of it. Generally,
what is the best way to do it?
|
I still think doxygen is a good start in such a situation. Just give it a
try. |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Dec 31, 2006 10:11 am Post subject: Re: How to read large C++ code? |
|
|
Rolf Magnus wrote:
| Quote: | junw2000 (AT) gmail (DOT) com wrote:
How to quickly read large C++ code with hundreds of classes, thousands
of lines?
Well, if by "read" you mean "understand" and it doesn't have any useful
documentation, running doxygen over it with everything switched on in the
Doxyfile generates a good overview to get a start.
|
Thanks. It seems to me that doxygen extracts the comments from the code
to generate a document about the code. But if the code is not well
commented, what will be generated by doxygen?
Certainly, I need not understand each line of the large C++ code. For
some parts of the C++ code, I need to understand each line. For the
rest, I need to understand the structure and logic of it. Generally,
what is the best way to do it?
Jack |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Jan 01, 2007 5:49 am Post subject: Re: How to read large C++ code? |
|
|
Rolf Magnus wrote:
| Quote: | junw2000 (AT) gmail (DOT) com wrote:
Rolf Magnus wrote:
junw2000 (AT) gmail (DOT) com wrote:
How to quickly read large C++ code with hundreds of classes, thousands
of lines?
Well, if by "read" you mean "understand" and it doesn't have any useful
documentation, running doxygen over it with everything switched on in the
Doxyfile generates a good overview to get a start.
Thanks. It seems to me that doxygen extracts the comments from the code
to generate a document about the code. But if the code is not well
commented, what will be generated by doxygen?
I think by default nothing. But you can toggle a switch in the Doxyfile to
still generate the documentation. It gives you lists of classes an
namespaces, inheritance hierarchy, and for every class a list of its
members. It can generate call graphs, collaboration diagrams and more if
you also insall the graphviz package. There is still plenty of information
doxygen can get, even if the code doesn't have proper comments.
Certainly, I need not understand each line of the large C++ code. For
some parts of the C++ code, I need to understand each line.
Doxygen can also be configured to include the source code of a function in
its documentation.
For the
rest, I need to understand the structure and logic of it. Generally,
what is the best way to do it?
|
| Quote: | I still think doxygen is a good start in such a situation. Just give it a
try.
|
Thanks a lot. I will try it.
By the way, is there any commercial software that can do the same
thing?
Jack |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|