[DOC] update doc

This commit is contained in:
Edouard DUPIN 2014-10-18 09:19:59 +02:00
parent 308c294d1b
commit 28a0e43f38
16 changed files with 786 additions and 596 deletions

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,11 @@
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
@ -39,33 +44,33 @@
<br/><br/>
<h2>Constructor and Destructor:</h2>
<pre>
+ <a class="code-function" href="#6042">Boolean</a> (<span class="code-type" >bool</span> <span class="code-argument">_value</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#6044">~Boolean</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
+ <a class="code-function" href="#4055">Boolean</a> (<span class="code-type" >bool</span> <span class="code-argument">_value</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#4057">~Boolean</a> ();<br/></pre>
<br/>
<h2>Synopsis:</h2>
<pre>
# <span class="code-type" >bool</span> <a class="code-member" href="#6046">m_value</a>;<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#6047">set</a> (<span class="code-type" >bool</span> <span class="code-argument">_value</span>);<br/>+ <span class="code-type" >bool</span> <a class="code-function" href="#6049">get</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#6051">iParse</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#6056">iGenerate</a> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">enum</span> nodeType <a class="code-function" href="#6059">getType</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Boolean.html">ejson::Boolean</a>* <a class="code-function" href="#6061">toBoolean</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">const</span> <a class="code-type" href="class_ejson__Boolean.html">ejson::Boolean</a>* <a class="code-function" href="#6063">toBoolean</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#6065">transfertIn</a> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <a class="code-function" href="#6067">duplicate</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
# <span class="code-type" >bool</span> <a class="code-member" href="#4058">m_value</a>;<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#4059">set</a> (<span class="code-type" >bool</span> <span class="code-argument">_value</span>);<br/>+ <span class="code-type" >bool</span> <a class="code-function" href="#4061">get</a> () <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#4062">iParse</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#4067">iGenerate</a> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#4070">transfertIn</a> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <a class="code-function" href="#4072">duplicate</a> () <span class="code-storage-keyword">const</span>;<br/></pre>
<br/>
<h2>Object Hierarchy:<h2>
<pre>
+<a href="class_ejson__Value.html">ejson::Value</a><br/> +--> ejson::Boolean<br/></pre>
<h2>Detail:</h2>
<a id="6042"/><a id="6044"/><h3>Boolean</h3><pre>
<a id="4055"/><a id="4057"/><h3>Boolean</h3><pre>
+ <span class="code-function">Boolean</span> (<span class="code-type" >bool</span> <span class="code-argument">_value</span>);<br/></pre>
basic element of a xml structure<br/>
<br/>
<hr/>
<a id="6046"/><h3>~Boolean</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~Boolean</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="4058"/><h3>~Boolean</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~Boolean</span> ();<br/></pre>
destructor<br/>
<br/>
<hr/>
<a id="6047"/><h3>m_value</h3><pre>
<a id="4059"/><h3>m_value</h3><pre>
# <span class="code-type" >bool</span> <span class="code-member">m_value</span>;<br/></pre>
value of the node<br/>
<br/>
<hr/>
<a id="6049"/><h3>set</h3><pre>
<a id="4061"/><h3>set</h3><pre>
+ <span class="code-type" >void</span> <span class="code-function">set</span> (<span class="code-type" >bool</span> <span class="code-argument">_value</span>);<br/></pre>
set the value of the node.<br/><ul>
<table class="parameter-list">
@ -75,8 +80,8 @@ set the value of the node.<br/><ul>
<br/>
<hr/>
<a id="6051"/><h3>get</h3><pre>
+ <span class="code-type" >bool</span> <span class="code-function">get</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
<a id="4062"/><h3>get</h3><pre>
+ <span class="code-type" >bool</span> <span class="code-function">get</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
get the current element Value.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>the reference of the string value.</td></tr></table>
@ -84,7 +89,7 @@ get the current element Value.<br/><ul>
<br/>
<hr/>
<a id="6056"/><h3>iParse</h3><pre>
<a id="4067"/><h3>iParse</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">iParse</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/></pre>
parse the Current node [pure VIRUAL]<br/><ul>
<table class="parameter-list">
@ -97,7 +102,7 @@ parse the Current node [pure VIRUAL]<br/><ul>
<br/>
<hr/>
<a id="6059"/><h3>iGenerate</h3><pre>
<a id="4070"/><h3>iGenerate</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">iGenerate</span> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/></pre>
generate a string with the tree of the xml<br/><ul>
<table class="parameter-list">
@ -108,34 +113,7 @@ generate a string with the tree of the xml<br/><ul>
<br/>
<hr/>
<a id="6061"/><h3>getType</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">enum</span> nodeType <span class="code-function">getType</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
get the node type.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>the type of the Node.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="6063"/><h3>toBoolean</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Boolean.html">ejson::Boolean</a>* <span class="code-function">toBoolean</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
Cast the element in a Boolean if it is possible.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>pointer on the class or NULL.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="6065"/><h3>toBoolean</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">const</span> <a class="code-type" href="class_ejson__Boolean.html">ejson::Boolean</a>* <span class="code-function">toBoolean</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
Cast the element in a Boolean if it is possible.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>pointer on the class or NULL.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="6067"/><h3>transfertIn</h3><pre>
<a id="4072"/><h3>transfertIn</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">transfertIn</span> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/></pre>
Tranfert all element in the element set in parameter<br/><b>Note:</b> all element is remove from the curent element.<br/> <ul>
<table class="parameter-list">
@ -146,7 +124,7 @@ Tranfert all element in the element set in parameter<br/><b>Note:</b> all elemen
<br/>
<hr/>
<h3>duplicate</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-function">duplicate</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-function">duplicate</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
Copy the curent node and all the child in the curent one.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>NULL in an error occured, the pointer on the element otherwise</td></tr></table>

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,11 @@
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
@ -39,27 +44,27 @@
<br/><br/>
<h2>Constructor and Destructor:</h2>
<pre>
+ <a class="code-function" href="#5948">Null</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#5950">~Null</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
+ <a class="code-function" href="#3950">Null</a> ();<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#3951">~Null</a> ();<br/></pre>
<br/>
<h2>Synopsis:</h2>
<pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#5952">iParse</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#5957">iGenerate</a> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">enum</span> nodeType <a class="code-function" href="#5960">getType</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Null.html">ejson::Null</a>* <a class="code-function" href="#5962">toNull</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">const</span> <a class="code-type" href="class_ejson__Null.html">ejson::Null</a>* <a class="code-function" href="#5964">toNull</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#5966">transfertIn</a> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <a class="code-function" href="#5968">duplicate</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#3952">iParse</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#3957">iGenerate</a> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#3960">transfertIn</a> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <a class="code-function" href="#3962">duplicate</a> () <span class="code-storage-keyword">const</span>;<br/></pre>
<br/>
<h2>Object Hierarchy:<h2>
<pre>
+<a href="class_ejson__Value.html">ejson::Value</a><br/> +--> ejson::Null<br/></pre>
<h2>Detail:</h2>
<a id="5948"/><a id="5950"/><h3>Null</h3><pre>
+ <span class="code-function">Null</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3950"/><a id="3951"/><h3>Null</h3><pre>
+ <span class="code-function">Null</span> ();<br/></pre>
basic element of a xml structure<br/>
<br/>
<hr/>
<a id="5952"/><h3>~Null</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~Null</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3952"/><h3>~Null</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~Null</span> ();<br/></pre>
destructor<br/>
<br/>
<hr/>
<a id="5957"/><h3>iParse</h3><pre>
<a id="3957"/><h3>iParse</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">iParse</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/></pre>
parse the Current node [pure VIRUAL]<br/><ul>
<table class="parameter-list">
@ -72,7 +77,7 @@ parse the Current node [pure VIRUAL]<br/><ul>
<br/>
<hr/>
<a id="5960"/><h3>iGenerate</h3><pre>
<a id="3960"/><h3>iGenerate</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">iGenerate</span> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/></pre>
generate a string with the tree of the xml<br/><ul>
<table class="parameter-list">
@ -83,34 +88,7 @@ generate a string with the tree of the xml<br/><ul>
<br/>
<hr/>
<a id="5962"/><h3>getType</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">enum</span> nodeType <span class="code-function">getType</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
get the node type.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>the type of the Node.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="5964"/><h3>toNull</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Null.html">ejson::Null</a>* <span class="code-function">toNull</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
Cast the element in a Null if it is possible.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>pointer on the class or NULL.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="5966"/><h3>toNull</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">const</span> <a class="code-type" href="class_ejson__Null.html">ejson::Null</a>* <span class="code-function">toNull</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
Cast the element in a Null if it is possible.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>pointer on the class or NULL.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="5968"/><h3>transfertIn</h3><pre>
<a id="3962"/><h3>transfertIn</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">transfertIn</span> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/></pre>
Tranfert all element in the element set in parameter<br/><b>Note:</b> all element is remove from the curent element.<br/> <ul>
<table class="parameter-list">
@ -121,7 +99,7 @@ Tranfert all element in the element set in parameter<br/><b>Note:</b> all elemen
<br/>
<hr/>
<h3>duplicate</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-function">duplicate</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-function">duplicate</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
Copy the curent node and all the child in the curent one.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>NULL in an error occured, the pointer on the element otherwise</td></tr></table>

View File

@ -17,6 +17,11 @@
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
@ -39,33 +44,33 @@
<br/><br/>
<h2>Constructor and Destructor:</h2>
<pre>
+ <a class="code-function" href="#6074">Number</a> (<span class="code-type" >double</span> <span class="code-argument">_value</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#6076">~Number</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
+ <a class="code-function" href="#4079">Number</a> (<span class="code-type" >double</span> <span class="code-argument">_value</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#4081">~Number</a> ();<br/></pre>
<br/>
<h2>Synopsis:</h2>
<pre>
# <span class="code-type" >double</span> <a class="code-member" href="#6078">m_value</a>;<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#6079">set</a> (<span class="code-type" >double</span> <span class="code-argument">_value</span>);<br/>+ <span class="code-type" >double</span> <a class="code-function" href="#6081">get</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-type" >int32_t</span> <a class="code-function" href="#6083">getInt32</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-type" >int64_t</span> <a class="code-function" href="#6085">getInt64</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#6087">iParse</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#6092">iGenerate</a> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">enum</span> nodeType <a class="code-function" href="#6095">getType</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Number.html">ejson::Number</a>* <a class="code-function" href="#6097">toNumber</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">const</span> <a class="code-type" href="class_ejson__Number.html">ejson::Number</a>* <a class="code-function" href="#6099">toNumber</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#6101">transfertIn</a> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <a class="code-function" href="#6103">duplicate</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
# <span class="code-type" >double</span> <a class="code-member" href="#4082">m_value</a>;<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#4083">set</a> (<span class="code-type" >double</span> <span class="code-argument">_value</span>);<br/>+ <span class="code-type" >double</span> <a class="code-function" href="#4085">get</a> () <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-type" >int32_t</span> <a class="code-function" href="#4086">getInt32</a> () <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-type" >int64_t</span> <a class="code-function" href="#4087">getInt64</a> () <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#4088">iParse</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#4093">iGenerate</a> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#4096">transfertIn</a> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <a class="code-function" href="#4098">duplicate</a> () <span class="code-storage-keyword">const</span>;<br/></pre>
<br/>
<h2>Object Hierarchy:<h2>
<pre>
+<a href="class_ejson__Value.html">ejson::Value</a><br/> +--> ejson::Number<br/></pre>
<h2>Detail:</h2>
<a id="6074"/><a id="6076"/><h3>Number</h3><pre>
<a id="4079"/><a id="4081"/><h3>Number</h3><pre>
+ <span class="code-function">Number</span> (<span class="code-type" >double</span> <span class="code-argument">_value</span>);<br/></pre>
basic element of a xml structure<br/>
<br/>
<hr/>
<a id="6078"/><h3>~Number</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~Number</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="4082"/><h3>~Number</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~Number</span> ();<br/></pre>
destructor<br/>
<br/>
<hr/>
<a id="6079"/><h3>m_value</h3><pre>
<a id="4083"/><h3>m_value</h3><pre>
# <span class="code-type" >double</span> <span class="code-member">m_value</span>;<br/></pre>
value of the node<br/>
<br/>
<hr/>
<a id="6081"/><h3>set</h3><pre>
<a id="4085"/><h3>set</h3><pre>
+ <span class="code-type" >void</span> <span class="code-function">set</span> (<span class="code-type" >double</span> <span class="code-argument">_value</span>);<br/></pre>
set the value of the node.<br/><ul>
<table class="parameter-list">
@ -75,8 +80,8 @@ set the value of the node.<br/><ul>
<br/>
<hr/>
<a id="6083"/><h3>get</h3><pre>
+ <span class="code-type" >double</span> <span class="code-function">get</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
<a id="4086"/><h3>get</h3><pre>
+ <span class="code-type" >double</span> <span class="code-function">get</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
Get the current element Value.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>The double number registered</td></tr></table>
@ -84,8 +89,8 @@ Get the current element Value.<br/><ul>
<br/>
<hr/>
<a id="6085"/><h3>getInt32</h3><pre>
+ <span class="code-type" >int32_t</span> <span class="code-function">getInt32</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
<a id="4087"/><h3>getInt32</h3><pre>
+ <span class="code-type" >int32_t</span> <span class="code-function">getInt32</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
Get the current element Value.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>The 32 bit integer number registered</td></tr></table>
@ -93,8 +98,8 @@ Get the current element Value.<br/><ul>
<br/>
<hr/>
<a id="6087"/><h3>getInt64</h3><pre>
+ <span class="code-type" >int64_t</span> <span class="code-function">getInt64</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
<a id="4088"/><h3>getInt64</h3><pre>
+ <span class="code-type" >int64_t</span> <span class="code-function">getInt64</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
Get the current element Value.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>The 64 bit integer number registered</td></tr></table>
@ -102,7 +107,7 @@ Get the current element Value.<br/><ul>
<br/>
<hr/>
<a id="6092"/><h3>iParse</h3><pre>
<a id="4093"/><h3>iParse</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">iParse</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/></pre>
parse the Current node [pure VIRUAL]<br/><ul>
<table class="parameter-list">
@ -115,7 +120,7 @@ parse the Current node [pure VIRUAL]<br/><ul>
<br/>
<hr/>
<a id="6095"/><h3>iGenerate</h3><pre>
<a id="4096"/><h3>iGenerate</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">iGenerate</span> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/></pre>
generate a string with the tree of the xml<br/><ul>
<table class="parameter-list">
@ -126,34 +131,7 @@ generate a string with the tree of the xml<br/><ul>
<br/>
<hr/>
<a id="6097"/><h3>getType</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">enum</span> nodeType <span class="code-function">getType</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
get the node type.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>the type of the Node.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="6099"/><h3>toNumber</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Number.html">ejson::Number</a>* <span class="code-function">toNumber</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
Cast the element in a Number if it is possible.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>pointer on the class or NULL.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="6101"/><h3>toNumber</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">const</span> <a class="code-type" href="class_ejson__Number.html">ejson::Number</a>* <span class="code-function">toNumber</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
Cast the element in a Number if it is possible.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>pointer on the class or NULL.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="6103"/><h3>transfertIn</h3><pre>
<a id="4098"/><h3>transfertIn</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">transfertIn</span> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/></pre>
Tranfert all element in the element set in parameter<br/><b>Note:</b> all element is remove from the curent element.<br/> <ul>
<table class="parameter-list">
@ -164,7 +142,7 @@ Tranfert all element in the element set in parameter<br/><b>Note:</b> all elemen
<br/>
<hr/>
<h3>duplicate</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-function">duplicate</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-function">duplicate</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
Copy the curent node and all the child in the curent one.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>NULL in an error occured, the pointer on the element otherwise</td></tr></table>

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,11 @@
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
@ -39,33 +44,33 @@
<br/><br/>
<h2>Constructor and Destructor:</h2>
<pre>
+ <a class="code-function" href="#5796">String</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_value</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#5798">~String</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
+ <a class="code-function" href="#3845">String</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_value</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#3847">~String</a> ();<br/></pre>
<br/>
<h2>Synopsis:</h2>
<pre>
# <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> <a class="code-member" href="#5800">m_value</a>;<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#5801">set</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_value</span>);<br/>+ <span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <a class="code-function" href="#5803">get</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#5805">iParse</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#5810">iGenerate</a> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">enum</span> nodeType <a class="code-function" href="#5813">getType</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__String.html">ejson::String</a>* <a class="code-function" href="#5815">toString</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">const</span> <a class="code-type" href="class_ejson__String.html">ejson::String</a>* <a class="code-function" href="#5817">toString</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#5819">transfertIn</a> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <a class="code-function" href="#5821">duplicate</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
# <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> <a class="code-member" href="#3848">m_value</a>;<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#3849">set</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_value</span>);<br/>+ <span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <a class="code-function" href="#3851">get</a> () <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#3852">iParse</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#3857">iGenerate</a> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <a class="code-function" href="#3860">transfertIn</a> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <a class="code-function" href="#3862">duplicate</a> () <span class="code-storage-keyword">const</span>;<br/></pre>
<br/>
<h2>Object Hierarchy:<h2>
<pre>
+<a href="class_ejson__Value.html">ejson::Value</a><br/> +--> ejson::String<br/></pre>
<h2>Detail:</h2>
<a id="5796"/><a id="5798"/><h3>String</h3><pre>
<a id="3845"/><a id="3847"/><h3>String</h3><pre>
+ <span class="code-function">String</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_value</span>);<br/></pre>
basic element of a xml structure<br/>
<br/>
<hr/>
<a id="5800"/><h3>~String</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~String</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3848"/><h3>~String</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~String</span> ();<br/></pre>
destructor<br/>
<br/>
<hr/>
<a id="5801"/><h3>m_value</h3><pre>
<a id="3849"/><h3>m_value</h3><pre>
# <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> <span class="code-member">m_value</span>;<br/></pre>
value of the node (for element this is the name, for text it is the inside text ...)<br/>
<br/>
<hr/>
<a id="5803"/><h3>set</h3><pre>
<a id="3851"/><h3>set</h3><pre>
+ <span class="code-type" >void</span> <span class="code-function">set</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_value</span>);<br/></pre>
set the value of the node.<br/><ul>
<table class="parameter-list">
@ -75,8 +80,8 @@ set the value of the node.<br/><ul>
<br/>
<hr/>
<a id="5805"/><h3>get</h3><pre>
+ <span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-function">get</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
<a id="3852"/><h3>get</h3><pre>
+ <span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-function">get</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
get the current element Value.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>the reference of the string value.</td></tr></table>
@ -84,7 +89,7 @@ get the current element Value.<br/><ul>
<br/>
<hr/>
<a id="5810"/><h3>iParse</h3><pre>
<a id="3857"/><h3>iParse</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">iParse</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t & <span class="code-argument">_pos</span>,<br/> <a class="code-type" href="class_ejson__filePos.html">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a class="code-type" href="class_ejson__Document.html">ejson::Document</a> & <span class="code-argument">_doc</span>);<br/></pre>
parse the Current node [pure VIRUAL]<br/><ul>
<table class="parameter-list">
@ -97,7 +102,7 @@ parse the Current node [pure VIRUAL]<br/><ul>
<br/>
<hr/>
<a id="5813"/><h3>iGenerate</h3><pre>
<a id="3860"/><h3>iGenerate</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">iGenerate</span> (<a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_data</span>,<br/> size_t <span class="code-argument">_indent</span>) <span class="code-storage-keyword">const</span>;<br/></pre>
generate a string with the tree of the xml<br/><ul>
<table class="parameter-list">
@ -108,34 +113,7 @@ generate a string with the tree of the xml<br/><ul>
<br/>
<hr/>
<a id="5815"/><h3>getType</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">enum</span> nodeType <span class="code-function">getType</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
get the node type.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>the type of the Node.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="5817"/><h3>toString</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__String.html">ejson::String</a>* <span class="code-function">toString</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
Cast the element in a String if it is possible.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>pointer on the class or NULL.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="5819"/><h3>toString</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-storage-keyword">const</span> <a class="code-type" href="class_ejson__String.html">ejson::String</a>* <span class="code-function">toString</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
Cast the element in a String if it is possible.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>pointer on the class or NULL.</td></tr></table>
</ul>
<br/>
<hr/>
<a id="5821"/><h3>transfertIn</h3><pre>
<a id="3862"/><h3>transfertIn</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <span class="code-type" >bool</span> <span class="code-function">transfertIn</span> (<a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-argument">_obj</span>);<br/></pre>
Tranfert all element in the element set in parameter<br/><b>Note:</b> all element is remove from the curent element.<br/> <ul>
<table class="parameter-list">
@ -146,7 +124,7 @@ Tranfert all element in the element set in parameter<br/><b>Note:</b> all elemen
<br/>
<hr/>
<h3>duplicate</h3><pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-function">duplicate</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
+ <span class="code-storage-keyword">virtual</span> <a class="code-type" href="class_ejson__Value.html">ejson::Value</a>* <span class="code-function">duplicate</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
Copy the curent node and all the child in the curent one.<br/><ul>
<table class="parameter-list">
<tr><td><b>Return: </b></td><td></td><td>NULL in an error occured, the pointer on the element otherwise</td></tr></table>

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,11 @@
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
@ -34,100 +39,97 @@
</div>
</div>
<div class="container" id="content">
<h1>class: ejson::filePos</h1><hr/><h2>Description:</h2>
<br/><br/>
<h2>Associated Namespace:</h2><ul>
<h1>class: ejson::filePos</h1><hr/><h2>Associated Namespace:</h2><ul>
<a href="class_ejson__filePos.html">filePos</a></ul>
<h2>Constructor and Destructor:</h2>
<pre>
+ <a class="code-function" href="#5829">filePos</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <a class="code-function" href="#5831">filePos</a> (size_t <span class="code-argument">_line</span>,<br/> size_t <span class="code-argument">_col</span>);<br/>+ <a class="code-function" href="#5834">~filePos</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
+ <a class="code-function" href="#3868">filePos</a> ();<br/>+ <a class="code-function" href="#3869">filePos</a> (size_t <span class="code-argument">_line</span>,<br/> size_t <span class="code-argument">_col</span>);<br/>+ <a class="code-function" href="#3872">~filePos</a> ();<br/></pre>
<br/>
<h2>Synopsis:</h2>
<pre>
+ filePos & <a class="code-function" href="#5836">operator ++</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ filePos & <a class="code-function" href="#5838">operator --</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <span class="code-storage-keyword">const</span> filePos & <a class="code-function" href="#5840">operator +=</a> (<span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">const</span> filePos & <a class="code-function" href="#5842">operator +=</a> (size_t <span class="code-argument">_col</span>);<br/>+ <span class="code-storage-keyword">const</span> filePos & <a class="code-function" href="#5844">operator =</a> (<span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#5846">newLine</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <span class="code-type" >bool</span> <a class="code-function" href="#5848">check</a> (<span class="code-type" >char32_t</span> <span class="code-argument">_val</span>);<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#5850">set</a> (size_t <span class="code-argument">_line</span>,<br/> size_t <span class="code-argument">_col</span>);<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#5853">clear</a> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/>+ <span class="code-type" >int32_t</span> <a class="code-function" href="#5855">getCol</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-type" >int32_t</span> <a class="code-function" href="#5857">getLine</a> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
+ filePos & <a class="code-function" href="#3873">operator ++</a> ();<br/>+ filePos & <a class="code-function" href="#3874">operator --</a> ();<br/>+ <span class="code-storage-keyword">const</span> filePos & <a class="code-function" href="#3875">operator +=</a> (<span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/>+ <span class="code-storage-keyword">const</span> filePos & <a class="code-function" href="#3877">operator +=</a> (size_t <span class="code-argument">_col</span>);<br/>+ <span class="code-storage-keyword">const</span> filePos & <a class="code-function" href="#3879">operator =</a> (<span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#3881">newLine</a> ();<br/>+ <span class="code-type" >bool</span> <a class="code-function" href="#3882">check</a> (<span class="code-type" >char32_t</span> <span class="code-argument">_val</span>);<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#3884">set</a> (size_t <span class="code-argument">_line</span>,<br/> size_t <span class="code-argument">_col</span>);<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#3887">clear</a> ();<br/>+ <span class="code-type" >int32_t</span> <a class="code-function" href="#3888">getCol</a> () <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-type" >int32_t</span> <a class="code-function" href="#3889">getLine</a> () <span class="code-storage-keyword">const</span>;<br/></pre>
<br/>
<h2>Detail:</h2>
<a id="5829"/><a id="5831"/><h3>filePos</h3><pre>
+ <span class="code-function">filePos</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3868"/><a id="3869"/><h3>filePos</h3><pre>
+ <span class="code-function">filePos</span> ();<br/></pre>
<br/>
<br/>
<hr/>
<a id="5834"/><h3>filePos</h3><pre>
<a id="3872"/><h3>filePos</h3><pre>
+ <span class="code-function">filePos</span> (size_t <span class="code-argument">_line</span>,<br/> size_t <span class="code-argument">_col</span>);<br/></pre>
<br/>
<br/>
<hr/>
<a id="5836"/><h3>~filePos</h3><pre>
+ <span class="code-function">~filePos</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3873"/><h3>~filePos</h3><pre>
+ <span class="code-function">~filePos</span> ();<br/></pre>
<br/>
<br/>
<hr/>
<a id="5838"/><h3>operator ++</h3><pre>
+ filePos & <span class="code-function">operator ++</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3874"/><h3>operator ++</h3><pre>
+ filePos & <span class="code-function">operator ++</span> ();<br/></pre>
<br/>
<br/>
<hr/>
<a id="5840"/><h3>operator --</h3><pre>
+ filePos & <span class="code-function">operator --</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3875"/><h3>operator --</h3><pre>
+ filePos & <span class="code-function">operator --</span> ();<br/></pre>
<br/>
<br/>
<hr/>
<a id="5842"/><h3>operator +=</h3><pre>
<a id="3877"/><h3>operator +=</h3><pre>
+ <span class="code-storage-keyword">const</span> filePos & <span class="code-function">operator +=</span> (<span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/></pre>
<br/>
<br/>
<hr/>
<a id="5844"/><h3>operator +=</h3><pre>
<a id="3879"/><h3>operator +=</h3><pre>
+ <span class="code-storage-keyword">const</span> filePos & <span class="code-function">operator +=</span> (size_t <span class="code-argument">_col</span>);<br/></pre>
<br/>
<br/>
<hr/>
<a id="5846"/><h3>operator =</h3><pre>
<a id="3881"/><h3>operator =</h3><pre>
+ <span class="code-storage-keyword">const</span> filePos & <span class="code-function">operator =</span> (<span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/></pre>
<br/>
<br/>
<hr/>
<a id="5848"/><h3>newLine</h3><pre>
+ <span class="code-type" >void</span> <span class="code-function">newLine</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3882"/><h3>newLine</h3><pre>
+ <span class="code-type" >void</span> <span class="code-function">newLine</span> ();<br/></pre>
<br/>
<br/>
<hr/>
<a id="5850"/><h3>check</h3><pre>
<a id="3884"/><h3>check</h3><pre>
+ <span class="code-type" >bool</span> <span class="code-function">check</span> (<span class="code-type" >char32_t</span> <span class="code-argument">_val</span>);<br/></pre>
<br/>
<br/>
<hr/>
<a id="5853"/><h3>set</h3><pre>
<a id="3887"/><h3>set</h3><pre>
+ <span class="code-type" >void</span> <span class="code-function">set</span> (size_t <span class="code-argument">_line</span>,<br/> size_t <span class="code-argument">_col</span>);<br/></pre>
<br/>
<br/>
<hr/>
<a id="5855"/><h3>clear</h3><pre>
+ <span class="code-type" >void</span> <span class="code-function">clear</span> (<span class="code-type" >void</span> <span class="code-argument"></span>);<br/></pre>
<a id="3888"/><h3>clear</h3><pre>
+ <span class="code-type" >void</span> <span class="code-function">clear</span> ();<br/></pre>
<br/>
<br/>
<hr/>
<a id="5857"/><h3>getCol</h3><pre>
+ <span class="code-type" >int32_t</span> <span class="code-function">getCol</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
<a id="3889"/><h3>getCol</h3><pre>
+ <span class="code-type" >int32_t</span> <span class="code-function">getCol</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
<br/>
<br/>
<hr/>
<h3>getLine</h3><pre>
+ <span class="code-type" >int32_t</span> <span class="code-function">getLine</span> (<span class="code-type" >void</span> <span class="code-argument"></span>) <span class="code-storage-keyword">const</span>;<br/></pre>
+ <span class="code-type" >int32_t</span> <span class="code-function">getLine</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
<br/>
<br/>

View File

@ -1,97 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>ejson Library</title>
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="menu.css">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<h1><a href="index.html">ejson library</a></h1>
<h4><a href="http://github.com/heeroyui/ejson/">&nbsp;&nbsp;&nbsp;[ sources ]</a></h4>
<h3>API:</h3> <div id="menu">
<ul class="niveau1">
<li><a href="namespace_ejson.html">ejson</a>
</li>
</ul>
</div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
</ul><ul class="niveau1"><li><a href="../ege/index.html">ege</a></li>
</ul><ul class="niveau1"><li><a href="../esvg/index.html">esvg</a></li>
</ul><ul class="niveau1"><li><a href="../etk/index.html">etk</a></li>
</ul><ul class="niveau1"><li><a href="../exml/index.html">exml</a></li>
</ul></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
</div>
<div class="container" id="content">
<h1>enum: ejson::nodeType</h1><hr/><h2>Description:</h2>
<br/><br/>
<h2>Value list</h2>
<ul>
<table class="enumeration-list"><tr>
<tr>
<td><a href="#typeUnknow">typeUnknow</a></td><td><a href="#typeValue">typeValue</a></td><td><a href="#typeDocument">typeDocument</a></td></tr>
<tr>
<td><a href="#typeArray">typeArray</a></td><td><a href="#typeString">typeString</a></td><td><a href="#typeNumber">typeNumber</a></td></tr>
<tr>
<td><a href="#typeBoolean">typeBoolean</a></td><td><a href="#typeNull">typeNull</a></td><td><a href="#typeObject">typeObject</a></td></tr>
</table>
</ul>
<h2>Detail:</h2>
<h3><a id="typeUnknow"/>typeUnknow</h3><pre>
typeUnknow = <span class="code-type">0<span></pre>
might be an error ...<br/><hr/>
<h3><a id="typeValue"/>typeValue</h3><pre>
typeValue = <span class="code-type">1<span></pre>
XXXXXX:*<br/><hr/>
<h3><a id="typeDocument"/>typeDocument</h3><pre>
typeDocument = <span class="code-type">2<span></pre>
all the file main access<br/><hr/>
<h3><a id="typeArray"/>typeArray</h3><pre>
typeArray = <span class="code-type">3<span></pre>
[...]<br/><hr/>
<h3><a id="typeString"/>typeString</h3><pre>
typeString = <span class="code-type">4<span></pre>
the ""<br/><hr/>
<h3><a id="typeNumber"/>typeNumber</h3><pre>
typeNumber = <span class="code-type">5<span></pre>
the -1565.21515<br/><hr/>
<h3><a id="typeBoolean"/>typeBoolean</h3><pre>
typeBoolean = <span class="code-type">6<span></pre>
the true and false<br/><hr/>
<h3><a id="typeNull"/>typeNull</h3><pre>
typeNull = <span class="code-type">7<span></pre>
the null element<br/><hr/>
<h3><a id="typeObject"/>typeObject</h3><pre>
typeObject = <span class="code-type">8<span></pre>
the { ... }<br/> </div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46753803-1', 'heeroyui.github.io');
ga('send', 'pageview');
</script>
</body>
</html>

View File

@ -17,6 +17,11 @@
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
@ -34,7 +39,25 @@
</div>
</div>
<div class="container" id="content">
<h1>ejson</h1><br/>TODO : Main page ...<br/><br/> </div>
<h1> <div align="center">E-json library</div> </h1>
<hr>
<h2>What is EJSON, and how can I use it?</h2>
EJSON, or Ewol json file interface, is a multi-platform library for creating and reading json file.<br/>
<h2>What languages are supported?</h2>
EJSON is written in C++.<br/>
<h2>Are there any licensing restrictions?</h2>
EJSON is <span style="font-weight: bold;">FREE software</span>.<br/>
That allow you to use it for every program you want, including those developing proprietary software, without any license fees or royalties.<br/>
<h3> License (DSB) </h3>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:<br/>
<ul><li> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li><li> Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li><li> The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.</li></ul>
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br/>
<h3> Tutorials : </h3><br/>
<ul><li> <a href="tutorial_000_Build.html">Build example</a></li><li> <a href="tutorial_001_Read.html">Read a json file</a></li><li> <a href="tutorial_002_Write.html">Write a json file</a></li></ul>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

View File

@ -17,6 +17,11 @@
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
@ -40,17 +45,6 @@
<h2>namespace:</h2>
<ul>
<li><a href="namespace_ejson.html">ejson</a></li></ul>
<h2>Synopsis:</h2>
<pre>
externconstchar* <a class="code-member" href="#6070">g_ejsonLibName</a>;<br/></pre>
<br/>
<h2>Detail:</h2>
<a id="6070"/><h3>g_ejsonLibName</h3><pre>
externconstchar* <span class="code-member">g_ejsonLibName</span>;<br/></pre>
<br/>
<br/>
<hr/>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

View File

@ -17,6 +17,11 @@
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
@ -39,17 +44,20 @@
<br/><br/>
<h2>class:</h2>
<ul>
<li><a href="class_ejson__Document.html">Document</a></li><li><a href="class_ejson__String.html">String</a></li><li><a href="class_ejson__filePos.html">filePos</a></li><li><a href="class_ejson__Value.html">Value</a></li><li><a href="class_ejson__Null.html">Null</a></li><li><a href="class_ejson__Object.html">Object</a></li><li><a href="class_ejson__Boolean.html">Boolean</a></li><li><a href="class_ejson__Number.html">Number</a></li><li><a href="class_ejson__Array.html">Array</a></li></ul>
<h2>enum:</h2>
<ul>
<li><a href="enum_ejson__nodeType.html">nodeType</a></li></ul>
<li><a href="class_ejson__Document.html">Document</a></li><li><a href="class_ejson__String.html">String</a></li><li><a href="class_ejson__Value.html">Value</a></li><li><a href="class_ejson__Null.html">Null</a></li><li><a href="class_ejson__Object.html">Object</a></li><li><a href="class_ejson__Boolean.html">Boolean</a></li><li><a href="class_ejson__Number.html">Number</a></li><li><a href="class_ejson__Array.html">Array</a></li></ul>
<h2>Synopsis:</h2>
<pre>
<a class="code-type" href="class_etk__CCout.html">etk::CCout</a> & <a class="code-function" href="#5859">operator <<</a> (<a class="code-type" href="class_etk__CCout.html">etk::CCout</a> & <span class="code-argument">_os</span>,<br/> <span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/></pre>
std::ostream & <a class="code-function" href="#3890">operator <<</a> (std::ostream & <span class="code-argument">_os</span>,<br/> <span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/> <span class="code-type" >int32_t</span> <a class="code-function" href="#4075">getLogId</a> ();<br/></pre>
<br/>
<h2>Detail:</h2>
<a id="5859"/><h3>operator <<</h3><pre>
<a class="code-type" href="class_etk__CCout.html">etk::CCout</a> & <span class="code-function">operator <<</span> (<a class="code-type" href="class_etk__CCout.html">etk::CCout</a> & <span class="code-argument">_os</span>,<br/> <span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/></pre>
<a id="3890"/><a id="4075"/><h3>operator <<</h3><pre>
std::ostream & <span class="code-function">operator <<</span> (std::ostream & <span class="code-argument">_os</span>,<br/> <span class="code-storage-keyword">const</span> filePos & <span class="code-argument">_obj</span>);<br/></pre>
<br/>
<br/>
<hr/>
<h3>getLogId</h3><pre>
<span class="code-type" >int32_t</span> <span class="code-function">getLogId</span> ();<br/></pre>
<br/>
<br/>

87
tutorial_000_Build.html Normal file
View File

@ -0,0 +1,87 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>ejson Library</title>
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="menu.css">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<h1><a href="index.html">ejson library</a></h1>
<h4><a href="http://github.com/heeroyui/ejson/">&nbsp;&nbsp;&nbsp;[ sources ]</a></h4>
<h3>API:</h3> <div id="menu">
<ul class="niveau1">
<li><a href="namespace_ejson.html">ejson</a>
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
</ul><ul class="niveau1"><li><a href="../ege/index.html">ege</a></li>
</ul><ul class="niveau1"><li><a href="../esvg/index.html">esvg</a></li>
</ul><ul class="niveau1"><li><a href="../etk/index.html">etk</a></li>
</ul><ul class="niveau1"><li><a href="../exml/index.html">exml</a></li>
</ul></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
</div>
<div class="container" id="content">
<h1><center>build</center></h1>
<hr> <div align="right"><a href="tutorial_001_Read.html">Next: Read</a></div>
<h1><center>E-json extract and build examples</center></h1>
<hr><div align="right"><a href="tutorial_001_Read.html">Next: Read a file</a></div><br/>
All developpement software will start by getting the dependency and the sources.<br/>
<h2> Linux dependency packages </h2>
<pre>
sudo apt-get install g++ zlib1g-dev
<span class="code-preproc"># if you want to compile with clang :</span>
sudo apt-get install clang
</pre><br/>
<h2> Download instructions </h2><br/>
Download the software :
<pre>
<span class="code-preproc"># create a working directory path</span>
mkdir your_workspace_path
cd your_workspace_path
<span class="code-preproc"># clone ewol and all sub-library</span>
git clone http://github.com/HeeroYui/ewol.git
cd ewol
git submodule init
git submodule update
cd ..
<span class="code-preproc"># download examples</span>
git clone http://github.com/HeeroYui/example.git
</pre><br/>
<br/>
<b>Note:</b><pre>
The full build tool documentation is availlable here : <a href="http://heeroyui.github.io/lutin/">lutin</a>
</pre><br/>
<h2> Common build instructions </h2><br/>
Compile software in debug for the curent platform :
<pre>
./ewol/build/lutin.py -mdebug ejson*
</pre><br/>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46753803-1', 'heeroyui.github.io');
ga('send', 'pageview');
</script>
</body>
</html>

291
tutorial_001_Read.html Normal file
View File

@ -0,0 +1,291 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>ejson Library</title>
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="menu.css">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<h1><a href="index.html">ejson library</a></h1>
<h4><a href="http://github.com/heeroyui/ejson/">&nbsp;&nbsp;&nbsp;[ sources ]</a></h4>
<h3>API:</h3> <div id="menu">
<ul class="niveau1">
<li><a href="namespace_ejson.html">ejson</a>
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
</ul><ul class="niveau1"><li><a href="../ege/index.html">ege</a></li>
</ul><ul class="niveau1"><li><a href="../esvg/index.html">esvg</a></li>
</ul><ul class="niveau1"><li><a href="../etk/index.html">etk</a></li>
</ul><ul class="niveau1"><li><a href="../exml/index.html">exml</a></li>
</ul></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
</div>
<div class="container" id="content">
<h1><center>read</center></h1>
<hr><div align="left"><a href="tutorial_000_Build.html">Previous: Build</a></div> <div align="right"><a href="tutorial_002_Write.html">Next: Write</a></div>
<h1><center>Read a json file</center></h1>
<hr><div align="left"><a href="tutorial_000_Build.html">Previous: Build example</a></div> <div align="right"><a href="tutorial_002_Write.html">Next: Write a file</a></div><br/>
A json file is like a xml, but in a simplest way.
It is in the minimum constituated of:
<pre>
{}
</pre>
This is the simplest json code.<br/>
for example we will use the next json file :
<pre>
{
"element1":25622.53,
"element2":"a string...",
"is active":false,
"NULL element":null,
"exampleObject":{
"a string":"my super example of string",
"a null element":null,
"an array element":[
12, 25, 65, 654
],
"a boolean Element":true,
"a simple sumber"=156156.343,
"an other object":{
"plop": 1,
"plop2": 2
}
},
"exampleArray":[
12,
25,
65,
654,
{
"plup": true,
"plup2": false
},
true,
null,
[ 22, 23, 24, 25]
}
}
</pre><br/>
<br/>
<h1> Open the file </h1><br/>
The first step to open a file is to create the json document:<br/>
<pre>
<span class="code-preproc">#include &lt;ejson/ejson.h&gt;
</span>
<span class="code-type">int</span> <span class="code-function-name">main(</span>) <span class="code-operator">{</span>
<span class="code-comment">// declare document
</span> <span class="code-class">ejson::Document</span> doc;
...
<span class="code-operator">}</span>
</pre><br/>
<h2> Load a stored file </h2><br/>
It is important to remember that the input file is manage by etk,
then the naming form is describe by the class: <a href="class_etk__FSNode.html">etk::FSNode</a><br/>
<pre>
<span class="code-comment">// read file
</span> <span class="code-keyword">if </span>(doc.<span class="code-function-name">load(</span><span class="code-text-quote">"DATA:example.json"</span>) <span class="code-operator">==</span> <span class="<code-operator">false</span>) <span class="code-operator">{</span>
<span class="code-function-name">APPL_ERROR(</span><span class="code-text-quote">"An error occured when reading the file..."</span>);
<span class="code-comment">// TODO : STANDARDIZE ERROR....
</span> <span class="code-keyword">return </span>-<span class="code-number">1</span>;
<span class="code-operator">}</span>
</pre><br/>
<h2> Load a file stored in memory </h2><br/>
This step is easyest has a reading in a file.<br/>
In the first step, declare a string containing the json description:
<pre>
std:string myJson = <span class="code-text-quote">"{ \"element1\":25622.53, \"element2\":\"a string...\" }"</span>;
</pre><br/>
Now we just need to load the string:
<pre>
<span class="code-keyword">if </span>(doc.<span class="code-function-name">parse(</span>myJson) <span class="code-operator">==</span> <span class="<code-operator">false</span>) <span class="code-operator">{</span>
<span class="code-function-name">APPL_ERROR(</span><span class="code-text-quote">"An error occured when parsing the string"</span>);
<span class="code-keyword">return </span>-<span class="code-number">1</span>;
<span class="code-operator">}</span>
</pre><br/>
it could be interesting to add some \n in the string to find some error in the json string<br/>
<h1> Access on the data </h1><br/>
now we have the data stored in the doc instance, it could be interesting to access on it.<br/>
Despite of XML interface that is not designed to be keep in memory but just parsed and drop,
the json element is many time use as a simple interface to acces on the data.<br/>
This is the reason for this json interfce is designed for simple acces and use.<br/>
<h2> The simple way </h2><br/>
Read a number value in the doc:
<pre>
<span class="code-type">double</span> myValue = doc.<span class="code-function-name">getNumberValue(</span><span class="code-text-quote">"element1"</span>, <span class="code-number">49</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Get the element value:"</span> &lt;&lt; myValue);
</pre>
Note that we had a return value, in case of the element is not present or in the wrong form.<br/>
We have the same interface for boolean, string and number:
<ul><li> ejson::Object::getNumberValue</li><li> ejson::Object::getStringValue</li><li> ejson::Object::getBooleanValue</li></ul>
These interface methode are availlable for <a href="class_ejson__Document.html">ejson::Document</a>, <a href="class_ejson__Object.html">ejson::Object</a>.
The similar interface are availlable on <a href="class_ejson_Array.html">ejson:Array</a>:
<ul><li> ejson::Array::getNumberValue</li><li> ejson::Array::getStringValue</li><li> ejson::Array::getBooleanValue</li></ul>
It could be interesting to remember that the maain node of a json file in an object,
this is the reason that <a href="class_ejson__Document.html">ejson::Document</a> herited of <a href="class_ejson__Object.html">ejson::Object</a>.<br/>
<h2> The generic way </h2><br/>
The classical way to read a json file is to parse it like a xml:<br/>
<h3> Object </h3>
We are now reading all node in an object:
<pre>
<span class="code-class">ejson::Object</span>* obj = doc.<span class="code-function-name">getObject(</span><span class="code-text-quote">"exampleObject"</span>);
<span class="code-comment">// note that the obj is NULL if it not an "Object"
</span> <span class="code-keyword">if </span>(obj <span class="code-operator">==</span> <span class="code-generic-define">NULL</span>) <span class="code-operator">{</span>
<span class="code-function-name">APPL_ERROR(</span><span class="code-text-quote">"Can not get the object 'exampleObject' in the json file"</span>);
<span class="code-keyword">return </span>-<span class="code-number">1</span>;
<span class="code-operator">}</span>
</pre>
Note at this point we can parse an object in 2 way:<br/>
1: The fastest but not the best:
<pre>
<span class="code-keyword">for </span>(<span class="code-type">size_t</span> iii=<span class="code-number">0</span>; iii &lt; obj-&gt;<span class="code-function-name">size(</span>); ++iii) <span class="code-operator">{</span>
<span class="code-class">std::string</span> key = obj-&gt;<span class="code-function-name">getKey(</span>iii);
<span class="code-class">ejson::Value</span>* val = obj[iii];
<span class="code-comment">// note that error can appear, then check result...
</span> <span class="code-keyword">if </span>(val <span class="code-operator">==</span> <span class="code-generic-define">NULL</span>) <span class="code-operator">{</span>
<span class="code-function-name">APPL_ERROR(</span><span class="code-text-quote">"Can not read the object id="</span> &lt;&lt; iii);
continue;
<span class="code-operator">}</span>
<span class="code-keyword">switch(</span>val-&gt;<span class="code-function-name">getType(</span>)) <span class="code-operator">{</span>
<span class="code-keyword">case </span>typeArray: <span class="code-operator">{</span>
<span class="code-class">ejson::Array</span>* myArray = val-&gt;<span class="code-function-name">toArray(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find an Array @"</span> &lt;&lt; key);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeString: <span class="code-operator">{</span>
<span class="code-class">ejson::String</span>* myString = val-&gt;<span class="code-function-name">toString(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a String @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myString-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeNumber: <span class="code-operator">{</span>
<span class="code-class">ejson::Number</span>* myNumber = val-&gt;<span class="code-function-name">toNumber(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a Number @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myNumber-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeBoolean: <span class="code-operator">{</span>
<span class="code-class">ejson::Boolean</span>* myBoolean = val-&gt;<span class="code-function-name">toBoolean(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a Boolean @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myBoolean-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeNull:
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a null @"</span> &lt;&lt; key);
break;
<span class="code-keyword">case </span>typeObject: <span class="code-operator">{</span>
<span class="code-class">ejson::Object</span>* myObject = val-&gt;<span class="code-function-name">toObject(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find an Object @"</span> &lt;&lt; key);
<span class="code-operator">}</span> break;
<span class="code-operator">}</span>
<span class="code-operator">}</span>
</pre><br/>
2: A more generic way to acces on the elemnts:
<pre>
<span class="code-class">stk::vector</span>&lt;<span class="code-class">std::string</span>&gt; keys = obj-&gt;<span class="code-function-name">getKeys(</span>);
<span class="code-keyword">for </span>(<span class="code-storage-keyword">auto</span> key in keys) <span class="code-operator">{</span>
<span class="code-class">ejson::Value</span>* val = obj[key];
<span class="code-comment">// note that error can appear, then check result...
</span> <span class="code-keyword">if </span>(val <span class="code-operator">==</span> <span class="code-generic-define">NULL</span>) <span class="code-operator">{</span>
<span class="code-function-name">APPL_ERROR(</span><span class="code-text-quote">"Can not read the object key="</span> &lt;&lt; key);
continue;
<span class="code-operator">}</span>
<span class="code-keyword">switch(</span>val-&gt;<span class="code-function-name">getType(</span>)) <span class="code-operator">{</span>
<span class="code-keyword">case </span>typeArray: <span class="code-operator">{</span>
<span class="code-class">ejson::Array</span>* myArray = val-&gt;<span class="code-function-name">toArray(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find an Array @"</span> &lt;&lt; key);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeString: <span class="code-operator">{</span>
<span class="code-class">ejson::String</span>* myString = val-&gt;<span class="code-function-name">toString(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a String @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myString-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeNumber: <span class="code-operator">{</span>
<span class="code-class">ejson::Number</span>* myNumber = val-&gt;<span class="code-function-name">toNumber(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a Number @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myNumber-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeBoolean: <span class="code-operator">{</span>
<span class="code-class">ejson::Boolean</span>* myBoolean = val-&gt;<span class="code-function-name">toBoolean(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a Boolean @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myBoolean-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeNull:
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a null @"</span> &lt;&lt; key);
break;
<span class="code-keyword">case </span>typeObject: <span class="code-operator">{</span>
<span class="code-class">ejson::Object</span>* myObject = val-&gt;<span class="code-function-name">toObject(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find an Object @"</span> &lt;&lt; key);
<span class="code-operator">}</span> break;
<span class="code-operator">}</span>
<span class="code-operator">}</span>
</pre><br/>
<h3> Array </h3><br/>
We are now reading all node in an Array:
<pre>
<span class="code-class">ejson::Array</span>* obj = doc.<span class="code-function-name">getArray(</span><span class="code-text-quote">"exampleArray"</span>);
<span class="code-comment">// note that the obj is NULL if it not an "Array"
</span> <span class="code-keyword">if </span>(obj <span class="code-operator">==</span> <span class="code-generic-define">NULL</span>) <span class="code-operator">{</span>
<span class="code-function-name">APPL_ERROR(</span><span class="code-text-quote">"Can not get the array 'exampleArray' in the json file"</span>);
<span class="code-keyword">return </span>-<span class="code-number">1</span>;
<span class="code-operator">}</span>
</pre><br/>
Note for an array we have only one methode to parse the data :<br/>
<pre>
<span class="code-keyword">for </span>(<span class="code-type">size_t</span> iii=<span class="code-number">0</span>; iii &lt; obj-&gt;<span class="code-function-name">size(</span>); ++iii) <span class="code-operator">{</span>
<span class="code-class">ejson::Value</span>* val = obj[iii];
<span class="code-comment">// or ejson::Value* val = obj-&gt;get(iii);
</span> <span class="code-comment">// note that error can appear, then check result...
</span> <span class="code-keyword">if </span>(val <span class="code-operator">==</span> <span class="code-generic-define">NULL</span>) <span class="code-operator">{</span>
<span class="code-function-name">APPL_ERROR(</span><span class="code-text-quote">"Can not read the object id="</span> &lt;&lt; iii);
continue;
<span class="code-operator">}</span>
<span class="code-keyword">switch(</span>val-&gt;<span class="code-function-name">getType(</span>)) <span class="code-operator">{</span>
<span class="code-keyword">case </span>typeArray: <span class="code-operator">{</span>
<span class="code-class">ejson::Array</span>* myArray = val-&gt;<span class="code-function-name">toArray(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find an Array @"</span> &lt;&lt; key);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeString: <span class="code-operator">{</span>
<span class="code-class">ejson::String</span>* myString = val-&gt;<span class="code-function-name">toString(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a String @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myString-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeNumber: <span class="code-operator">{</span>
<span class="code-class">ejson::Number</span>* myNumber = val-&gt;<span class="code-function-name">toNumber(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a Number @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myNumber-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeBoolean: <span class="code-operator">{</span>
<span class="code-class">ejson::Boolean</span>* myBoolean = val-&gt;<span class="code-function-name">toBoolean(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a Boolean @"</span> &lt;&lt; key &lt;&lt; <span class="code-text-quote">" value='"</span> &lt;&lt; myBoolean-&gt;<span class="code-function-name">get(</span>) &lt;&lt; <span class="code-text-quote">"'"</span>);
<span class="code-operator">}</span> break;
<span class="code-keyword">case </span>typeNull:
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find a null @"</span> &lt;&lt; key);
break;
<span class="code-keyword">case </span>typeObject: <span class="code-operator">{</span>
<span class="code-class">ejson::Object</span>* myObject = val-&gt;<span class="code-function-name">toObject(</span>);
<span class="code-function-name">APPL_INFO(</span><span class="code-text-quote">"Find an Object @"</span> &lt;&lt; key);
<span class="code-operator">}</span> break;
<span class="code-operator">}</span>
<span class="code-operator">}</span>
</pre><br/>
It is important to note that many time the user know what type will appear in a list or in an object , then you can directly use:
<ul><li> ejson::Array::getNumber</li><li> ejson::Array::getNull</li><li> ejson::Array::getArray</li><li> ejson::Array::getObject</li><li> ejson::Array::getBoolean</li><li> ejson::Array::getstring</li></ul>These fuction automatly cast the resut in the good form (if it is the real one)<br/>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46753803-1', 'heeroyui.github.io');
ga('send', 'pageview');
</script>
</body>
</html>

56
tutorial_002_Write.html Normal file
View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>ejson Library</title>
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="menu.css">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<h1><a href="index.html">ejson library</a></h1>
<h4><a href="http://github.com/heeroyui/ejson/">&nbsp;&nbsp;&nbsp;[ sources ]</a></h4>
<h3>API:</h3> <div id="menu">
<ul class="niveau1">
<li><a href="namespace_ejson.html">ejson</a>
</li>
</ul>
</div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_Read.html">Read</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_002_Write.html">Write</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
</ul><ul class="niveau1"><li><a href="../ege/index.html">ege</a></li>
</ul><ul class="niveau1"><li><a href="../esvg/index.html">esvg</a></li>
</ul><ul class="niveau1"><li><a href="../etk/index.html">etk</a></li>
</ul><ul class="niveau1"><li><a href="../exml/index.html">exml</a></li>
</ul></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
</div>
<div class="container" id="content">
<h1><center>write</center></h1>
<hr><div align="left"><a href="tutorial_001_Read.html">Previous: Read</a></div>
<h1><center>Write a json file</center></h1>
<hr><div align="left"><a href="tutorial_001_Read.html">Previous: Read a file</a></div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46753803-1', 'heeroyui.github.io');
ga('send', 'pageview');
</script>
</body>
</html>