michaelrsweet / codedoc

Documentation generator for C/C++ code
https://www.msweet.org/codedoc
Apache License 2.0
48 stars 6 forks source link

Is it possible to customize the layout of the documentation? #21

Open mark-summerfield opened 3 days ago

mark-summerfield commented 3 days ago

For my docs I precede each definition with a comment which codedoc correctly displays. However, I never document parameters or return values separately, so I'd like to be able to drop these sections. Or at the least for them to be dropped if they are empty?

In essence all I want is: type name or function signature followed by the comments that precede them.

So, instead of, say,

commas

Populates s with n's digits plus grouping commas. s should be of size COMMA_I64_SIZE.

void commas(char *s, int64_t n);
Parameters
s
n

I just want:

void commas(char *s, int64_t n);

Populates s with n's digits plus grouping commas. s should be of size COMMA_I64_SIZE.
michaelrsweet commented 3 days ago

Currently there is no way to omit the arguments and return value sections in the documentation, or to customize the layout of the presentation. Generally speaking the current format is:

function

First paragraph of description in comments.

Parameters

Table of parameters and comments

Return value

Return value comment.

Description

Remainder of description in comments above the function declaration.

I can look at offering a way to customize the layout/presentation of functions/methods but I'm leery of adding too many options since my whole reason for writing codedoc was to have a simpler documentation tool than Doxygen, etc.

mark-summerfield commented 3 days ago

I understand about keeping it simple. This is a big attraction of codedoc. But for me I don't need the Parameters and Return Value sections. After all because use support quite a bit of markdown (plus @link ...@) just having Function and Description leaves me free to handle the Description how I like (while your tool does the heavy lifting of finding the functions, types, etc.:-)