首页 > 解决方案 > python“.tp_doc”属性的 Doxygen 文档…

问题描述

我有一个类库,所有doxygen文档都位于 c-header 文件中……现在我有一个python api 包装器,它使用与 c-api类型函数相关的python 类型方法……

问题...我如何从 c-heder 文件中获取\brief\details文档到python .tpdoc ... 属性中?

一个真正好的帮助是doxygen生成一个index带有 c-function-name → \brief\detail信息的文件......?也许更多?

我会阅读这个 index文件并将信息添加到python api。

→ 感谢您的帮助

例子:

/// \brief create a \e master/slave link between the master-parent-context and the slave-parent-context …
///
/// \param[in] ctx the \e master context object as PARENT without a CHILD
/// \slaveid
/// \param[in] slave the \e slave context object as CLIENT-PARENT without a CHILD
/// \retMqErrorE
/// \attention The \e slave-context is owned by the \e master-context.
/// This mean that no other external references should be used and the \e slave-context
/// will be deleted if the \e master-context is be deleted.
MQ_EXTERN enum MqErrorE
MQ_DECL MqSlaveCreate (
  struct MqS * const  ctx,
  MQ_SLAVE_ID const   id,
  struct MqS * const  slave
);

python api…</p>

static PyMethodDef MqC_Methods[] = {
...
    { "SlaveCreate", NS(MqC_SlaveCreate), METH_VARARGS, "\brief doc…" },
...
}

标签: pythoncdoxygen

解决方案


推荐阅读