Skip to content

Commit 6ea84b2

Browse files
committed
record work
1 parent d3b29fe commit 6ea84b2

File tree

7 files changed

+254
-2
lines changed

7 files changed

+254
-2
lines changed

source/lib/Asciidoc.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,39 @@ write(
247247
closeSection();
248248
}
249249

250+
// Data Members
251+
252+
// Member Functions
253+
{
254+
std::vector<FunctionInfo const*> v;
255+
v.reserve(I.Children.Functions.size());
256+
for(auto const& ref : I.Children.Functions)
257+
{
258+
auto const& J = corpus_.get<FunctionInfo>(ref.USR);
259+
if(J.Access == AccessSpecifier::AS_public)
260+
v.push_back(&J);
261+
}
262+
if(! v.empty())
263+
{
264+
*os_ << "\n";
265+
openSection("Member Functions");
266+
*os_ <<
267+
"[cols=2]\n" <<
268+
"|===\n" <<
269+
"|Name\n" <<
270+
"|Description\n" <<
271+
"\n";
272+
for(auto const& J : v)
273+
*os_ <<
274+
"|`" << J->Name << "`\n" <<
275+
"| " << J->javadoc.brief << "\n";
276+
*os_ <<
277+
"|===\n" <<
278+
"\n";
279+
closeSection();
280+
}
281+
}
282+
250283
closeSection();
251284
}
252285

