Doxygen 未显示 public,非静态成员函数
Doxygen not showing the public, non-static member function
我一直在努力让下面的代码摘录文档与 doxygen
一起正确显示。
我已经在网上搜索了这个问题;然而,似乎文档未显示主要是由于成员 function/variable 是私有的。尽管我似乎正在记录一个 public 成员函数,它也是非静态的,但我无法使 doxygen
正常工作。如果您能提供任何帮助,我将不胜感激。
/**
* @brief Algorithm abstraction.
*
* @tparam float_t `float` or `double`.
* @tparam int_t `int64_t` or similar.
* @tparam StepPolicy Policy for selecting a step-size.
* @tparam OraclePolicy Policy for getting first-order information.
*/
template <class float_t, class int_t, template <class, class> class StepPolicy,
template <class, class> class OraclePolicy>
struct Algorithm : public StepPolicy<float_t, int_t>,
public OraclePolicy<float_t, int_t> {
/**
* @brief Default constructor.
*
*/
Algorithm() = default;
/**
* @brief Constructor with a step-size.
*
* @param[in] step Non-negative step-size value.
*/
Algorithm(float_t step) : StepPolicy<float_t, int_t>{step} {}
/**
* @brief Set the initial step-size of the algorithm.
*
* @param[in] step Non-negative step-size value.
*/
void set_stepsize(float_t step) { StepPolicy<float_t, int_t>::set(step); }
/**
* @brief Get the current step-size of the algorithm.
*
* This does *not* change the state of StepPolicy.
*
* @return float_t Current step-size.
*/
float_t get_stepsize() const { return StepPolicy<float_t, int_t>::get(); }
/**
* @brief Get current step-size based on the algorithm's state.
*
* @param[in] k Current iteration count.
* @param[in] N Dimension of `x` and `dx`.
* @param[in] x Current decision vector.
* @param[in] dx Current first-order information.
* @return float_t Current step-size.
*/
float_t get_stepsize(const int_t k, const int_t N, const float_t *x,
const float_t *dx) {
return StepPolicy<float_t, int_t>::get(k, N, x, dx);
}
private:
int_t k{0};
};
我不确定doxygen
是否与有效代码摘录有关,但上面的代码确实可以编译。它与模板和继承有什么关系吗?我错过了什么吗?我的意思是,对于非继承模板 类,doxygen
可以完成它的工作。
顺便说一句,我的目录中没有任何具体的 StepPolicy
或 OraclePolicy
。此外,我可以看到构造函数得到了正确的记录。我只是卡住了。
我可以在这里分享我的 Doxygen
文件,它基本上只是 MathJax
相关设置中覆盖的默认值。
预先感谢您的宝贵时间。
从v1.8.14
开始,就没有这个问题了。显然,问题是 bug,已被 doxygen
.
的维护者修复
我一直在努力让下面的代码摘录文档与 doxygen
一起正确显示。
我已经在网上搜索了这个问题;然而,似乎文档未显示主要是由于成员 function/variable 是私有的。尽管我似乎正在记录一个 public 成员函数,它也是非静态的,但我无法使 doxygen
正常工作。如果您能提供任何帮助,我将不胜感激。
/**
* @brief Algorithm abstraction.
*
* @tparam float_t `float` or `double`.
* @tparam int_t `int64_t` or similar.
* @tparam StepPolicy Policy for selecting a step-size.
* @tparam OraclePolicy Policy for getting first-order information.
*/
template <class float_t, class int_t, template <class, class> class StepPolicy,
template <class, class> class OraclePolicy>
struct Algorithm : public StepPolicy<float_t, int_t>,
public OraclePolicy<float_t, int_t> {
/**
* @brief Default constructor.
*
*/
Algorithm() = default;
/**
* @brief Constructor with a step-size.
*
* @param[in] step Non-negative step-size value.
*/
Algorithm(float_t step) : StepPolicy<float_t, int_t>{step} {}
/**
* @brief Set the initial step-size of the algorithm.
*
* @param[in] step Non-negative step-size value.
*/
void set_stepsize(float_t step) { StepPolicy<float_t, int_t>::set(step); }
/**
* @brief Get the current step-size of the algorithm.
*
* This does *not* change the state of StepPolicy.
*
* @return float_t Current step-size.
*/
float_t get_stepsize() const { return StepPolicy<float_t, int_t>::get(); }
/**
* @brief Get current step-size based on the algorithm's state.
*
* @param[in] k Current iteration count.
* @param[in] N Dimension of `x` and `dx`.
* @param[in] x Current decision vector.
* @param[in] dx Current first-order information.
* @return float_t Current step-size.
*/
float_t get_stepsize(const int_t k, const int_t N, const float_t *x,
const float_t *dx) {
return StepPolicy<float_t, int_t>::get(k, N, x, dx);
}
private:
int_t k{0};
};
我不确定doxygen
是否与有效代码摘录有关,但上面的代码确实可以编译。它与模板和继承有什么关系吗?我错过了什么吗?我的意思是,对于非继承模板 类,doxygen
可以完成它的工作。
顺便说一句,我的目录中没有任何具体的 StepPolicy
或 OraclePolicy
。此外,我可以看到构造函数得到了正确的记录。我只是卡住了。
我可以在这里分享我的 Doxygen
文件,它基本上只是 MathJax
相关设置中覆盖的默认值。
预先感谢您的宝贵时间。
从v1.8.14
开始,就没有这个问题了。显然,问题是 bug,已被 doxygen
.