Thread: [Doxygen-users] char_varying type in VOS C and doxygen
Brought to you by:
dimitri
From: Uwe S. <u.s...@gm...> - 2015-01-22 12:48:00
|
Hi, I have a new issue to solve with doxygen: In VOS C there exists the type char_varying(n), where n is the number of characters of the variable. Basically, this type is nearly the same as a char array, but there exist some differences, especially regarding assignments[*]. A typical variable declaration looks like this: char_varying(10) foo; and a definition looks like this: char_varying(10) foo = "string"; where "10" is just an arbitrary choice for this example. Imagine this file is given: ---------------------- /** @file foo.c */ char_varying(256) var; main(){} ----------------------(1) Doxygen assumes that char_varying is a function here, but as said above, this is just the type, and var is the variable. The doxygen html output in this case is just: ---------------------- foo.c File Reference Functions char_varying (256) ----------------------(2) Is there any possibility to solve this somehow? What I tried already: MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES PREDEFINED = char_varying()= This leads to the following html output: ---------------------- foo.c File Reference Functions main () Variables var ----------------------(3) This is much better, but the type of "var" is missing now. What I would like to see here is: ---------------------- foo.c File Reference Functions main () Variables char_varying(256) var ----------------------(4) It would be great if someone can help me out here. Best wishes Uwe [*] Following the link below, you can find the char_varying documentation from Stratus http://stratadoc.stratus.com/vos/15.1.1/r040-02/wwhelp/wwhimpl/js/html/wwhelp.htm?context=r040-02&file=ch4r040-02ae.html |
From: Dimitri v. H. <do...@gm...> - 2015-01-23 19:56:14
|
Hi Uwe, You could use PREDEFINED = char_varying(n)="char_varying_##n" To expand char_varying(256) to char_varying_256 and then during post processing replace it back to char_varying(256). Regards, Dimitri > On 22 Jan 2015, at 13:47 , Uwe Scholz <u.s...@gm...> wrote: > > Hi, > > I have a new issue to solve with doxygen: In VOS C there exists the type > char_varying(n), where n is the number of characters of the variable. > Basically, this type is nearly the same as a char array, but there exist > some differences, especially regarding assignments[*]. > > A typical variable declaration looks like this: > char_varying(10) foo; > > and a definition looks like this: > char_varying(10) foo = "string"; > > where "10" is just an arbitrary choice for this example. > > Imagine this file is given: > ---------------------- > /** @file foo.c > */ > char_varying(256) var; > main(){} > ----------------------(1) > > Doxygen assumes that char_varying is a function here, but as said above, > this is just the type, and var is the variable. The doxygen html output > in this case is just: > ---------------------- > foo.c File Reference > Functions > char_varying (256) > ----------------------(2) > > Is there any possibility to solve this somehow? > > What I tried already: > > MACRO_EXPANSION = YES > EXPAND_ONLY_PREDEF = YES > PREDEFINED = char_varying()= > > This leads to the following html output: > ---------------------- > foo.c File Reference > Functions > main () > > Variables > var > ----------------------(3) > > This is much better, but the type of "var" is missing now. What I would > like to see here is: > ---------------------- > foo.c File Reference > Functions > main () > > Variables > char_varying(256) var > ----------------------(4) > > It would be great if someone can help me out here. > > Best wishes > Uwe > > [*] Following the link below, you can find the char_varying documentation > from Stratus > http://stratadoc.stratus.com/vos/15.1.1/r040-02/wwhelp/wwhimpl/js/html/wwhelp.htm?context=r040-02&file=ch4r040-02ae.html > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > Doxygen-users mailing list > Dox...@li... > https://lists.sourceforge.net/lists/listinfo/doxygen-users |
From: Uwe S. <u.s...@gm...> - 2015-01-24 16:32:35
|
Hi Dimitri, great, that looks good! I didn't know that one could parse the numbers in that way. Is this style documented somewhere? Thanks again for your quick help! @Ron, thank you, too! Your perl script looks also nice, maybe I'll need it in the future for other purposes. :) But Dmitri's one-liner solved this issue for me. Ciao, Uwe Dimitri van Heesch <do...@gm...> schrieb am [Fri, 23.01.2015 20:56]: > Hi Uwe, > > You could use > > PREDEFINED = char_varying(n)="char_varying_##n" > > To expand char_varying(256) to char_varying_256 and then during post processing replace it back to char_varying(256). > > Regards, > Dimitri > > > On 22 Jan 2015, at 13:47 , Uwe Scholz <u.s...@gm...> wrote: > > > > Imagine this file is given: > > ---------------------- > > /** @file foo.c > > */ > > char_varying(256) var; > > main(){} > > ----------------------(1) > > > > [...] > > > > What I tried already: > > > > MACRO_EXPANSION = YES > > EXPAND_ONLY_PREDEF = YES > > PREDEFINED = char_varying()= > > > > [...] What I would like to see here is: > > ---------------------- > > foo.c File Reference > > Functions > > main () > > > > Variables > > char_varying(256) var > > ----------------------(4) > > > > It would be great if someone can help me out here. > > > > Best wishes > > Uwe |
From: Dimitri v. H. <do...@gm...> - 2015-01-24 17:00:26
|
> On 24 Jan 2015, at 17:32 , Uwe Scholz <u.s...@gm...> wrote: > > Hi Dimitri, > > great, that looks good! I didn't know that one could parse the numbers > in that way. Is this style documented somewhere? It is a standard C preprocessor feature, see also https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html Regards, Dimitri |