C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to read large C++ code?

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sat Dec 30, 2006 10:10 am    Post subject: How to read large C++ code? Reply with quote



How to quickly read large C++ code with hundreds of classes, thousands
of lines?
Thanks.

Jack
Back to top
Noah Roberts
Guest





PostPosted: Sat Dec 30, 2006 10:10 am    Post subject: Re: How to read large C++ code? Reply with quote



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





PostPosted: Sat Dec 30, 2006 10:10 am    Post subject: Re: How to read large C++ code? Reply with quote



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





PostPosted: Sun Dec 31, 2006 10:10 am    Post subject: Re: How to read large C++ code? Reply with quote

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






PostPosted: Sun Dec 31, 2006 10:11 am    Post subject: Re: How to read large C++ code? Reply with quote

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






PostPosted: Mon Jan 01, 2007 5:49 am    Post subject: Re: How to read large C++ code? Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.