Page 1 of 1

@return keyword on doxygen comment

Posted: Wed Mar 18, 2009 1:22 pm
by denk_mal
Hi Eran,

i have tried to add the @return keyword to the doxygen function prefix but the result is not really what i want because
it stays above the @param keywords.

Can I change this in the settings or must this be done in the code?
(If so I will fill out a feature request of course)

it would also be nice if the @return keyword will only inserted if the function returns void

thanks
denk_mal

Re: @return keyword on doxygen comment

Posted: Wed Mar 18, 2009 2:06 pm
by eranif
Hi,

You dont need to modify the 'function prefix' since it will be added automatically by codelite.

here is an example of how it works:

Code: Select all

class MyClass
{
private:
	/**
	 * @brief
	 * @return
	 */
	bool isSomething();
	/**
	 * @brief
	 */
	void no_op();

	/**
	 * @brief
	 * @param name
	 */
	void with_param(wxString name);
	/**
	 * @brief
	 * @param name
	 * @return
	 */
	std::vector<int> return_with_param(wxString name);
};
The above comments were generated by codelite - and it seems that it does what you need
If it does not work like this for you, please send/paste here a code snippet and how to reproduce it

Thanks,
Eran

Re: @return keyword on doxygen comment

Posted: Wed Mar 18, 2009 3:03 pm
by denk_mal
Hi Eran,

I have tried it in the source file (*.cpp) and got the following:

Code: Select all

/**
 * @brief
 */
long customer_service::GetAllCustomers() const
{
...
}
after I saw your example I have tried in the headerfile and there it works as expected.

I have searched a little bit in the source of codelite and found out that the variables name and type in cpp_comment_creator.cpp line 80 are both empty (and therefore the @return keyword won't print out)
Does it came from the class prefix (customer_service::) in the source file ?

hth
denk_mal

Re: @return keyword on doxygen comment

Posted: Wed Mar 18, 2009 3:58 pm
by eranif
Ok, this seems like a bug, I will try to debug this example.

Eran

Re: @return keyword on doxygen comment

Posted: Wed Mar 18, 2009 4:59 pm
by eranif
I committed a fix for this in SVN trunk.

Eran

Re: @return keyword on doxygen comment

Posted: Wed Mar 18, 2009 5:20 pm
by denk_mal
Hi Eran,

thanks for the bugfix. I have tried it and it works (of couse ;) )

denk_mal