source/tests/Tester.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,13 @@ checkOneFile(
104104
{
105105
// create the xml file and write to it
106106
llvm::raw_fd_ostream os(outputPath, ec, llvm::sys::fs::OF_None);
107-
if(R_.error(ec, "write the file '", outputPath, "'"))
107+
if(R_.error(ec, "open the file '", outputPath, "' for writing"))
108+
return;
109+
os << xmlString;
110+
if(R_.error(os.error(), "write the file '", outputPath, "'"))
108111
return;
109112
}
110-
else if(! R_.error(ec, "call fs::status on '", outputPathStr, "'"))
113+
else if(R_.error(ec, "call fs::status on '", outputPathStr, "'"))
111114
return;
112115
if(stat.type() != fs::file_type::regular_file)
113116
return R_.failed("'", outputPath, "' is not a regular file");

testfiles/decl-only/attributes_1.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE mrdox SYSTEM "mrdox.dtd">
3+
<mrdox>
4+
<all>
5+
<symbol name="f" usr="s6nsa+zVhpzzrN+yUVPP5rvdXqs="/>
6+
<symbol name="GlobalNamespace"/>
7+
</all>
8+
<namespace name="">
9+
<function name="f" usr="s6nsa+zVhpzzrN+yUVPP5rvdXqs=">
10+
<file path="decl-only/attributes_1.cpp" line="2"/>
11+
<return name="_Bool"/>
12+
</function>
13+
</namespace>
14+
</mrdox>

testfiles/decl-only/canonical_1.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE mrdox SYSTEM "mrdox.dtd">
3+
<mrdox>
4+
<all>
5+
<symbol name="GlobalNamespace"/>
6+
<symbol name="GlobalNamespace::a" usr="bJjlANSkHT9fMIOJb+7rnfl9B2Q="/>
7+
<symbol name="GlobalNamespace::A" usr="YrPSaKAbmXgzCAX5WByx4eVoqBM="/>
8+
<symbol name="GlobalNamespace::b" usr="x22+jYd1xB7rz7rTGsgmwOre390="/>
9+
<symbol name="GlobalNamespace::B" usr="3JsK1DO0O+wZhv+0meptQrbs3fY="/>
10+
<symbol name="GlobalNamespace::ba" usr="DnCAWz4yn8cUKkg886MMQcSEBhg="/>
11+
<symbol name="GlobalNamespace::bA" usr="o++ChozQVnJgKoS41uCm96LOP14="/>
12+
<symbol name="GlobalNamespace::Ba" usr="r32UJws/5rQHSwieW9XcY/Lu30k="/>
13+
<symbol name="GlobalNamespace::Bx" usr="64sjs/NcKpvextfuwbtyP/VMOJk="/>
14+
</all>
15+
<namespace name="">
16+
<struct name="a" usr="bJjlANSkHT9fMIOJb+7rnfl9B2Q=">
17+
<file path="decl-only/canonical_1.cpp" line="5" class="def"/>
18+
</struct>
19+
<struct name="A" usr="YrPSaKAbmXgzCAX5WByx4eVoqBM=">
20+
<file path="decl-only/canonical_1.cpp" line="4" class="def"/>
21+
</struct>
22+
<struct name="b" usr="x22+jYd1xB7rz7rTGsgmwOre390=">
23+
<file path="decl-only/canonical_1.cpp" line="3" class="def"/>
24+
</struct>
25+
<struct name="B" usr="3JsK1DO0O+wZhv+0meptQrbs3fY=">
26+
<file path="decl-only/canonical_1.cpp" line="2" class="def"/>
27+
</struct>
28+
<struct name="ba" usr="DnCAWz4yn8cUKkg886MMQcSEBhg=">
29+
<file path="decl-only/canonical_1.cpp" line="9" class="def"/>
30+
</struct>
31+
<struct name="bA" usr="o++ChozQVnJgKoS41uCm96LOP14=">
32+
<file path="decl-only/canonical_1.cpp" line="7" class="def"/>
33+
</struct>
34+
<struct name="Ba" usr="r32UJws/5rQHSwieW9XcY/Lu30k=">
35+
<file path="decl-only/canonical_1.cpp" line="6" class="def"/>
36+
</struct>
37+
<struct name="Bx" usr="64sjs/NcKpvextfuwbtyP/VMOJk=">
38+
<file path="decl-only/canonical_1.cpp" line="8" class="def"/>
39+
</struct>
40+
</namespace>
41+
</mrdox>

testfiles/decl-only/record_1.xml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE mrdox SYSTEM "mrdox.dtd">
3+
<mrdox>
4+
<all>
5+
<symbol name="GlobalNamespace"/>
6+
<symbol name="GlobalNamespace::C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0="/>
7+
<symbol name="GlobalNamespace::C1" usr="tm2khHa6qZM0lj1f7IwBdxVxDgE="/>
8+
<symbol name="GlobalNamespace::C2" usr="a3f8uSFf+Hih/eqmCQtqTCDw3EY="/>
9+
<symbol name="GlobalNamespace::C3" usr="5eVHvnJpHGl0uaFQWGNZbAUi+rA="/>
10+
<symbol name="GlobalNamespace::C4" usr="TwgjmiSc5xz28SnTBuPcppQrwcY="/>
11+
<symbol name="GlobalNamespace::C5" usr="+FCicEQuRpyoPB1uYTGhWVcrlcE="/>
12+
<symbol name="GlobalNamespace::C6" usr="KS3H76wGd00jB2pnPVvaBxXfMk8="/>
13+
<symbol name="GlobalNamespace::C7" usr="RoJyFLcF4tn+I7Xvlv0H+vBkIE4="/>
14+
<symbol name="GlobalNamespace::S0" usr="u38+snleg17KL7EQuD9FV1Z8b9E="/>
15+
<symbol name="GlobalNamespace::S1" usr="Tu+ql/Sdpk31DKHwwD/67uI3OZE="/>
16+
<symbol name="GlobalNamespace::S2" usr="SjrYNgntOvtz+y7yw+WmqLzVdW0="/>
17+
<symbol name="GlobalNamespace::S3" usr="ftBcWCAw4uNtak9kOXMXaOe13YU="/>
18+
<symbol name="GlobalNamespace::S4" usr="OkKbIK8En3Y5FbOBQVeHnAsZ0aY="/>
19+
<symbol name="GlobalNamespace::S5" usr="HQ5z8M+Q3IIXdW9oiD6jtd0TL94="/>
20+
<symbol name="GlobalNamespace::U0" usr="SHIJWZPzfYtLVfe/rzFAmeVpANk="/>
21+
</all>
22+
<namespace name="">
23+
<class name="C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0=">
24+
<file path="decl-only/record_1.cpp" line="2" class="def"/>
25+
</class>
26+
<class name="C1" usr="tm2khHa6qZM0lj1f7IwBdxVxDgE=">
27+
<file path="decl-only/record_1.cpp" line="12" class="def"/>
28+
<base name="C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0=" access="private"/>
29+
</class>
30+
<class name="C2" usr="a3f8uSFf+Hih/eqmCQtqTCDw3EY=">
31+
<file path="decl-only/record_1.cpp" line="13" class="def"/>
32+
<base name="C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0=" access="public"/>
33+
</class>
34+
<class name="C3" usr="5eVHvnJpHGl0uaFQWGNZbAUi+rA=">
35+
<file path="decl-only/record_1.cpp" line="14" class="def"/>
36+
<base name="C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0=" access="protected"/>
37+
</class>
38+
<class name="C4" usr="TwgjmiSc5xz28SnTBuPcppQrwcY=">
39+
<file path="decl-only/record_1.cpp" line="15" class="def"/>
40+
<base name="C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0=" access="private"/>
41+
</class>
42+
<class name="C5" usr="+FCicEQuRpyoPB1uYTGhWVcrlcE=">
43+
<file path="decl-only/record_1.cpp" line="17" class="def"/>
44+
<base name="C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0=" access="private" modifier="virtual"/>
45+
</class>
46+
<class name="C6" usr="KS3H76wGd00jB2pnPVvaBxXfMk8=">
47+
<file path="decl-only/record_1.cpp" line="18" class="def"/>
48+
<base name="C1" usr="tm2khHa6qZM0lj1f7IwBdxVxDgE=" access="private" modifier="virtual"/>
49+
</class>
50+
<class name="C7" usr="RoJyFLcF4tn+I7Xvlv0H+vBkIE4=">
51+
<file path="decl-only/record_1.cpp" line="19" class="def"/>
52+
<base name="C5" usr="+FCicEQuRpyoPB1uYTGhWVcrlcE=" access="public"/>
53+
<base name="C6" usr="KS3H76wGd00jB2pnPVvaBxXfMk8=" access="public"/>
54+
</class>
55+
<struct name="S0" usr="u38+snleg17KL7EQuD9FV1Z8b9E=">
56+
<file path="decl-only/record_1.cpp" line="1" class="def"/>
57+
</struct>
58+
<struct name="S1" usr="Tu+ql/Sdpk31DKHwwD/67uI3OZE=">
59+
<file path="decl-only/record_1.cpp" line="6" class="def"/>
60+
<file path="decl-only/record_1.cpp" line="5"/>
61+
</struct>
62+
<struct name="S2" usr="SjrYNgntOvtz+y7yw+WmqLzVdW0=">
63+
<file path="decl-only/record_1.cpp" line="8" class="def"/>
64+
<base name="S0" usr="u38+snleg17KL7EQuD9FV1Z8b9E=" access="public"/>
65+
</struct>
66+
<struct name="S3" usr="ftBcWCAw4uNtak9kOXMXaOe13YU=">
67+
<file path="decl-only/record_1.cpp" line="9" class="def"/>
68+
<base name="S1" usr="Tu+ql/Sdpk31DKHwwD/67uI3OZE=" access="public"/>
69+
</struct>
70+
<struct name="S4" usr="OkKbIK8En3Y5FbOBQVeHnAsZ0aY=">
71+
<file path="decl-only/record_1.cpp" line="10" class="def"/>
72+
<base name="S2" usr="SjrYNgntOvtz+y7yw+WmqLzVdW0=" access="public"/>
73+
<base name="S3" usr="ftBcWCAw4uNtak9kOXMXaOe13YU=" access="public"/>
74+
</struct>
75+
<struct name="S5" usr="HQ5z8M+Q3IIXdW9oiD6jtd0TL94=">
76+
<file path="decl-only/record_1.cpp" line="21" class="def"/>
77+
<base name="S0" usr="u38+snleg17KL7EQuD9FV1Z8b9E=" access="private"/>
78+
<base name="S1" usr="Tu+ql/Sdpk31DKHwwD/67uI3OZE=" access="protected"/>
79+
</struct>
80+
<union name="U0" usr="SHIJWZPzfYtLVfe/rzFAmeVpANk=">
81+
<file path="decl-only/record_1.cpp" line="3" class="def"/>
82+
</union>
83+
</namespace>
84+
</mrdox>

testfiles/decl-only/record_2.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
struct S0
2+
{
3+
void f0();
4+
protected:
5+
void f1();
6+
private:
7+
void f2();
8+
};
9+
10+
class C0
11+
{
12+
void f0();
13+
protected:
14+
void f1();
15+
public:
16+
void f2();
17+
};
18+
19+
union U0
20+
{
21+
void f0();
22+
protected:
23+
void f1();
24+
private:
25+
void f2();
26+
};

testfiles/decl-only/record_2.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE mrdox SYSTEM "mrdox.dtd">
3+
<mrdox>
4+
<all>
5+
<symbol name="GlobalNamespace"/>
6+
<symbol name="GlobalNamespace::C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0="/>
7+
<symbol name="GlobalNamespace::C0::f1" usr="EyRDT2mXtRNmcISD2rsC6/mLusw="/>
8+
<symbol name="GlobalNamespace::C0::f2" usr="ZOAAp99eH9zKUZqx0JzW6AuhRTQ="/>
9+
<symbol name="GlobalNamespace::S0" usr="u38+snleg17KL7EQuD9FV1Z8b9E="/>
10+
<symbol name="GlobalNamespace::S0::f0" usr="STTnU4grbgOl2xPE6okWC57zruc="/>
11+
<symbol name="GlobalNamespace::S0::f1" usr="IaPeEIwn9q94M3MuwxsB3qhBOSE="/>
12+
<symbol name="GlobalNamespace::U0" usr="SHIJWZPzfYtLVfe/rzFAmeVpANk="/>
13+
<symbol name="GlobalNamespace::U0::f0" usr="eY4R9etszWK2H42p4kWNm5XfpnE="/>
14+
<symbol name="GlobalNamespace::U0::f1" usr="KjiG7Uufpmd65dhiSV+Jv2RjgHA="/>
15+
</all>
16+
<namespace name="">
17+
<class name="C0" usr="sTaqkoFcVbtntbfpe777v5/pWL0=">
18+
<file path="decl-only/record_2.cpp" line="10" class="def"/>
19+
<function name="f1" access="protected" usr="EyRDT2mXtRNmcISD2rsC6/mLusw=">
20+
<file path="decl-only/record_2.cpp" line="14"/>
21+
<return name="void"/>
22+
</function>
23+
<function name="f2" access="public" usr="ZOAAp99eH9zKUZqx0JzW6AuhRTQ=">
24+
<file path="decl-only/record_2.cpp" line="16"/>
25+
<return name="void"/>
26+
</function>
27+
</class>
28+
<struct name="S0" usr="u38+snleg17KL7EQuD9FV1Z8b9E=">
29+
<file path="decl-only/record_2.cpp" line="1" class="def"/>
30+
<function name="f0" access="public" usr="STTnU4grbgOl2xPE6okWC57zruc=">
31+
<file path="decl-only/record_2.cpp" line="3"/>
32+
<return name="void"/>
33+
</function>
34+
<function name="f1" access="protected" usr="IaPeEIwn9q94M3MuwxsB3qhBOSE=">
35+
<file path="decl-only/record_2.cpp" line="5"/>
36+
<return name="void"/>
37+
</function>
38+
</struct>
39+
<union name="U0" usr="SHIJWZPzfYtLVfe/rzFAmeVpANk=">
40+
<file path="decl-only/record_2.cpp" line="19" class="def"/>
41+
<function name="f0" access="public" usr="eY4R9etszWK2H42p4kWNm5XfpnE=">
42+
<file path="decl-only/record_2.cpp" line="21"/>
43+
<return name="void"/>
44+
</function>
45+
<function name="f1" access="protected" usr="KjiG7Uufpmd65dhiSV+Jv2RjgHA=">
46+
<file path="decl-only/record_2.cpp" line="23"/>
47+
<return name="void"/>
48+
</function>
49+
</union>
50+
</namespace>
51+
</mrdox>

0 commit comments

Comments
 (0)