Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/163.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Doxygen:如何处理化合物中的匿名成员 我的C++代码如下,我想使用doxGEY产生XML文件。_C++_Class_Doxygen - Fatal编程技术网

Doxygen:如何处理化合物中的匿名成员 我的C++代码如下,我想使用doxGEY产生XML文件。

Doxygen:如何处理化合物中的匿名成员 我的C++代码如下,我想使用doxGEY产生XML文件。,c++,class,doxygen,C++,Class,Doxygen,实际输出xml如下,我省略了一些不重要的信息。我的问题是如何区分匿名结构或联合(如“a”)中的成员与xml,或者如何配置Doxygen来实现这一点 int int TestStru::a A. 结构TestStru::@0 结构TestStru::@0 TestStru::m_stru 穆斯图 int int TestStru::b B 烧焦 char TestStru::c C 联合测试序列::@1 union TestStru::@1 TestStru::m_union int int T

实际输出xml如下,我省略了一些不重要的信息。我的问题是如何区分匿名结构或联合(如“a”)中的成员与xml,或者如何配置Doxygen来实现这一点


int
int TestStru::a
A.
结构TestStru::@0
结构TestStru::@0 TestStru::m_stru
穆斯图
int
int TestStru::b
B
烧焦
char TestStru::c
C
联合测试序列::@1
union TestStru::@1 TestStru::m_union
int
int TestStru::d
D

您使用的是哪个版本的强氧。在doxygen issue tracker()中,记录了一些关于匿名枚举/结构/联合使用的问题。在您的示例中,匿名部分由
@…
表示,当在代码中设置非匿名名称时,它应该可以工作。
// c++ code
struct TestStru
{
    struct{
        int a;
    } m_stru;
    union{
        int b;
        char c;
    } m_union;
    int d;
};
<memberdef kind="variable" id="struct_test_stru_1a898ff9a1bccfc215accd3da2db864509" prot="public" static="no" mutable="no">
  <type>int</type>
  <definition>int TestStru::a</definition>
  <argsstring></argsstring>
  <name>a</name>
</memberdef>
<memberdef kind="variable" id="struct_test_stru_1aeca04a3d70feb1cef125df66625487ef" prot="public" static="no" mutable="no">
  <type>struct TestStru::@0</type>
  <definition>struct TestStru::@0  TestStru::m_stru</definition>
  <argsstring></argsstring>
  <name>m_stru</name>
</memberdef>
<memberdef kind="variable" id="struct_test_stru_1a2831fb7fc8f16abb913fe9a3c1fae19a" prot="public" static="no" mutable="no">
  <type>int</type>
  <definition>int TestStru::b</definition>
  <argsstring></argsstring>
  <name>b</name>
</memberdef>
<memberdef kind="variable" id="struct_test_stru_1aaa51d26f2195dcfdb0ce8f500275221b" prot="public" static="no" mutable="no">
  <type>char</type>
  <definition>char TestStru::c</definition>
  <argsstring></argsstring>
  <name>c</name>
</memberdef>
<memberdef kind="variable" id="struct_test_stru_1a547ce77ff0347d5a14ac43e078964022" prot="public" static="no" mutable="no">
  <type>union TestStru::@1</type>
  <definition>union TestStru::@1  TestStru::m_union</definition>
</memberdef>
<memberdef kind="variable" id="struct_test_stru_1a5437512aa23a668c8e10865521c35f7c" prot="public" static="no" mutable="no">
  <type>int</type>
  <definition>int TestStru::d</definition>
  <argsstring></argsstring>
  <name>d</name>
</memberdef>