【发布时间】:2023-03-18 05:59:01
【问题描述】:
我正在尝试在下面的 c++ 中获取这个简单的类结构,以生成正确的 doxygen html 文件。我正在使用 codeblocks 13.12 的提取文档来生成 doxyfile。比我在代码块中使用 doxywizard 功能来调用 macport 的 doxygen 版本 1.8.7。每次我生成一个 doxygen html 输出时,class Rider 中的 new_instance 方法都会丢失。有没有办法来解决这个问题?我是不是做错了什么?
class cowboy /** a class to store and utilize horses */
{
public:
virtual ~cowboy() {}
int horse; /**< an integer that counts the number of horses the cowboy owns */
/** @brief prints the number of horses
*
*/
void print()
{
std::cout<< "I ride a horse and own " << horse << " horses.\n";
}
/** \brief creates a new instance of cowboy
*
* \return cowboy* the location the new instance of cowboy is stored
*
*/
virtual cowboy* new_instance() //operates with factory
{
return new cowboy;
}
};
class rider: public cowboy /**an object that also owns horses but is not as cool as a cowboy */
{
/** @brief creates a new instance of rider as a cowboy pointer
*
* @return cowboy* the location the new instance of rider is stored
*
*/
cowboy* new_instance()
{
return new rider;
}
};
可能有帮助的其他信息。我拥有的代码块版本是 32 位应用程序,您可以直接从代码块的网站下载。操作系统是 Mountain Lion,以防此问题特定于该版本的操作系统。
【问题讨论】: