1 | <?xml version='1.0' encoding='UTF-8' standalone='no'?> |
---|
2 | <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6"> |
---|
3 | <compounddef id="test__xsd__hello_8cxx" kind="file"> |
---|
4 | <compoundname>test_xsd_hello.cxx</compoundname> |
---|
5 | <includes local="no">string</includes> |
---|
6 | <includes local="no">iostream</includes> |
---|
7 | <includes local="yes">hello-pskel.hxx</includes> |
---|
8 | <incdepgraph> |
---|
9 | <node id="796"> |
---|
10 | <label>string</label> |
---|
11 | </node> |
---|
12 | <node id="798"> |
---|
13 | <label>hello-pskel.hxx</label> |
---|
14 | </node> |
---|
15 | <node id="797"> |
---|
16 | <label>iostream</label> |
---|
17 | </node> |
---|
18 | <node id="795"> |
---|
19 | <label>work/git/mixpp/tests/test_xsd_hello.cxx</label> |
---|
20 | <link refid="test_xsd_hello.cxx"/> |
---|
21 | <childnode refid="796" relation="include"> |
---|
22 | </childnode> |
---|
23 | <childnode refid="797" relation="include"> |
---|
24 | </childnode> |
---|
25 | <childnode refid="798" relation="include"> |
---|
26 | </childnode> |
---|
27 | </node> |
---|
28 | </incdepgraph> |
---|
29 | <innerclass refid="structhello__pimpl" prot="public">hello_pimpl</innerclass> |
---|
30 | <sectiondef kind="func"> |
---|
31 | <memberdef kind="function" id="test__xsd__hello_8cxx_10ddf1224851353fc92bfbff6f499fa97" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
32 | <type>int</type> |
---|
33 | <definition>int main</definition> |
---|
34 | <argsstring>(int argc, char *argv[])</argsstring> |
---|
35 | <name>main</name> |
---|
36 | <param> |
---|
37 | <type>int</type> |
---|
38 | <declname>argc</declname> |
---|
39 | </param> |
---|
40 | <param> |
---|
41 | <type>char *</type> |
---|
42 | <declname>argv</declname> |
---|
43 | <array>[]</array> |
---|
44 | </param> |
---|
45 | <briefdescription> |
---|
46 | </briefdescription> |
---|
47 | <detaileddescription> |
---|
48 | </detaileddescription> |
---|
49 | <inbodydescription> |
---|
50 | </inbodydescription> |
---|
51 | <location file="/home/smidl/work/git/mixpp/tests/test_xsd_hello.cxx" line="32" bodyfile="/home/smidl/work/git/mixpp/tests/test_xsd_hello.cxx" bodystart="31" bodyend="68"/> |
---|
52 | </memberdef> |
---|
53 | </sectiondef> |
---|
54 | <briefdescription> |
---|
55 | </briefdescription> |
---|
56 | <detaileddescription> |
---|
57 | </detaileddescription> |
---|
58 | <programlisting> |
---|
59 | <codeline lineno="1"><highlight class="comment">//<sp/>file<sp/><sp/><sp/><sp/><sp/><sp/>:<sp/>examples/cxx/parser/hello/driver.cxx</highlight><highlight class="normal"></highlight></codeline> |
---|
60 | <codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">//<sp/>author<sp/><sp/><sp/><sp/>:<sp/>Boris<sp/>Kolpackov<sp/><boris@codesynthesis.com></highlight><highlight class="normal"></highlight></codeline> |
---|
61 | <codeline lineno="3"><highlight class="normal"></highlight><highlight class="comment">//<sp/>copyright<sp/>:<sp/>not<sp/>copyrighted<sp/>-<sp/>public<sp/>domain</highlight><highlight class="normal"></highlight></codeline> |
---|
62 | <codeline lineno="4"><highlight class="normal"></highlight></codeline> |
---|
63 | <codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><string></highlight><highlight class="normal"></highlight></codeline> |
---|
64 | <codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><iostream></highlight><highlight class="normal"></highlight></codeline> |
---|
65 | <codeline lineno="7"><highlight class="normal"></highlight></codeline> |
---|
66 | <codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"hello-pskel.hxx"</highlight><highlight class="normal"></highlight></codeline> |
---|
67 | <codeline lineno="9"><highlight class="normal"></highlight></codeline> |
---|
68 | <codeline lineno="10"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">std;</highlight></codeline> |
---|
69 | <codeline lineno="11"><highlight class="normal"></highlight></codeline> |
---|
70 | <codeline lineno="12"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">hello_pimpl:<sp/>hello_pskel</highlight></codeline> |
---|
71 | <codeline lineno="13"><highlight class="normal">{</highlight></codeline> |
---|
72 | <codeline lineno="14"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> |
---|
73 | <codeline lineno="15"><highlight class="normal"><sp/><sp/>greeting<sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal">&<sp/>greeting)</highlight></codeline> |
---|
74 | <codeline lineno="16"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
75 | <codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/>greeting_<sp/>=<sp/>greeting;</highlight></codeline> |
---|
76 | <codeline lineno="18"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
77 | <codeline lineno="19"><highlight class="normal"></highlight></codeline> |
---|
78 | <codeline lineno="20"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> |
---|
79 | <codeline lineno="21"><highlight class="normal"><sp/><sp/>name<sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal">&<sp/>name)</highlight></codeline> |
---|
80 | <codeline lineno="22"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
81 | <codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/>cout<sp/><<<sp/>greeting_<sp/><<<sp/></highlight><highlight class="stringliteral">",<sp/>"</highlight><highlight class="normal"><sp/><<<sp/>name<sp/><<<sp/></highlight><highlight class="stringliteral">"!"</highlight><highlight class="normal"><sp/><<<sp/>endl;</highlight></codeline> |
---|
82 | <codeline lineno="24"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
83 | <codeline lineno="25"><highlight class="normal"></highlight></codeline> |
---|
84 | <codeline lineno="26"><highlight class="normal"></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline> |
---|
85 | <codeline lineno="27"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>greeting_;</highlight></codeline> |
---|
86 | <codeline lineno="28"><highlight class="normal">};</highlight></codeline> |
---|
87 | <codeline lineno="29"><highlight class="normal"></highlight></codeline> |
---|
88 | <codeline lineno="30"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
---|
89 | <codeline lineno="31"><highlight class="normal"><ref refid="sim__var_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" kindref="member" tooltip="Extended Kalman filter with unknown Q.">main</ref><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>argc,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>argv[])</highlight></codeline> |
---|
90 | <codeline lineno="32"><highlight class="normal">{</highlight></codeline> |
---|
91 | <codeline lineno="33"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(argc<sp/>!=<sp/>2)</highlight></codeline> |
---|
92 | <codeline lineno="34"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
93 | <codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/>cerr<sp/><<<sp/></highlight><highlight class="stringliteral">"usage:<sp/>"</highlight><highlight class="normal"><sp/><<<sp/>argv[0]<sp/><<<sp/></highlight><highlight class="stringliteral">"<sp/>hello.xml"</highlight><highlight class="normal"><sp/><<<sp/>endl;</highlight></codeline> |
---|
94 | <codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline> |
---|
95 | <codeline lineno="37"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
96 | <codeline lineno="38"><highlight class="normal"></highlight></codeline> |
---|
97 | <codeline lineno="39"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">try</highlight><highlight class="normal"></highlight></codeline> |
---|
98 | <codeline lineno="40"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
99 | <codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Construct<sp/>the<sp/>parser.</highlight><highlight class="normal"></highlight></codeline> |
---|
100 | <codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
101 | <codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/>xml_schema::string_pimpl<sp/>string_p;</highlight></codeline> |
---|
102 | <codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/>hello_pimpl<sp/>hello_p;</highlight></codeline> |
---|
103 | <codeline lineno="45"><highlight class="normal"></highlight></codeline> |
---|
104 | <codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>hello_p.greeting_parser<sp/>(string_p);</highlight></codeline> |
---|
105 | <codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>hello_p.name_parser<sp/>(string_p);</highlight></codeline> |
---|
106 | <codeline lineno="48"><highlight class="normal"></highlight></codeline> |
---|
107 | <codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Parse<sp/>the<sp/>XML<sp/>instance<sp/>document.<sp/>The<sp/>second<sp/>argument<sp/>to<sp/>the</highlight><highlight class="normal"></highlight></codeline> |
---|
108 | <codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>document's<sp/>constructor<sp/>is<sp/>the<sp/>document's<sp/>root<sp/>element<sp/>name.</highlight><highlight class="normal"></highlight></codeline> |
---|
109 | <codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
110 | <codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/>xml_schema::document<sp/>doc_p<sp/>(hello_p,<sp/></highlight><highlight class="stringliteral">"hello"</highlight><highlight class="normal">);</highlight></codeline> |
---|
111 | <codeline lineno="53"><highlight class="normal"></highlight></codeline> |
---|
112 | <codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/>hello_p.pre<sp/>();</highlight></codeline> |
---|
113 | <codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/>doc_p.parse<sp/>(argv[1]);</highlight></codeline> |
---|
114 | <codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/>hello_p.post_hello<sp/>();</highlight></codeline> |
---|
115 | <codeline lineno="57"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
116 | <codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">catch</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>xml_schema::exception&<sp/>e)</highlight></codeline> |
---|
117 | <codeline lineno="59"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
118 | <codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/>cerr<sp/><<<sp/>e<sp/><<<sp/>endl;</highlight></codeline> |
---|
119 | <codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline> |
---|
120 | <codeline lineno="62"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
121 | <codeline lineno="63"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">catch</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::ios_base::failure&)</highlight></codeline> |
---|
122 | <codeline lineno="64"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
---|
123 | <codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/>cerr<sp/><<<sp/>argv[1]<sp/><<<sp/></highlight><highlight class="stringliteral">":<sp/>unable<sp/>to<sp/>open<sp/>or<sp/>read<sp/>failure"</highlight><highlight class="normal"><sp/><<<sp/>endl;</highlight></codeline> |
---|
124 | <codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline> |
---|
125 | <codeline lineno="67"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
---|
126 | <codeline lineno="68"><highlight class="normal">}</highlight></codeline> |
---|
127 | </programlisting> |
---|
128 | <location file="/home/smidl/work/git/mixpp/tests/test_xsd_hello.cxx"/> |
---|
129 | </compounddef> |
---|
130 | </doxygen> |
---|