tomaz / appledoc

Objective-c code Apple style documentation set generator.
http://gentlebytes.com
4.19k stars 644 forks source link

How do I group functions? #658

Closed MarcusJohnson91 closed 2 years ago

MarcusJohnson91 commented 2 years ago

Let's say I have four functions that differ only in the type they accept for _Generic in C.

/*!
 @abstract                                    Sums an array from whatever position the start pointer is to that + NumElements2Sum.
 @param       Array2Sum                       Where to start the sumation.
 @param       NumElements2Sum                 How many elements to sum.
 @return                                      Returns the sum of the array.
 */
size_t        Sum8(uint8_t *Array2Sum, size_t NumElements2Sum);
size_t        Sum16(uint16_t *Array2Sum, size_t NumElements2Sum);
size_t        Sum32(uint32_t *Array2Sum, size_t NumElements2Sum);
size_t        Sum64(uint64_t *Array2Sum, size_t NumElements2Sum);

How an I write one comment via AppleDoc that will show the same comment in Xcode when I Option click any of those functions Sum8/16/32/64, without having to copy the same doc comment in front of each function?

I'm not entirely sure, but it seems like Doxygen supports this with: ///@{ and ///@}, but AppleDoc doesn't seem to have any kind of syntax for this feature?

like the obvious syntax is: /* @{ */ and /* @} */

tomaz commented 2 years ago

I'm not 100% - it's been many years since I last worked on the codebase. But I'm pretty sure this feature is available, I can see @name tags beeing used in appledoc sources, so probably that's how. If not sure take a look at the code - I used it in a sort of dogfooding fashion to test the output.