My compiler has issued warnings when i try to use doxygen with my cpp file. See below. What must i change to suit the doxygen? Your help is much appreciated.
/home/user/cpplab4/list.cpp:33: warning: documented symbol `CS150::list::list' was not declared or defined.
/home/user/cpplab4/list.cpp:46: warning: documented symbol `node * CS150::list::make_node' was not declared or defined.
/****************************************************************/
/*!
* \class CS150
* \brief namespace
*
*/
/****************************************************************/
/**********************************************************************/
/*!
* \class CS150::list()
* \brief initialise the_list, constructor
*/
/**********************************************************************/
list::list()
{
the_list = nullptr;
list_size =0;
}
/**********************************************************************/
/*!
* \class CS150::node *list::make_node(int val)
* \brief Allocate memory and set members.
* \param val to be placed in new node
* \return return node
*/
/*********************************************************************/
node *list::make_node(int val)
{
node *pnode = new node;
pnode->value = val;
pnode->next = nullptr;
return pnode;
}
Your comments say the following:
\\class CS150
"There is a class called CS150
."
\\class CS150::list()
"There is a class called CS150::list()
.".
\\class CS150::node *list::make_node(int val)
"There is a class called CS150::node *list::make_node(int val)
".
None of these statements is true, and it's really confusing Doxygen. It looks like you are trying to document everything (including a namespace?) with the command \\class
. But that command is for, well, classes.
I think you probably meant \\class list
in that first block (though this doesn't appear to serve any purpose), and all the others should be removed: Doxygen knows which function you're documenting and what it's called. There's no need and no way to tell it that.
So, for example, just:
/*!
* \brief Allocate memory and set members.
* \param val to be placed in new node
* \return return node
*/
node *list::make_node(int val)
{
node *pnode = new node;
pnode->value = val;
pnode->next = nullptr;
return pnode;
}
I recommend you go through the Doxygen documentation again for ideas on how best to use it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.