source: NonGTP/FCollada/Documentation/_f_u_xml_writer_8h-source.html @ 964

Revision 964, 16.3 KB checked in by igarcia, 18 years ago (diff)
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>FCollada: FUtils/FUXmlWriter.h Source File</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.4.6-NO -->
8<div class="tabs">
9  <ul>
10    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11    <li><a href="modules.html"><span>Modules</span></a></li>
12    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13    <li><a href="classes.html"><span>Classes</span></a></li>
14    <li id="current"><a href="files.html"><span>Files</span></a></li>
15    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
16  </ul></div>
17<div class="tabs">
18  <ul>
19    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
20    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
21  </ul></div>
22<h1>FUtils/FUXmlWriter.h</h1><a href="_f_u_xml_writer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
23<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2005-2006 Feeling Software Inc.</span>
24<a name="l00003"></a>00003 <span class="comment">    MIT License: http://www.opensource.org/licenses/mit-license.php</span>
25<a name="l00004"></a>00004 <span class="comment">*/</span>
26<a name="l00005"></a>00005
27<a name="l00011"></a>00011 <span class="preprocessor">#ifndef _FU_XML_WRITER_H_</span>
28<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define _FU_XML_WRITER_H_</span>
29<a name="l00013"></a>00013 <span class="preprocessor"></span>
30<a name="l00014"></a>00014 <span class="preprocessor">#ifdef HAS_LIBXML</span>
31<a name="l00015"></a>00015 <span class="preprocessor"></span>
32<a name="l00024"></a><a class="code" href="namespace_f_u_xml_writer.html">00024</a> <span class="keyword">namespace </span>FUXmlWriter
33<a name="l00025"></a>00025 {
34<a name="l00029"></a>00029 FCOLLADA_EXPORT xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#85e246d70b7cf69dd5a82978ef63de61">CreateNode</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name);
35<a name="l00030"></a>00030
36<a name="l00035"></a>00035 FCOLLADA_EXPORT <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(xmlNode* parent, xmlNode* child);
37<a name="l00036"></a>00036
38<a name="l00042"></a>00042 FCOLLADA_EXPORT xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);
39<a name="l00043"></a>00043
40<a name="l00051"></a>00051 FCOLLADA_EXPORT xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span>* content);
41<a name="l00052"></a>00052 <span class="preprocessor">#ifdef UNICODE</span>
42<a name="l00053"></a>00053 <span class="preprocessor"></span>    FCOLLADA_EXPORT xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> fstring&amp; content);
43<a name="l00054"></a>00054 <span class="preprocessor">#endif</span>
44<a name="l00055"></a><a class="code" href="namespace_f_u_xml_writer.html#77d0000004e3f8a671062e886dcf1875">00055</a> <span class="preprocessor"></span>    <span class="keyword">inline</span> xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> string&amp; content) { <span class="keywordflow">return</span> <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(parent, name, content.c_str()); }
45<a name="l00056"></a><a class="code" href="namespace_f_u_xml_writer.html#286de2544bbb6fb1aa685102d759652e">00056</a>     <span class="keyword">inline</span> xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <a class="code" href="class_f_u_string_builder_t.html">FUSStringBuilder</a>&amp; content) { <span class="keywordflow">return</span> <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(parent, name, content.<a class="code" href="class_f_u_string_builder_t.html#1fa2543a75ae974e86aaef3ebf726e0c">ToCharPtr</a>()); }
46<a name="l00065"></a><a class="code" href="namespace_f_u_xml_writer.html#16ea61a32b6aabc975ae2b64b15519c8">00065</a>     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">inline</span> xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> T&amp; value) { <a class="code" href="_f_u_string_builder_8h.html#f59ffe58166fe5771701c630749dde26">globalSBuilder</a>.<a class="code" href="class_f_u_string_builder_t.html#552095c3500bbcbee1c474f91af1b537">set</a>(value); <span class="keywordflow">return</span> <a class="code" href="namespace_f_u_xml_writer.html#66fe48121f1fb959fc118e4046370ee4">AddChild</a>(parent, name, <a class="code" href="_f_u_string_builder_8h.html#f59ffe58166fe5771701c630749dde26">globalSBuilder</a>); }
47<a name="l00066"></a>00066
48<a name="l00072"></a>00072 FCOLLADA_EXPORT <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#7823ae9f79f17f2b285d632b258cce36">AddSibling</a>(xmlNode* sibling, xmlNode* dangling);
49<a name="l00073"></a>00073
50<a name="l00080"></a>00080 FCOLLADA_EXPORT xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#7823ae9f79f17f2b285d632b258cce36">AddSibling</a>(xmlNode* sibling, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);
51<a name="l00081"></a>00081
52<a name="l00089"></a>00089 FCOLLADA_EXPORT xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#78c12e2a621e0e8ca33fb081767f2dd9">AddChildOnce</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span>* content=NULL);
53<a name="l00090"></a><a class="code" href="namespace_f_u_xml_writer.html#2d2ef86016ebfb469993cae445e515cf">00090</a>     <span class="keyword">inline</span> xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#78c12e2a621e0e8ca33fb081767f2dd9">AddChildOnce</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> string&amp; content) { <span class="keywordflow">return</span> <a class="code" href="namespace_f_u_xml_writer.html#78c12e2a621e0e8ca33fb081767f2dd9">AddChildOnce</a>(parent, name, content.c_str()); }
54<a name="l00091"></a><a class="code" href="namespace_f_u_xml_writer.html#36196a53016323a75acbaf329c5dd4f6">00091</a>     <span class="keyword">inline</span> xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#78c12e2a621e0e8ca33fb081767f2dd9">AddChildOnce</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <a class="code" href="class_f_u_string_builder_t.html">FUSStringBuilder</a>&amp; content) { <span class="keywordflow">return</span> <a class="code" href="namespace_f_u_xml_writer.html#78c12e2a621e0e8ca33fb081767f2dd9">AddChildOnce</a>(parent, name, content.<a class="code" href="class_f_u_string_builder_t.html#1fa2543a75ae974e86aaef3ebf726e0c">ToCharPtr</a>()); }
55<a name="l00100"></a><a class="code" href="namespace_f_u_xml_writer.html#3783512c48959836acb5ba406d1cbf16">00100</a>     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">inline</span> xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#78c12e2a621e0e8ca33fb081767f2dd9">AddChildOnce</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> T&amp; value) { <a class="code" href="_f_u_string_builder_8h.html#f59ffe58166fe5771701c630749dde26">globalSBuilder</a>.<a class="code" href="class_f_u_string_builder_t.html#552095c3500bbcbee1c474f91af1b537">set</a>(value); <span class="keywordflow">return</span> <a class="code" href="namespace_f_u_xml_writer.html#78c12e2a621e0e8ca33fb081767f2dd9">AddChildOnce</a>(parent, name, <a class="code" href="_f_u_string_builder_8h.html#f59ffe58166fe5771701c630749dde26">globalSBuilder</a>); }
56<a name="l00101"></a>00101
57<a name="l00106"></a>00106 FCOLLADA_EXPORT <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#02ff003ae29ad264904e7b08882e80ac">AddContent</a>(xmlNode* node, <span class="keyword">const</span> <span class="keywordtype">char</span>* content);
58<a name="l00107"></a>00107 <span class="preprocessor">#ifdef UNICODE</span>
59<a name="l00108"></a>00108 <span class="preprocessor"></span>    FCOLLADA_EXPORT <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#02ff003ae29ad264904e7b08882e80ac">AddContent</a>(xmlNode* node, <span class="keyword">const</span> fstring&amp; content);
60<a name="l00109"></a>00109 <span class="preprocessor">#endif</span>
61<a name="l00110"></a><a class="code" href="namespace_f_u_xml_writer.html#d637856af62ad0075477c8acc7945ebc">00110</a> <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#02ff003ae29ad264904e7b08882e80ac">AddContent</a>(xmlNode* node, <span class="keyword">const</span> string&amp; content) { <a class="code" href="namespace_f_u_xml_writer.html#02ff003ae29ad264904e7b08882e80ac">AddContent</a>(node, content.c_str()); }
62<a name="l00111"></a><a class="code" href="namespace_f_u_xml_writer.html#ab5202a096c51cff7a3de46e8eabc5d1">00111</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#02ff003ae29ad264904e7b08882e80ac">AddContent</a>(xmlNode* node, <a class="code" href="class_f_u_string_builder_t.html">FUSStringBuilder</a>&amp; content) { <a class="code" href="namespace_f_u_xml_writer.html#02ff003ae29ad264904e7b08882e80ac">AddContent</a>(node, content.<a class="code" href="class_f_u_string_builder_t.html#1fa2543a75ae974e86aaef3ebf726e0c">ToCharPtr</a>()); }
63<a name="l00117"></a><a class="code" href="namespace_f_u_xml_writer.html#bca9b2f08bdeef4e294aae6b06534c6a">00117</a>     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#02ff003ae29ad264904e7b08882e80ac">AddContent</a>(xmlNode* node, <span class="keyword">const</span> T&amp; value) { <a class="code" href="_f_u_string_builder_8h.html#f59ffe58166fe5771701c630749dde26">globalSBuilder</a>.<a class="code" href="class_f_u_string_builder_t.html#552095c3500bbcbee1c474f91af1b537">set</a>(value); <span class="keywordflow">return</span> <a class="code" href="namespace_f_u_xml_writer.html#02ff003ae29ad264904e7b08882e80ac">AddContent</a>(node, <a class="code" href="_f_u_string_builder_8h.html#f59ffe58166fe5771701c630749dde26">globalSBuilder</a>); }
64<a name="l00118"></a>00118
65<a name="l00124"></a>00124 FCOLLADA_EXPORT <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#b9ebd2938c18cd5db3b919c035621584">AddAttribute</a>(xmlNode* node, <span class="keyword">const</span> <span class="keywordtype">char</span>* attributeName, <span class="keyword">const</span> <span class="keywordtype">char</span>* attributeValue);
66<a name="l00125"></a>00125 <span class="preprocessor">#ifdef UNICODE</span>
67<a name="l00126"></a>00126 <span class="preprocessor"></span>    FCOLLADA_EXPORT <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#b9ebd2938c18cd5db3b919c035621584">AddAttribute</a>(xmlNode* node, <span class="keyword">const</span> <span class="keywordtype">char</span>* attributeName, <span class="keyword">const</span> fstring&amp; attributeValue);
68<a name="l00127"></a>00127 <span class="preprocessor">#endif</span>
69<a name="l00128"></a><a class="code" href="namespace_f_u_xml_writer.html#4c85785fb978c9d2247cfbb6dfe4900d">00128</a> <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#b9ebd2938c18cd5db3b919c035621584">AddAttribute</a>(xmlNode* node, <span class="keyword">const</span> <span class="keywordtype">char</span>* attributeName, <a class="code" href="class_f_u_string_builder_t.html">FUSStringBuilder</a>&amp; attributeValue) { <a class="code" href="namespace_f_u_xml_writer.html#b9ebd2938c18cd5db3b919c035621584">AddAttribute</a>(node, attributeName, attributeValue.<a class="code" href="class_f_u_string_builder_t.html#1fa2543a75ae974e86aaef3ebf726e0c">ToCharPtr</a>()); }
70<a name="l00129"></a><a class="code" href="namespace_f_u_xml_writer.html#bd83e1c9245580aea21d1eee1f451296">00129</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#b9ebd2938c18cd5db3b919c035621584">AddAttribute</a>(xmlNode* node, <span class="keyword">const</span> <span class="keywordtype">char</span>* attributeName, <span class="keyword">const</span> string&amp; attributeValue) { <a class="code" href="namespace_f_u_xml_writer.html#b9ebd2938c18cd5db3b919c035621584">AddAttribute</a>(node, attributeName, attributeValue.c_str()); }
71<a name="l00136"></a><a class="code" href="namespace_f_u_xml_writer.html#4671e82b576669752058b1f3774f43f3">00136</a>     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#b9ebd2938c18cd5db3b919c035621584">AddAttribute</a>(xmlNode* node, <span class="keyword">const</span> <span class="keywordtype">char</span>* attributeName, <span class="keyword">const</span> T&amp; attributeValue) { <a class="code" href="_f_u_string_builder_8h.html#f59ffe58166fe5771701c630749dde26">globalSBuilder</a>.<a class="code" href="class_f_u_string_builder_t.html#552095c3500bbcbee1c474f91af1b537">set</a>(attributeValue); <a class="code" href="namespace_f_u_xml_writer.html#b9ebd2938c18cd5db3b919c035621584">AddAttribute</a>(node, attributeName, <a class="code" href="_f_u_string_builder_8h.html#f59ffe58166fe5771701c630749dde26">globalSBuilder</a>.<a class="code" href="class_f_u_string_builder_t.html#1fa2543a75ae974e86aaef3ebf726e0c">ToCharPtr</a>()); }
72<a name="l00137"></a>00137
73<a name="l00143"></a>00143 FCOLLADA_EXPORT <span class="keywordtype">void</span> <a class="code" href="namespace_f_u_xml_writer.html#fd57a15f0dd904df3565fe58803663d5">AddChildSorted</a>(xmlNode* parent, xmlNode* child);
74<a name="l00144"></a>00144
75<a name="l00152"></a>00152 FCOLLADA_EXPORT xmlNode* <a class="code" href="namespace_f_u_xml_writer.html#fd57a15f0dd904df3565fe58803663d5">AddChildSorted</a>(xmlNode* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span>* content=NULL);
76<a name="l00153"></a>00153 };
77<a name="l00154"></a>00154
78<a name="l00155"></a>00155 <span class="preprocessor">#endif // HAS_LIBXML</span>
79<a name="l00156"></a>00156 <span class="preprocessor"></span>
80<a name="l00157"></a>00157 <span class="preprocessor">#endif // _FU_XML_WRITER_H_</span>
81</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:39 2006 for FCollada by&nbsp;
82<a href="http://www.doxygen.org/index.html">
83<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
84</body>
85</html>
Note: See TracBrowser for help on using the repository browser.