代码之家  ›  专栏  ›  技术社区  ›  vlad_tepesch

结构、类等的doxygen别名

  •  0
  • vlad_tepesch  · 技术社区  · 7 年前

    我想创建一些在内部创建的别名 \struct 引用某些特定结构并添加一些其他命令的命令:

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

    别名在一些正常的doxy注释中调用:

    /**
     *
     * \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 回复  |  直到 7 年前
        1
  •  1
  •   albert    7 年前

    请参阅doxygen文档中有关别名的文档。

    直接从文档中可以看出以下几点:

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

    • 我们在这里看到等号(=)的用法(同时更正,在复制过程中被遗忘)
    • 使用大写-小写(现在应该有一条消息: warning: Found unknown command \东西'`(同时纠正)
    • 使用 \n 可能是 ^^

    所以别名应该是:

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