How to inline sourcecode with doxygenHow to generate rdoc-style collapsable code sections?Any software to auto generate doxygen comment blocks?How to control order of doxygen documentation sections?Exporting package-level Python symbols in Doxygendoxygen - documentation after members (///<) does not workJavadoc tag @link with Doxygen : unable to resolve linkInsert link to function in another file with Doxygen?Forcing Doxygen (C) to warn if macros or enums are undocumentedCustom Doxygen permalinks to c++ functionsDoxygen and assembler source files with separate documentation headers

Building a road to escape Earth's gravity by making a pyramid on Antartica

What happened to all the nuclear material being smuggled after the fall of the USSR?

What does it mean by "d-ism of Leibniz" and "dotage of Newton" in simple English?

Shrink exponential fraction argument

correct term describing the action of sending a brand-new ship out into its first seafaring trip

What happens to foam insulation board after you pour concrete slab?

Why do guitarists wave their guitars?

Is the decompression of compressed and encrypted data without decryption also theoretically impossible?

Is it a problem that pull requests are approved without any comments

What's the logic behind the the organization of Hamburg's bus transport into "rings"?

How to pass a regex when finding a directory path in bash?

Do adult Russians normally hand-write Cyrillic as cursive or as block letters?

Short story written from alien perspective with this line: "It's too bright to look at, so they don't"

Why is c4 bad when playing the London against a King's Indian?

Why is Colorado so different politically from nearby states?

How to split a string in two substrings of same length using bash?

In this example, which path would a monster affected by the Dissonant Whispers spell take?

If Boris Johnson were prosecuted and convicted of lying about Brexit, can that be used to cancel Brexit?

Opposite of "Squeaky wheel gets the grease"

Do manufacturers try make their components as close to ideal ones as possible?

Who operates delivery flights for commercial airlines?

Will TSA allow me to carry a Continuous Positive Airway Pressure (CPAP) device?

Responsibility for visa checking

Chopin: marche funèbre bar 15 impossible place



How to inline sourcecode with doxygen


How to generate rdoc-style collapsable code sections?Any software to auto generate doxygen comment blocks?How to control order of doxygen documentation sections?Exporting package-level Python symbols in Doxygendoxygen - documentation after members (///<) does not workJavadoc tag @link with Doxygen : unable to resolve linkInsert link to function in another file with Doxygen?Forcing Doxygen (C) to warn if macros or enums are undocumentedCustom Doxygen permalinks to c++ functionsDoxygen and assembler source files with separate documentation headers






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I wanted to document a Fortran module containing functions with doxygen.



My problem is, that I can't find a way to include the body of my functions in the documentation of the functions. There is only a link to the position, but not the actual source code.



At the moment, my source code looks e.g. like this:



!> @brief Get a starting time.
!> @details Get an object with time information.
!> @return returns the time with high precision
FUNCTION get_start_time() RESULT(stime)
TYPE (time) :: stime

CALL SYSTEM_CLOCK(stime%count, stime%rate, stime%max)
END FUNCTION


My doxygen configuration (the SOURCES part) looks like this:



SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES


I also tried to use the @code and @endcode flags to mark the source, but this doesn't work, too.



What should I do, to get the source code directly to the documentation?




1st EDIT: I tried @cheeseminer's solution. So the code above now looks like



!> @brief Get a starting time.
!> @details Get an object with time information.
!> @return returns the time with high precision
!> @par Code
!> @snippet folder/file.F90 get_start_time
!! [get_start_time]
FUNCTION get_start_time() RESULT(stime)
TYPE (time) :: stime

CALL SYSTEM_CLOCK(stime%count, stime%rate, stime%max)
END FUNCTION
!! [get_start_time]


Unfortunately, the block-id commands (those with !! in front) appear in the documentation and/or the full source code. What is the correct way, to do this in Fortran?



Or is there a better way to solve my initial question?




2nd EDIT: I found a workaround which hides the block-id. I wrapped them in an @internal command.



!> @internal [get_start_time]



3rd EDIT: I'm now using @Michael's suggestion to include the block-id as HTML-Comment.



!> <!-- [get_start_time] -->



4th EDIT: I posted a follow-up question concerning aliases.










share|improve this question
























  • I've not doxygenned Fortran myself, but looking at the manual don't you need to use !> for the snippet marker lines - at least, for the second one. It does not seem to make sense to need the @internal.

    – Cheeseminer
    Jan 28 '14 at 13:31












  • Removing @internal and using !> to get !> [get_start_time], I get the text "[get_start_time]" in the documentation (twice), which is not favourable. The @internal hides these occurrences.

    – Stefan
    Jan 28 '14 at 14:15











  • Hmm, not favourable, I'd agree. I'm afraid I'm out of suggestions now.

    – Cheeseminer
    Jan 28 '14 at 14:22











  • don't use !>... just use a normal comment, doxygen will still find it

    – Michael
    Jan 29 '14 at 4:50











  • @Michael You are right that Doxygen will find it. But this way, the comments appear in the full source code listing, because they are not stripped by the option STRIP_CODE_COMMENTS.

    – Stefan
    Jan 29 '14 at 5:08

















1















I wanted to document a Fortran module containing functions with doxygen.



My problem is, that I can't find a way to include the body of my functions in the documentation of the functions. There is only a link to the position, but not the actual source code.



At the moment, my source code looks e.g. like this:



!> @brief Get a starting time.
!> @details Get an object with time information.
!> @return returns the time with high precision
FUNCTION get_start_time() RESULT(stime)
TYPE (time) :: stime

CALL SYSTEM_CLOCK(stime%count, stime%rate, stime%max)
END FUNCTION


My doxygen configuration (the SOURCES part) looks like this:



SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES


I also tried to use the @code and @endcode flags to mark the source, but this doesn't work, too.



What should I do, to get the source code directly to the documentation?




1st EDIT: I tried @cheeseminer's solution. So the code above now looks like



!> @brief Get a starting time.
!> @details Get an object with time information.
!> @return returns the time with high precision
!> @par Code
!> @snippet folder/file.F90 get_start_time
!! [get_start_time]
FUNCTION get_start_time() RESULT(stime)
TYPE (time) :: stime

CALL SYSTEM_CLOCK(stime%count, stime%rate, stime%max)
END FUNCTION
!! [get_start_time]


Unfortunately, the block-id commands (those with !! in front) appear in the documentation and/or the full source code. What is the correct way, to do this in Fortran?



Or is there a better way to solve my initial question?




2nd EDIT: I found a workaround which hides the block-id. I wrapped them in an @internal command.



!> @internal [get_start_time]



3rd EDIT: I'm now using @Michael's suggestion to include the block-id as HTML-Comment.



!> <!-- [get_start_time] -->



4th EDIT: I posted a follow-up question concerning aliases.










share|improve this question
























  • I've not doxygenned Fortran myself, but looking at the manual don't you need to use !> for the snippet marker lines - at least, for the second one. It does not seem to make sense to need the @internal.

    – Cheeseminer
    Jan 28 '14 at 13:31












  • Removing @internal and using !> to get !> [get_start_time], I get the text "[get_start_time]" in the documentation (twice), which is not favourable. The @internal hides these occurrences.

    – Stefan
    Jan 28 '14 at 14:15











  • Hmm, not favourable, I'd agree. I'm afraid I'm out of suggestions now.

    – Cheeseminer
    Jan 28 '14 at 14:22











  • don't use !>... just use a normal comment, doxygen will still find it

    – Michael
    Jan 29 '14 at 4:50











  • @Michael You are right that Doxygen will find it. But this way, the comments appear in the full source code listing, because they are not stripped by the option STRIP_CODE_COMMENTS.

    – Stefan
    Jan 29 '14 at 5:08













1












1








1


0






I wanted to document a Fortran module containing functions with doxygen.



My problem is, that I can't find a way to include the body of my functions in the documentation of the functions. There is only a link to the position, but not the actual source code.



At the moment, my source code looks e.g. like this:



!> @brief Get a starting time.
!> @details Get an object with time information.
!> @return returns the time with high precision
FUNCTION get_start_time() RESULT(stime)
TYPE (time) :: stime

CALL SYSTEM_CLOCK(stime%count, stime%rate, stime%max)
END FUNCTION


My doxygen configuration (the SOURCES part) looks like this:



SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES


I also tried to use the @code and @endcode flags to mark the source, but this doesn't work, too.



What should I do, to get the source code directly to the documentation?




1st EDIT: I tried @cheeseminer's solution. So the code above now looks like



!> @brief Get a starting time.
!> @details Get an object with time information.
!> @return returns the time with high precision
!> @par Code
!> @snippet folder/file.F90 get_start_time
!! [get_start_time]
FUNCTION get_start_time() RESULT(stime)
TYPE (time) :: stime

CALL SYSTEM_CLOCK(stime%count, stime%rate, stime%max)
END FUNCTION
!! [get_start_time]


Unfortunately, the block-id commands (those with !! in front) appear in the documentation and/or the full source code. What is the correct way, to do this in Fortran?



Or is there a better way to solve my initial question?




2nd EDIT: I found a workaround which hides the block-id. I wrapped them in an @internal command.



!> @internal [get_start_time]



3rd EDIT: I'm now using @Michael's suggestion to include the block-id as HTML-Comment.



!> <!-- [get_start_time] -->



4th EDIT: I posted a follow-up question concerning aliases.










share|improve this question
















I wanted to document a Fortran module containing functions with doxygen.



My problem is, that I can't find a way to include the body of my functions in the documentation of the functions. There is only a link to the position, but not the actual source code.



At the moment, my source code looks e.g. like this:



!> @brief Get a starting time.
!> @details Get an object with time information.
!> @return returns the time with high precision
FUNCTION get_start_time() RESULT(stime)
TYPE (time) :: stime

CALL SYSTEM_CLOCK(stime%count, stime%rate, stime%max)
END FUNCTION


My doxygen configuration (the SOURCES part) looks like this:



SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES


I also tried to use the @code and @endcode flags to mark the source, but this doesn't work, too.



What should I do, to get the source code directly to the documentation?




1st EDIT: I tried @cheeseminer's solution. So the code above now looks like



!> @brief Get a starting time.
!> @details Get an object with time information.
!> @return returns the time with high precision
!> @par Code
!> @snippet folder/file.F90 get_start_time
!! [get_start_time]
FUNCTION get_start_time() RESULT(stime)
TYPE (time) :: stime

CALL SYSTEM_CLOCK(stime%count, stime%rate, stime%max)
END FUNCTION
!! [get_start_time]


Unfortunately, the block-id commands (those with !! in front) appear in the documentation and/or the full source code. What is the correct way, to do this in Fortran?



Or is there a better way to solve my initial question?




2nd EDIT: I found a workaround which hides the block-id. I wrapped them in an @internal command.



!> @internal [get_start_time]



3rd EDIT: I'm now using @Michael's suggestion to include the block-id as HTML-Comment.



!> <!-- [get_start_time] -->



4th EDIT: I posted a follow-up question concerning aliases.







fortran doxygen






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 23 '17 at 10:25









Community

11




11










asked Jan 24 '14 at 14:24









StefanStefan

2,08011125




2,08011125












  • I've not doxygenned Fortran myself, but looking at the manual don't you need to use !> for the snippet marker lines - at least, for the second one. It does not seem to make sense to need the @internal.

    – Cheeseminer
    Jan 28 '14 at 13:31












  • Removing @internal and using !> to get !> [get_start_time], I get the text "[get_start_time]" in the documentation (twice), which is not favourable. The @internal hides these occurrences.

    – Stefan
    Jan 28 '14 at 14:15











  • Hmm, not favourable, I'd agree. I'm afraid I'm out of suggestions now.

    – Cheeseminer
    Jan 28 '14 at 14:22











  • don't use !>... just use a normal comment, doxygen will still find it

    – Michael
    Jan 29 '14 at 4:50











  • @Michael You are right that Doxygen will find it. But this way, the comments appear in the full source code listing, because they are not stripped by the option STRIP_CODE_COMMENTS.

    – Stefan
    Jan 29 '14 at 5:08

















  • I've not doxygenned Fortran myself, but looking at the manual don't you need to use !> for the snippet marker lines - at least, for the second one. It does not seem to make sense to need the @internal.

    – Cheeseminer
    Jan 28 '14 at 13:31












  • Removing @internal and using !> to get !> [get_start_time], I get the text "[get_start_time]" in the documentation (twice), which is not favourable. The @internal hides these occurrences.

    – Stefan
    Jan 28 '14 at 14:15











  • Hmm, not favourable, I'd agree. I'm afraid I'm out of suggestions now.

    – Cheeseminer
    Jan 28 '14 at 14:22











  • don't use !>... just use a normal comment, doxygen will still find it

    – Michael
    Jan 29 '14 at 4:50











  • @Michael You are right that Doxygen will find it. But this way, the comments appear in the full source code listing, because they are not stripped by the option STRIP_CODE_COMMENTS.

    – Stefan
    Jan 29 '14 at 5:08
















I've not doxygenned Fortran myself, but looking at the manual don't you need to use !> for the snippet marker lines - at least, for the second one. It does not seem to make sense to need the @internal.

– Cheeseminer
Jan 28 '14 at 13:31






I've not doxygenned Fortran myself, but looking at the manual don't you need to use !> for the snippet marker lines - at least, for the second one. It does not seem to make sense to need the @internal.

– Cheeseminer
Jan 28 '14 at 13:31














Removing @internal and using !> to get !> [get_start_time], I get the text "[get_start_time]" in the documentation (twice), which is not favourable. The @internal hides these occurrences.

– Stefan
Jan 28 '14 at 14:15





Removing @internal and using !> to get !> [get_start_time], I get the text "[get_start_time]" in the documentation (twice), which is not favourable. The @internal hides these occurrences.

– Stefan
Jan 28 '14 at 14:15













Hmm, not favourable, I'd agree. I'm afraid I'm out of suggestions now.

– Cheeseminer
Jan 28 '14 at 14:22





Hmm, not favourable, I'd agree. I'm afraid I'm out of suggestions now.

– Cheeseminer
Jan 28 '14 at 14:22













don't use !>... just use a normal comment, doxygen will still find it

– Michael
Jan 29 '14 at 4:50





don't use !>... just use a normal comment, doxygen will still find it

– Michael
Jan 29 '14 at 4:50













@Michael You are right that Doxygen will find it. But this way, the comments appear in the full source code listing, because they are not stripped by the option STRIP_CODE_COMMENTS.

– Stefan
Jan 29 '14 at 5:08





@Michael You are right that Doxygen will find it. But this way, the comments appear in the full source code listing, because they are not stripped by the option STRIP_CODE_COMMENTS.

– Stefan
Jan 29 '14 at 5:08












1 Answer
1






active

oldest

votes


















2














I think what you are looking for is @snippet. The relevant manual page is here. You'll need to provide a path to the 'example' code in the doxyfile too.



@code is more of a formatting command. If you have only a few short such sections you might be better to copy to code into the comment and use @code to format it, but if the code sample is liable to change then you probably should use snippet despite the clutter that it introduces into the source.






share|improve this answer

























  • Thanks for this first approach. Unfortunately, I have some problems with the block markers, which still appear either in the full source code, or the documentation part...

    – Stefan
    Jan 28 '14 at 12:46











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f21335076%2fhow-to-inline-sourcecode-with-doxygen%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














I think what you are looking for is @snippet. The relevant manual page is here. You'll need to provide a path to the 'example' code in the doxyfile too.



@code is more of a formatting command. If you have only a few short such sections you might be better to copy to code into the comment and use @code to format it, but if the code sample is liable to change then you probably should use snippet despite the clutter that it introduces into the source.






share|improve this answer

























  • Thanks for this first approach. Unfortunately, I have some problems with the block markers, which still appear either in the full source code, or the documentation part...

    – Stefan
    Jan 28 '14 at 12:46















2














I think what you are looking for is @snippet. The relevant manual page is here. You'll need to provide a path to the 'example' code in the doxyfile too.



@code is more of a formatting command. If you have only a few short such sections you might be better to copy to code into the comment and use @code to format it, but if the code sample is liable to change then you probably should use snippet despite the clutter that it introduces into the source.






share|improve this answer

























  • Thanks for this first approach. Unfortunately, I have some problems with the block markers, which still appear either in the full source code, or the documentation part...

    – Stefan
    Jan 28 '14 at 12:46













2












2








2







I think what you are looking for is @snippet. The relevant manual page is here. You'll need to provide a path to the 'example' code in the doxyfile too.



@code is more of a formatting command. If you have only a few short such sections you might be better to copy to code into the comment and use @code to format it, but if the code sample is liable to change then you probably should use snippet despite the clutter that it introduces into the source.






share|improve this answer















I think what you are looking for is @snippet. The relevant manual page is here. You'll need to provide a path to the 'example' code in the doxyfile too.



@code is more of a formatting command. If you have only a few short such sections you might be better to copy to code into the comment and use @code to format it, but if the code sample is liable to change then you probably should use snippet despite the clutter that it introduces into the source.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 24 at 13:13









albert

3,25231125




3,25231125










answered Jan 28 '14 at 11:29









CheeseminerCheeseminer

2,31211031




2,31211031












  • Thanks for this first approach. Unfortunately, I have some problems with the block markers, which still appear either in the full source code, or the documentation part...

    – Stefan
    Jan 28 '14 at 12:46

















  • Thanks for this first approach. Unfortunately, I have some problems with the block markers, which still appear either in the full source code, or the documentation part...

    – Stefan
    Jan 28 '14 at 12:46
















Thanks for this first approach. Unfortunately, I have some problems with the block markers, which still appear either in the full source code, or the documentation part...

– Stefan
Jan 28 '14 at 12:46





Thanks for this first approach. Unfortunately, I have some problems with the block markers, which still appear either in the full source code, or the documentation part...

– Stefan
Jan 28 '14 at 12:46



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f21335076%2fhow-to-inline-sourcecode-with-doxygen%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현