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="userinfo_8cpp" kind="file"> |
---|
4 | <compoundname>userinfo.cpp</compoundname> |
---|
5 | <includes refid="userinfo_8h" local="yes">userinfo.h</includes> |
---|
6 | <incdepgraph> |
---|
7 | <node id="471"> |
---|
8 | <label>xercesc/framework/LocalFileInputSource.hpp</label> |
---|
9 | </node> |
---|
10 | <node id="469"> |
---|
11 | <label>xercesc/util/XMLString.hpp</label> |
---|
12 | </node> |
---|
13 | <node id="457"> |
---|
14 | <label>work/git/mixpp/bdm/userinfo.cpp</label> |
---|
15 | <link refid="userinfo.cpp"/> |
---|
16 | <childnode refid="458" relation="include"> |
---|
17 | </childnode> |
---|
18 | </node> |
---|
19 | <node id="473"> |
---|
20 | <label>xercesc/parsers/XercesDOMParser.hpp</label> |
---|
21 | </node> |
---|
22 | <node id="462"> |
---|
23 | <label>string</label> |
---|
24 | </node> |
---|
25 | <node id="464"> |
---|
26 | <label>map</label> |
---|
27 | </node> |
---|
28 | <node id="458"> |
---|
29 | <label>userinfo.h</label> |
---|
30 | <link refid="userinfo_8h-source"/> |
---|
31 | <childnode refid="459" relation="include"> |
---|
32 | </childnode> |
---|
33 | <childnode refid="460" relation="include"> |
---|
34 | </childnode> |
---|
35 | <childnode refid="461" relation="include"> |
---|
36 | </childnode> |
---|
37 | <childnode refid="462" relation="include"> |
---|
38 | </childnode> |
---|
39 | <childnode refid="463" relation="include"> |
---|
40 | </childnode> |
---|
41 | <childnode refid="464" relation="include"> |
---|
42 | </childnode> |
---|
43 | <childnode refid="465" relation="include"> |
---|
44 | </childnode> |
---|
45 | <childnode refid="466" relation="include"> |
---|
46 | </childnode> |
---|
47 | <childnode refid="467" relation="include"> |
---|
48 | </childnode> |
---|
49 | <childnode refid="468" relation="include"> |
---|
50 | </childnode> |
---|
51 | <childnode refid="469" relation="include"> |
---|
52 | </childnode> |
---|
53 | <childnode refid="470" relation="include"> |
---|
54 | </childnode> |
---|
55 | <childnode refid="471" relation="include"> |
---|
56 | </childnode> |
---|
57 | <childnode refid="472" relation="include"> |
---|
58 | </childnode> |
---|
59 | <childnode refid="473" relation="include"> |
---|
60 | </childnode> |
---|
61 | </node> |
---|
62 | <node id="463"> |
---|
63 | <label>typeinfo</label> |
---|
64 | </node> |
---|
65 | <node id="466"> |
---|
66 | <label>vector</label> |
---|
67 | </node> |
---|
68 | <node id="465"> |
---|
69 | <label>utility</label> |
---|
70 | </node> |
---|
71 | <node id="459"> |
---|
72 | <label>sstream</label> |
---|
73 | </node> |
---|
74 | <node id="460"> |
---|
75 | <label>iostream</label> |
---|
76 | </node> |
---|
77 | <node id="472"> |
---|
78 | <label>xercesc/dom/DOMWriter.hpp</label> |
---|
79 | </node> |
---|
80 | <node id="470"> |
---|
81 | <label>xercesc/framework/LocalFileFormatTarget.hpp</label> |
---|
82 | </node> |
---|
83 | <node id="467"> |
---|
84 | <label>xercesc/dom/DOM.hpp</label> |
---|
85 | </node> |
---|
86 | <node id="468"> |
---|
87 | <label>xercesc/util/PlatformUtils.hpp</label> |
---|
88 | </node> |
---|
89 | <node id="461"> |
---|
90 | <label>stdio.h</label> |
---|
91 | </node> |
---|
92 | </incdepgraph> |
---|
93 | <briefdescription> |
---|
94 | </briefdescription> |
---|
95 | <detaileddescription> |
---|
96 | </detaileddescription> |
---|
97 | <programlisting> |
---|
98 | <codeline lineno="1"><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
99 | <codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">//<sp/>C++<sp/>Implementation:<sp/>itpp_ext</highlight><highlight class="normal"></highlight></codeline> |
---|
100 | <codeline lineno="3"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
101 | <codeline lineno="4"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Description:</highlight><highlight class="normal"></highlight></codeline> |
---|
102 | <codeline lineno="5"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
103 | <codeline lineno="6"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
104 | <codeline lineno="7"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Author:<sp/>smidl<sp/><smidl@utia.cas.cz>,<sp/>(C)<sp/>2008</highlight><highlight class="normal"></highlight></codeline> |
---|
105 | <codeline lineno="8"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
106 | <codeline lineno="9"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Copyright:<sp/>See<sp/>COPYING<sp/>file<sp/>that<sp/>comes<sp/>with<sp/>this<sp/>distribution</highlight><highlight class="normal"></highlight></codeline> |
---|
107 | <codeline lineno="10"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
108 | <codeline lineno="11"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline> |
---|
109 | <codeline lineno="12"><highlight class="normal"></highlight></codeline> |
---|
110 | <codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"userinfo.h"</highlight><highlight class="normal"></highlight></codeline> |
---|
111 | <codeline lineno="14"><highlight class="normal"></highlight></codeline> |
---|
112 | <codeline lineno="15" refid="classBindingFrame_165bec8fcde1865e2e211f42ca52a816f" refkind="member"><highlight class="normal"><ref refid="classBindingFrame_165bec8fcde1865e2e211f42ca52a816f" kindref="member" tooltip="default constructor">BindingFrame::BindingFrame</ref>()</highlight></codeline> |
---|
113 | <codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>:<sp/>dummy()</highlight></codeline> |
---|
114 | <codeline lineno="17"><highlight class="normal">{</highlight></codeline> |
---|
115 | <codeline lineno="18"><highlight class="normal">}</highlight></codeline> |
---|
116 | <codeline lineno="19"><highlight class="normal"></highlight></codeline> |
---|
117 | <codeline lineno="20" refid="classBindingFrame_12244bd5181c3d1e70f3a6be2b72e9424" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/><ref refid="classBindingFrame_12244bd5181c3d1e70f3a6be2b72e9424" kindref="member" tooltip="function which transcodes Xerces&#39; XMLCh-based strings into C++ strings">BindingFrame::XMLCh2str</ref>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>XMLCh*<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><sp/>XMLCh_str<sp/>)</highlight></codeline> |
---|
118 | <codeline lineno="21"><highlight class="normal">{</highlight></codeline> |
---|
119 | <codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*local<sp/>=<sp/>XMLString::transcode(<sp/>XMLCh_str<sp/>);</highlight></codeline> |
---|
120 | <codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>res<sp/>=<sp/>local;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
121 | <codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XMLString::release(<sp/>&local<sp/>);</highlight></codeline> |
---|
122 | <codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>res;</highlight></codeline> |
---|
123 | <codeline lineno="26"><highlight class="normal">}</highlight></codeline> |
---|
124 | <codeline lineno="27"><highlight class="normal"></highlight></codeline> |
---|
125 | <codeline lineno="28"><highlight class="normal"></highlight></codeline> |
---|
126 | <codeline lineno="29" refid="classAttribute_14c4c80e6b59e3356324ef02d0e92d813" refkind="member"><highlight class="normal"><ref refid="classAttribute_14c4c80e6b59e3356324ef02d0e92d813" kindref="member" tooltip="Default constructor fixing a name of the related attribute.">Attribute::Attribute</ref>(<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>attributeName<sp/>)</highlight></codeline> |
---|
127 | <codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>:<sp/>dummy(),<sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
128 | <codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>transcodedAttributeName(<sp/>XMLString::transcode(<sp/>attributeName.c_str()<sp/>)<sp/>)</highlight></codeline> |
---|
129 | <codeline lineno="32"><highlight class="normal">{</highlight></codeline> |
---|
130 | <codeline lineno="33"><highlight class="normal">}</highlight></codeline> |
---|
131 | <codeline lineno="34"><highlight class="normal"></highlight></codeline> |
---|
132 | <codeline lineno="35"><highlight class="normal">Attribute::~Attribute()</highlight></codeline> |
---|
133 | <codeline lineno="36"><highlight class="normal">{<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
134 | <codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XMLString::release(<sp/>(XMLCh**)&transcodedAttributeName<sp/>);</highlight></codeline> |
---|
135 | <codeline lineno="38"><highlight class="normal">}</highlight></codeline> |
---|
136 | <codeline lineno="39"><highlight class="normal"></highlight></codeline> |
---|
137 | <codeline lineno="40" refid="classAttribute_16ebbcaaf9c90a979e645f469e02bb940" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">string</highlight><highlight class="normal">&<sp/><ref refid="classAttribute_16ebbcaaf9c90a979e645f469e02bb940" kindref="member" tooltip="This method parse DOMElement, finds proper attribute and returns its value.">Attribute::Get</ref>(<sp/>DOMElement<sp/>&element<sp/>)</highlight><highlight class="keyword"><sp/>const</highlight></codeline> |
---|
138 | <codeline lineno="41"><highlight class="keyword"></highlight><highlight class="normal">{</highlight></codeline> |
---|
139 | <codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>XMLCh*<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>transcoded_str<sp/>=<sp/>element.getAttribute(<sp/>transcodedAttributeName<sp/>);</highlight></codeline> |
---|
140 | <codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>*</highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>string(<sp/>XMLString::transcode(<sp/>transcoded_str<sp/>)<sp/>);</highlight></codeline> |
---|
141 | <codeline lineno="44"><highlight class="normal">}</highlight></codeline> |
---|
142 | <codeline lineno="45"><highlight class="normal"></highlight></codeline> |
---|
143 | <codeline lineno="46" refid="classAttribute_1e011d84e2e3c40390807a8b8e58e3c35" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classAttribute_1e011d84e2e3c40390807a8b8e58e3c35" kindref="member" tooltip="This method adds the passed string as an new attribute into the passed DOMElement...">Attribute::Set</ref>(<sp/>DOMElement<sp/>&element,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>&<ref refid="classstr" kindref="compound" tooltip="Structure of RV (used internally).">str</ref><sp/>)</highlight><highlight class="keyword"><sp/>const</highlight></codeline> |
---|
144 | <codeline lineno="47"><highlight class="keyword"></highlight><highlight class="normal">{</highlight></codeline> |
---|
145 | <codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>!str.length()<sp/>)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;<sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
146 | <codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>XMLCh*<sp/>transcoded_str<sp/>=<sp/>XMLString::transcode(str.c_str());</highlight></codeline> |
---|
147 | <codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>element.setAttribute(<sp/>transcodedAttributeName,<sp/>transcoded_str<sp/>);</highlight></codeline> |
---|
148 | <codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XMLString::release(<sp/>(XMLCh**)<sp/>&transcoded_str<sp/>);</highlight></codeline> |
---|
149 | <codeline lineno="52"><highlight class="normal">}</highlight></codeline> |
---|
150 | <codeline lineno="53"><highlight class="normal"></highlight></codeline> |
---|
151 | <codeline lineno="54"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classAttribute" kindref="compound" tooltip="Abstract class declaring general properties of a frame for data binding.">Attribute</ref><sp/><ref refid="classAttribute_1d6474fd976f505e70e10c497199c6770" kindref="member" tooltip="Static member, an instance related to an attribute named &#39;help&#39;.">Attribute::help</ref>(<sp/></highlight><highlight class="stringliteral">"help"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
152 | <codeline lineno="55"><highlight class="normal"><sp/></highlight></codeline> |
---|
153 | <codeline lineno="56"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classAttribute" kindref="compound" tooltip="Abstract class declaring general properties of a frame for data binding.">Attribute</ref><sp/><ref refid="classAttribute_15f6cce980606fa8943857204aacb5478" kindref="member" tooltip="Static member, a constant instance related to an attribute named &#39;type&#39;.">Attribute::type</ref>(<sp/></highlight><highlight class="stringliteral">"type"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
154 | <codeline lineno="57"><highlight class="normal"></highlight></codeline> |
---|
155 | <codeline lineno="58"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classAttribute" kindref="compound" tooltip="Abstract class declaring general properties of a frame for data binding.">Attribute</ref><sp/><ref refid="classAttribute_1452441da4ebfda23cdc668943ffe8da7" kindref="member" tooltip="Static member, a constant instance related to the attribute named &#39;value&#39;...">Attribute::value</ref>(<sp/></highlight><highlight class="stringliteral">"value"</highlight><highlight class="normal"><sp/>);</highlight></codeline> |
---|
156 | <codeline lineno="59"><highlight class="normal"></highlight></codeline> |
---|
157 | <codeline lineno="60"><highlight class="normal"></highlight></codeline> |
---|
158 | <codeline lineno="61"><highlight class="normal">UserInfo::StringToUIMap::MappedString2UI&<sp/>UserInfo::StringToUIMap::privateMap()</highlight></codeline> |
---|
159 | <codeline lineno="62"><highlight class="normal">{</highlight></codeline> |
---|
160 | <codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>MappedString2UI<sp/>var;</highlight></codeline> |
---|
161 | <codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>var;</highlight></codeline> |
---|
162 | <codeline lineno="65"><highlight class="normal">}</highlight></codeline> |
---|
163 | <codeline lineno="66"><highlight class="normal"></highlight></codeline> |
---|
164 | <codeline lineno="67"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>UserInfo::StringToUIMap::Add(<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>key,<sp/>pUserInfo<sp/>pInstance<sp/>)</highlight></codeline> |
---|
165 | <codeline lineno="68"><highlight class="normal">{</highlight></codeline> |
---|
166 | <codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>privateMap().insert(<sp/>make_pair(<sp/>key,<sp/>pInstance<sp/>)<sp/>);</highlight></codeline> |
---|
167 | <codeline lineno="70"><highlight class="normal">}</highlight></codeline> |
---|
168 | <codeline lineno="71"><highlight class="normal"></highlight></codeline> |
---|
169 | <codeline lineno="72"><highlight class="normal">UserInfo::pUserInfo<sp/>UserInfo::StringToUIMap::Retrieve(<sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>key<sp/>)</highlight></codeline> |
---|
170 | <codeline lineno="73"><highlight class="normal">{</highlight></codeline> |
---|
171 | <codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MappedString2UI::const_iterator<sp/>iter<sp/>=<sp/>privateMap().find(<sp/>key<sp/>);</highlight></codeline> |
---|
172 | <codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>iter<sp/>==<sp/>privateMap().end())<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline> |
---|
173 | <codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>iter->second;</highlight></codeline> |
---|
174 | <codeline lineno="77"><highlight class="normal">}<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
175 | <codeline lineno="78"><highlight class="normal"></highlight></codeline> |
---|
176 | <codeline lineno="79" refid="classRootElement_125cd0a3019e91c5bbe8bc09cdf6e61aa" refkind="member"><highlight class="normal"><ref refid="classRootElement_125cd0a3019e91c5bbe8bc09cdf6e61aa" kindref="member" tooltip="attach new RootElement instance to a file (typically with an XML extension)">RootElement::RootElement</ref>(<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>fileName<sp/>)</highlight></codeline> |
---|
177 | <codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>:<sp/>dummy(),</highlight></codeline> |
---|
178 | <codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>transcodedFileName(<sp/>XMLString::transcode(<sp/>fileName<sp/>)<sp/>)</highlight></codeline> |
---|
179 | <codeline lineno="82"><highlight class="normal">{<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
180 | <codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>get<sp/>a<sp/>serializer,<sp/>an<sp/>instance<sp/>of<sp/>DOMWriter<sp/>(the<sp/>"LS"<sp/>stands<sp/>for<sp/>load-save).</highlight><highlight class="normal"></highlight></codeline> |
---|
181 | <codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pImplementation<sp/>=<sp/>DOMImplementationRegistry::getDOMImplementation(<sp/>XMLString::transcode(<sp/></highlight><highlight class="stringliteral">"LS"</highlight><highlight class="normal"><sp/>));</highlight></codeline> |
---|
182 | <codeline lineno="85"><highlight class="normal"></highlight></codeline> |
---|
183 | <codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pSerializer<sp/>=<sp/>(<sp/>(DOMImplementationLS*)pImplementation<sp/>)->createDOMWriter();</highlight></codeline> |
---|
184 | <codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>set<sp/>user<sp/>specified<sp/>end<sp/>of<sp/>line<sp/>sequence<sp/>and<sp/>output<sp/>encoding</highlight><highlight class="normal"></highlight></codeline> |
---|
185 | <codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pSerializer->setNewLine(<sp/>XMLString::transcode(<sp/></highlight><highlight class="stringliteral">"\n"</highlight><highlight class="normal"><sp/>)<sp/>);</highlight></codeline> |
---|
186 | <codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>optionally,<sp/>set<sp/>the<sp/>format-pretty-print<sp/>feature</highlight><highlight class="normal"></highlight></codeline> |
---|
187 | <codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint,<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">))</highlight></codeline> |
---|
188 | <codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint,<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">);</highlight></codeline> |
---|
189 | <codeline lineno="92"><highlight class="normal"></highlight></codeline> |
---|
190 | <codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pDoc<sp/>=<sp/>NULL;</highlight></codeline> |
---|
191 | <codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Clean();</highlight></codeline> |
---|
192 | <codeline lineno="95"><highlight class="normal">}</highlight></codeline> |
---|
193 | <codeline lineno="96"><highlight class="normal"></highlight></codeline> |
---|
194 | <codeline lineno="97"><highlight class="normal">RootElement::~RootElement()</highlight></codeline> |
---|
195 | <codeline lineno="98"><highlight class="normal">{</highlight></codeline> |
---|
196 | <codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XMLString::release(<sp/>(XMLCh**)&transcodedFileName<sp/>);</highlight></codeline> |
---|
197 | <codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pSerializer->release();</highlight></codeline> |
---|
198 | <codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pDoc->release();</highlight></codeline> |
---|
199 | <codeline lineno="102"><highlight class="normal"></highlight></codeline> |
---|
200 | <codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classAssertXercesIsAlive" kindref="compound" tooltip="Class initializing Xerces library.">AssertXercesIsAlive</ref><sp/>dummy;<sp/></highlight><highlight class="comment">//<sp/>TODO<sp/>je<sp/>zde<sp/>treba?</highlight><highlight class="normal"></highlight></codeline> |
---|
201 | <codeline lineno="104"><highlight class="normal">}</highlight></codeline> |
---|
202 | <codeline lineno="105"><highlight class="normal"></highlight></codeline> |
---|
203 | <codeline lineno="106"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>RootElement::Clean()</highlight></codeline> |
---|
204 | <codeline lineno="107"><highlight class="normal">{</highlight></codeline> |
---|
205 | <codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>pDoc<sp/>)<sp/>pDoc->release();</highlight></codeline> |
---|
206 | <codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pDoc<sp/>=<sp/>pImplementation->createDocument(<sp/></highlight></codeline> |
---|
207 | <codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XMLString::transcode(<sp/></highlight><highlight class="stringliteral">"M3K<sp/>USER<sp/>INFO"</highlight><highlight class="normal"><sp/>),<sp/></highlight></codeline> |
---|
208 | <codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XMLString::transcode(<sp/></highlight><highlight class="stringliteral">"ROOT"</highlight><highlight class="normal"><sp/>),<sp/>NULL<sp/>);</highlight></codeline> |
---|
209 | <codeline lineno="112"><highlight class="normal">}</highlight></codeline> |
---|
210 | <codeline lineno="113"><highlight class="normal"></highlight></codeline> |
---|
211 | <codeline lineno="115" refid="classRootElement_1888749537060fd60a939486cd2e73b9b" refkind="member"><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classRootElement_1888749537060fd60a939486cd2e73b9b" kindref="member" tooltip="this method loads root element and all its subnodes from the attached file">RootElement::Load</ref>(<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>)<sp/></highlight></codeline> |
---|
212 | <codeline lineno="116"><highlight class="normal">{</highlight></codeline> |
---|
213 | <codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>LocalFileInputSource<sp/>inputSource(<sp/>transcodedFileName<sp/>);<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
214 | <codeline lineno="118"><highlight class="normal"></highlight></codeline> |
---|
215 | <codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>XercesDOMParser<sp/>parser;</highlight></codeline> |
---|
216 | <codeline lineno="121"><highlight class="normal"></highlight></codeline> |
---|
217 | <codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>parser.setValidationScheme(XercesDOMParser::Val_Auto);</highlight></codeline> |
---|
218 | <codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>parser.setDoNamespaces(</highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline> |
---|
219 | <codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>parser.setDoSchema(</highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline> |
---|
220 | <codeline lineno="125"><highlight class="normal"></highlight></codeline> |
---|
221 | <codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>parser.parse(<sp/>inputSource<sp/>);</highlight></codeline> |
---|
222 | <codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>parser.getErrorCount()<sp/>)</highlight></codeline> |
---|
223 | <codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline> |
---|
224 | <codeline lineno="129"><highlight class="normal"></highlight></codeline> |
---|
225 | <codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>DOMDocument<sp/>*<sp/>newDoc<sp/>=<sp/>parser.adoptDocument();<sp/><sp/></highlight></codeline> |
---|
226 | <codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>newDoc<sp/>==<sp/>NULL<sp/>)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
227 | <codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline> |
---|
228 | <codeline lineno="133"><highlight class="normal"></highlight></codeline> |
---|
229 | <codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<sp/>pDoc<sp/>)<sp/></highlight></codeline> |
---|
230 | <codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pDoc->release();</highlight></codeline> |
---|
231 | <codeline lineno="136"><highlight class="normal"></highlight></codeline> |
---|
232 | <codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pDoc<sp/>=<sp/>newDoc;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
233 | <codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
234 | <codeline lineno="139"><highlight class="normal">}</highlight></codeline> |
---|
235 | <codeline lineno="140"><highlight class="normal"></highlight></codeline> |
---|
236 | <codeline lineno="141"><highlight class="normal"></highlight></codeline> |
---|
237 | <codeline lineno="143" refid="classRootElement_15ce717e64c3b7be09f695e6ede6294db" refkind="member"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classRootElement_15ce717e64c3b7be09f695e6ede6294db" kindref="member" tooltip="this method saves all the previsoulsy attached DOMElements into the file">RootElement::Save</ref><sp/>(<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>)</highlight></codeline> |
---|
238 | <codeline lineno="144"><highlight class="normal">{</highlight></codeline> |
---|
239 | <codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>LocalFileFormatTarget<sp/>outputTarget(<sp/>transcodedFileName<sp/>);<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
240 | <codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pSerializer->writeNode(<sp/>&outputTarget,<sp/>*pDoc);</highlight></codeline> |
---|
241 | <codeline lineno="147"><highlight class="normal">}<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
---|
242 | <codeline lineno="148"><highlight class="normal"></highlight></codeline> |
---|
243 | <codeline lineno="149" refid="classRootElement_19ad2ae1c73d73b06bc98afa0f32d9ad3" refkind="member"><highlight class="normal"><ref refid="classRootElement_19ad2ae1c73d73b06bc98afa0f32d9ad3" kindref="member" tooltip="this operator allows to use a RootElement instance whenever a DOMElement variable...">RootElement::operator DOMElement& </ref>()</highlight></codeline> |
---|
244 | <codeline lineno="150"><highlight class="normal">{</highlight></codeline> |
---|
245 | <codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>*(pDoc->getDocumentElement());</highlight></codeline> |
---|
246 | <codeline lineno="152"><highlight class="normal">}</highlight></codeline> |
---|
247 | <codeline lineno="153"><highlight class="normal"></highlight></codeline> |
---|
248 | <codeline lineno="154"><highlight class="normal"></highlight></codeline> |
---|
249 | <codeline lineno="155"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classTypedUserInfo" kindref="compound" tooltip="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is...">TypedUserInfo<bool></ref>&<sp/><ref refid="classTypedUserInfo" kindref="compound" tooltip="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is...">TypedUserInfo<bool>::instance</ref><sp/>=<sp/>BoolUI();</highlight></codeline> |
---|
250 | <codeline lineno="156"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classTypedUserInfo" kindref="compound" tooltip="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is...">TypedUserInfo<int></ref>&<sp/><ref refid="classTypedUserInfo" kindref="compound" tooltip="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is...">TypedUserInfo<int>::instance</ref><sp/>=<sp/>IntUI();</highlight></codeline> |
---|
251 | <codeline lineno="157"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classTypedUserInfo" kindref="compound" tooltip="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is...">TypedUserInfo<double></ref>&<sp/><ref refid="classTypedUserInfo" kindref="compound" tooltip="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is...">TypedUserInfo<double>::instance</ref><sp/>=<sp/>DoubleUI();</highlight></codeline> |
---|
252 | <codeline lineno="158"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classTypedUserInfo" kindref="compound" tooltip="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is...">TypedUserInfo<string></ref>&<sp/><ref refid="classTypedUserInfo" kindref="compound" tooltip="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is...">TypedUserInfo<string>::instance</ref><sp/>=<sp/>StringUI();</highlight></codeline> |
---|
253 | </programlisting> |
---|
254 | <location file="/home/smidl/work/git/mixpp/bdm/userinfo.cpp"/> |
---|
255 | </compounddef> |
---|
256 | </doxygen> |
---|