doxygen别名为struct,class等

时间:2018-07-03 12:55:06

标签: doxygen

我想创建一些别名,该别名在内部创建指向特定结构的FloatingActionButton button = findViewById(R.id.your_button); if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP && button instanceof AppCompatButton) { ((AppCompatButton) button).setSupportBackgroundTintList(ColorStateList.valueOf(*your color in integer*)); } else { ViewCompat.setBackgroundTintList(button, ColorStateList.valueOf(*your color in integer*)); } 命令,并添加一些其他命令:

\struct

在一些普通的doxy注释中调用别名:

ALIASES += "thing{2}=\struct \2 \n \n \xrefitem thingList\"\" \"List of Things\" \2  this thing belongs to that \ref \1"

主要是这样做,并且正确生成了xrefitem列表,但出现错误:

/**
 *
 * \thing{SomeThing, SomeThingStruct}
 *
 * \brief ..sdfsdf
 */
typedef struct sSomeTag SomeThingStruct;

因为它将别名中的warning: the name `\_linebr' supplied as the argument of the \class, \struct, \union, or \include command is not an input file 解释为\n关键字的第二个参数

如何定义不会产生此警告的别名?

1 个答案:

答案 0 :(得分:1)

请参阅doxygen文档中有关ALIASES的文档。

直接来自文档的几点:

  

ALIASES此标记可用于指定许多可起作用的别名   作为文档中的命令。别名的格式为:name = value   例如,添加“ sideeffect = @ par副作用:\ n”将使您能够   将命令\ sideeffect(或@sideeffect)放在文档中,   这将导致用户定义的段落标题为“ Side   效果:”。您可以将\ n放在别名的值部分中以插入   换行符(在结果输出中)。您可以将^^放入值部分   别名以插入换行符,就像物理换行符在   原始文件。

  • 我们在这里看到等号(=)的用法(在此期间已更正,在复制过程中已被忘记)
  • 使用大写字母<->小写字母(您现在应该收到一条消息:warning: Found unknown command \ thing'`(在此同时进行了修正)
  • \n的使用可能是^^

因此别名应显示为:

ALIASES += thing{2}="\struct \2 ^^ ^^ \xrefitem thingList\"\" \"List of Things\" \2 this thing belongs to that \ref \1"

相关问题