Thread: [Doxygen-users] Making an Easy and fast readable C Library Manual reference.(TODO-Suggestions)
Brought to you by:
dimitri
From: Toni M. <ton...@wa...> - 2001-11-20 03:22:36
|
Well , First we should define what is "easy" and "fast readable" Manual. I'm now using doxigen for my C Library , and I want to achieve a Referenc= e=20 manual that looks like GLib and Gtk+ API reference Manual(=20 http://www.gtk.org/api/ ) I was been testing diferent doxigen features, and I think it is really=20 posible to do a nice API doc like Glib uses ( for C users) But I have detected some leaks in current features, in order to do a per= fect=20 API C reference manual. ------------------------------------------ 1) * hide Enum Values. 2) * hide Macro definitions body. ( and document them like functions ) 3) (Disable File List Section) If you are documenting a like "Object Oriented C code" is common use a co= uple=20 of source code files for each "object."=20 myobject.c myobject.h=20 But the final library usually have and unique header to include. By example mi lib has while developing the first release aprox 25 headers but only one is needed to use the lib. #include <mylibheader.h> and mylibheader.h contains the actual header files. #include <object1.h> #include <object2.h> ..... #include <object3.h> I want to say that I don't need a "File List" Section in the HTML Output = ,=20 and I can't disable it now. 4) Add an arbitrary header file per group Something like.. /** @addgroup myobject=20 * @mygroupheader mylibheader.h <<------=20 * @{ */ Well I'm making "Object" documentation one per group and the grouping feature runs OK. but I can't specify what's header's fi= le=20 needs this group. -------------------------------------- There are some other little things that can be added , but the most impor= tat=20 are the before explained. ( 1 and 2 for both ,C and C++ API reference man= uals) About other features, ALL are running OK and the feel and look of my manu= al=20 is olmost the same as GLib and Gtk manuals. ( only changing colors of=20 course..). I can search for some other features , If any developer ask me. Lots of Thanks. --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Toni Moreno Gim=E9nez =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Pje de las rosas n=BA 22 Vilassar de Mar=20 (Barcelona) Espa=F1a CP: 08340 ----------------- Tel:937598149 Tel: 699706656 ----------------- |
From: Carlo W. <ca...@al...> - 2001-11-20 05:00:09
|
On Tue, Nov 20, 2001 at 04:37:37AM +0100, Toni Moreno Giménez wrote: > 3) (Disable File List Section) > > If you are documenting a like "Object Oriented C code" is common use a couple > of source code files for each "object." > > myobject.c > myobject.h > > But the final library usually have and unique header to include. > By example mi lib has while developing the first release aprox 25 headers > > but only one is needed to use the lib. Same thing here, at least I should be able to hide heaader files that I explicitely NOT documented (didn't add a \file in). Doxygen now generates this page: Here is a list of all documented files with brief descriptions: libcw/bfd.h [code] libcw/buf2str.h [code] Definition of utility class buf2str libcw/char2str.h [code] Definition of utility class char2str libcw/class_alloc.h [code] libcw/class_channel.h [code] libcw/class_channel_set.h [code] libcw/class_continued_channel.h [code] libcw/class_debug.h [code] libcw/class_debug_string.h [code] libcw/class_fatal_channel.h [code] libcw/class_location.h [code] libcw/class_marker.h [code] libcw/control_flag.h [code] libcw/core_dump.h [code] libcw/cwprint.h [code] Definition of the utilities cwprint and cwprint_using libcw/debug.h [code] This is the main header file of libcwd libcw/debug_config.h [code] libcw/debugmalloc.h [code] libcw/demangle.h [code] libcw/enum_memblk_types.h [code] libcw/lockable_auto_ptr.h [code] libcw/macro_ForAllDebugChannels.h [code] libcw/macro_ForAllDebugObjects.h [code] libcw/macro_Libcwd_macros.h [code] libcw/max_label_len.h [code] libcw/pc_mangled_function_name.h [code] libcw/private_allocator.h [code] libcw/private_assert.h [code] libcw/private_debug_stack.h [code] libcw/private_internal_string.h [code] libcw/private_internal_stringstream.h [code] libcw/private_internal_vector.h [code] libcw/private_set_alloc_checking.h [code] libcw/private_threading.h [code] libcw/private_TSD.h [code] libcw/strerrno.h [code] libcw/sysd.h [code] libcw/type_info.h [code] while I only want the four documented ones to appear. The user NEVER has to #include any other. -- Carlo Wood <ca...@al...> |
From: Stephen G. <ste...@el...> - 2001-11-20 08:06:28
|
I always try to develop code as libraries and, for anything but the most trivial cases, also end up with one or two headers that the users of the library need to include and a whole bunch that are only used between compilation units within the library. This has held true whatever the more general style of coding (C++, "plain C", "Object-style C", whatever). In this situation, regardless of whether Doxygen is being used or not, I have found that the best answer is just to introduce some physical design into the setup. The one I start with looks like, for a library called "baz",: <my-work-area>/baz/ -- holds all the public headers and the top-level Makefile <my-work-area>/baz/m/ -- holds the dot-c, dot-cpp files (compilation units) AND the internal-use-only headers So in your example, all of the headers would be moved down into the m/ directory, except for the four you've identified as "documented ones". With this arrangement, before the introduction of Doxygen, there is already scope for doing Interesting Things - eg, if someone wants a pre-compiled set of all the libraries and the headers, a script can just collect all of the <my-work-area>/*/ directories - so long as it doesn't recurse any deeper it'll pick up only the public interface headers. And of course humans can do the same thing ("Which of these files should I be interested in?" "Just the ones in this directory"). You can also trim down some of those convoluted header names, such as "private_internal_xxxx.h" - this just becomes "m/xxxx.h". When you add Doxygen into the equation you then have a very simple task: just ask it to read all the headers in the <my-work-area>/baz/ directory. No need for special configuration directives to "hide headers that have been explicitly not documented". You can then start to get clever : Your public documentation has Doxygen's recursive input switched off. If you have a second config file with the recursion switched on and looking for the dot-c/dot-cpp files as well, bingo, nicely formatted documentation of the internals of the library for anyone who needs to maintain it :-) Regards, Stephen Goudge > -----Original Message----- > From: dox...@li...=20 > [mailto:dox...@li...] On=20 > Behalf Of Carlo Wood > Sent: 20 November 2001 05:00 > To: Toni Moreno Gim=E9nez > Cc: dox...@li...;=20 > dox...@li... > Subject: [Doxygen-develop] Re: [Doxygen-users] Making an Easy=20 > and fast readable C Library Manual reference.(TODO-Suggestions) >=20 >=20 > On Tue, Nov 20, 2001 at 04:37:37AM +0100, Toni Moreno Gim=E9nez wrote: > > 3) (Disable File List Section) > > > > If you are documenting a like "Object Oriented C code" is=20 > common use a=20 > > couple of source code files for each "object." > > > > myobject.c > > myobject.h > > > > But the final library usually have and unique header to include. By=20 > > example mi lib has while developing the first release aprox=20 > 25 headers > > > > but only one is needed to use the lib. >=20 > Same thing here, at least I should be able to hide heaader=20 > files that I explicitely NOT documented (didn't add a \file=20 > in). Doxygen now generates this page: >=20 > Here is a list of all documented files with brief=20 > descriptions: libcw/bfd.h [code] > libcw/buf2str.h [code] Definition of=20 > utility class buf2str > libcw/char2str.h [code] Definition of=20 > utility class char2str > libcw/class_alloc.h [code] > libcw/class_channel.h [code] > libcw/class_channel_set.h [code]=20 > libcw/class_continued_channel.h [code] libcw/class_debug.h=20 > [code] libcw/class_debug_string.h [code]=20 > libcw/class_fatal_channel.h [code] libcw/class_location.h=20 > [code] libcw/class_marker.h [code] libcw/control_flag.h=20 > [code] libcw/core_dump.h [code] > libcw/cwprint.h [code] Definition of=20 > the utilities cwprint and cwprint_using > libcw/debug.h [code] This is the main header=20 > file of libcwd > libcw/debug_config.h [code] > libcw/debugmalloc.h [code] > libcw/demangle.h [code] > libcw/enum_memblk_types.h [code] > libcw/lockable_auto_ptr.h [code]=20 > libcw/macro_ForAllDebugChannels.h [code]=20 > libcw/macro_ForAllDebugObjects.h [code]=20 > libcw/macro_Libcwd_macros.h [code] libcw/max_label_len.h=20 > [code] libcw/pc_mangled_function_name.h [code]=20 > libcw/private_allocator.h [code] libcw/private_assert.h=20 > [code] libcw/private_debug_stack.h [code]=20 > libcw/private_internal_string.h [code]=20 > libcw/private_internal_stringstream.h [code]=20 > libcw/private_internal_vector.h [code]=20 > libcw/private_set_alloc_checking.h [code]=20 > libcw/private_threading.h [code] libcw/private_TSD.h [code]=20 > libcw/strerrno.h [code] libcw/sysd.h [code] libcw/type_info.h [code] >=20 > while I only want the four documented ones to appear. > The user NEVER has to #include any other. >=20 > -- > Carlo Wood <ca...@al...> >=20 > _______________________________________________ > Doxygen-develop mailing list Dox...@li... > https://lists.sourceforge.net/lists/listinfo/doxygen-develop >=20 >=20 |
From: Toni M. <ton...@wa...> - 2001-11-20 18:09:16
|
> You can then start to get clever : Your public documentation has > Doxygen's recursive input switched off. If you have a second config fil= e > with the recursion switched on and looking for the dot-c/dot-cpp files > as well, bingo, nicely formatted documentation of the internals of the > library for anyone who needs to maintain it :-) I'm working on two config files. doxyfile.refman doxyfile.devel the first have switched off the recursive option. the input secction has = a=20 list of header files : INPUT =3D <myobject1.h> \ <myobject2.h> \ ... <myobjectX.h>=20 The second one ,recursive tag is switched on. When the reference manual are generated, secction FILES shows all=20 <myobjectX.h> , but the user should only include in your applications.=20 <mylib.h>. I can move files to adapt the documentation, because the doc tags are=20 written in <myobjectX.h>=20 ( and I think is a bad goal , to change architecture design features only= for=20 doxygen doc generation , Doxygen like a source code documentation tool ma= y=20 addapt to any design , I was been studing and working on my lib design fo= r 2=20 years and I will not change it , expecting for a perfect documentation) --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Toni Moreno Gim=E9nez =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Pje de las rosas n=BA 22 Vilassar de Mar=20 (Barcelona) Espa=F1a CP: 08340 |
From: Stephen G. <ste...@el...> - 2001-11-21 08:30:45
|
Ah, well, there we must part in our ways: I'm afraid that I firmly believe in restructuring my library architecture (both logical and physical) if that can help make things clearer. Over the 10-plus years that my own pet library has been in existence it has been restructured from top to toe at least three times :-) Nowadays, I do try to restrict the impact that such structuring has on the public interface, but I feel at liberty to modify the internals, or new material, at the drop of a hat. The single small item I happened to mention (using two levels of directory to separate public and private interface) was done years before I even started to use Doxygen: it just happens that that separation does make it easier to produce good docs - but pretty much the same result could be reached with more work on the configuration files (if one has the energy to do that). Having said that, I _am_ actively fiddling with another part of my physical design (relating to where/how to arrange examples) simply so that I _can_ get perfect documentation (hopefully whilst still keeping to my other goals regarding that code): if I ever manage that then it'll be put up for public ridicule^h^h^h^h^h^h^h^h acclaim :-) If the documentation were better, more people would use this library (they might even _want_ to use it) and I'd feel a fool if I prevented that because I'd been precious about my wonderful design :-) Regards, Stephen Goudge > -----Original Message----- > From: dox...@li...=20 > [mailto:dox...@li...] On Behalf=20 > Of Toni Moreno Gim=E9nez > Sent: 20 November 2001 18:24 > To: Stephen Goudge; dox...@li... > Subject: Re: [Doxygen-users] Making an Easy and fast readable=20 > C Library Manual reference.(TODO-Suggestions) <snip> >=20 > ( and I think is a bad goal , to change architecture design=20 > features only for=20 > doxygen doc generation , Doxygen like a source code=20 > documentation tool may=20 > addapt to any design , I was been studing and working on my=20 > lib design for 2=20 > years and I will not change it , expecting for a perfect=20 > documentation) >=20 >=20 >=20 > --=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Toni Moreno Gim=E9nez > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Pje de las rosas n=BA 22 > Vilassar de Mar=20 > (Barcelona) Espa=F1a > CP: 08340 |
From: Carlo W. <ca...@al...> - 2001-11-21 15:35:11
|
On Wed, Nov 21, 2001 at 08:30:31AM -0000, Stephen Goudge wrote: > might even _want_ to use it) and I'd feel a fool if I prevented that > because I'd been precious about my wonderful design :-) We're clearly not talking about the same. I tried to clearify that in a previous post, but failed apparently. All of my header files are user-level and all of them are needed by the user. All of them are documented. But just ONE needs to be included, because it includes all others. The "solution" of putting them in a separate directory simply doesn't work. This has nothing to do with doxygen *forcing* me to use a better design of my library; instead, doxygen is simply failing to deal with this kind of design and it would be a whole lot better when it was fixed to NOT speak about header files that are in the INPUT list but do NOT contain a \file command. Evenmore, it should never print a #include <suchafile.h> when it can see that this file is being included by a *documented* header file. In other words: header1.h : contains a \file entry and #include <header2.h> header2.h : does not contain a \file entry, but does define a documented function. The function of header2.h then should be documented with an #include <header1.h>, and there should not be any mention of header2.h anywhere. If someone wants header2.h to be mentioned in the File List, then they should add a \file entry. If then still they would like to see a #include <header1.h> then they'd add an explicit command to header2.h to achieve that (if at all possible). I hope you can see the logic in this. -- Carlo Wood <ca...@al...> |
From: Carlo W. <ca...@al...> - 2001-11-20 23:26:44
|
On Tue, Nov 20, 2001 at 08:06:24AM -0000, Stephen Goudge wrote: > So in your example, all of the headers would be moved down into the m/ > directory, except for the four you've identified as "documented ones". I tried the equivalent of just putting those four in the INPUT field. But that doesn't work: all those header files DO contain documentation, they just shouldn't be included by the user directly. I don't want them listed. If I do what you suggest I get this: ~/c++/libcw_branch-threading/src/libcwd/documentation>make doxygen doxygen.config /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:293 Warning: member `init' of class `debug_channels_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:333 Warning: member `init' of class `debug_objects_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:383 Warning: member `ST_uninit' of class `debug_objects_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:451 Warning: member `calculate_capacity' of class `debug_string_ct' cannot be found/home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:464 Warning: member `NS_internal_init' of class `debug_string_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:473 Warning: member `ST_internal_deinit' of class `debug_string_ct' cannot be found/home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:478 Warning: member `internal_assign' of class `debug_string_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:487 Warning: member `internal_append' of class `debug_string_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:496 Warning: member `internal_prepend' of class `debug_string_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:504 Warning: member `reserve' of class `debug_string_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:515 Warning: member `internal_swallow' of class `debug_string_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:525 Warning: member `push_margin' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:536 Warning: member `pop_margin' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:549 Warning: member `push_marker' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:559 Warning: member `pop_marker' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:572 Warning: no matching class member found for void start(LIBCWD_TSD_PARAM) /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:711 Warning: member `finish' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:832 Warning: member `fatal_finish' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:838 Warning: member `NS_init' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:942 Warning: member `~debug_ct' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1044 Warning: member `NS_initialize' of class `channel_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1122 Warning: member `NS_initialize' of class `fatal_channel_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1158 Warning: member `NS_initialize' of class `continued_channel_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1164 Warning: member `off' of class `channel_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1174 Warning: member `on' of class `channel_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1194 Warning: member `operator|' of class `channel_set_st' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1220 Warning: member `operator|' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1254 Warning: member `operator|' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debug.cc:1260 Warning: member `operator &' of class `debug_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debugmalloc.cc:1675 Warning: member `register_marker' of class `marker_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/debugmalloc.cc:1699 Warning: member `~marker_ct' of class `marker_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/bfd.cc:1149 Warning: member `M_pc_location' of class `location_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/bfd.cc:1312 Warning: member `clear' of class `location_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/bfd.cc:1325 Warning: member `location_ct' of class `location_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/bfd.cc:1340 Warning: member `move' of class `location_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/bfd.cc:1354 Warning: member `operator=' of class `location_ct' cannot be found /home/carlo/c++/libcw_branch-threading/src/libcwd/include/libcw/debug.h:163 Warning: reference to unknown section control_flags in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/include/libcw/debug.h:189 Warning: reference to unknown section control_flags in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/deallocation_pointer_validation.dox:3 Warning: link to unknown entity `enable_libcwd_magic' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/deallocation_pointer_validation.dox:3 Warning: reference to unknown section invisible in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/location.dox:3 Warning: link to unknown entity `enable_libcwd_libbfd' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/location.dox:3 Warning: link to unknown entity `enable_libcwd_location' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/location.dox:3 Warning: link to unknown entity `BFD' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/location.dox:3 Warning: link to unknown entity `enable_libcwd_location' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/location.dox:3 Warning: link to unknown entity `Debug_Channel_objects' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/location.dox:3 Warning: link to unknown entity `Allocated_memory_Overview' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/location.dox:3 Warning: link to unknown entity `libcw::debug::alloc_ct::location' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/preparation.dox:3 Warning: reference to unknown section configuration in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/reference.dox:1 Warning: reference to unknown section libcw::debug::debug_ct in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/reference.dox:1 Warning: reference to unknown section libcw::debug::channel_ct in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/reference.dox:1 Warning: reference to unknown section debug_ct_formatting in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/reference.dox:1 Warning: reference to unknown section control_flags in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/reference.dox:1 Warning: reference to unknown section ForAllDebugObjects in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/reference.dox:1 Warning: reference to unknown section ForAllDebugChannels in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/reference.dox:1 Warning: link to unknown entity `libcw::debug::check_configuration' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/documentation/reference.dox:1 Warning: link to unknown entity `libcw::debug::make_all_allocations_invisible_except' in the documentation of this entity! /home/carlo/c++/libcw_branch-threading/src/libcwd/demangle3.cc:15 Warning: reference to unknown section type_info_of in the documentation of this entity! In other words, the header ARE input files. -- Carlo Wood <ca...@al...> |