ejson/ejson__Object.html

368 lines
25 KiB
HTML

<!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">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<h1>ejson Library</h1>
<li>ejson</li>
<ul>
<li><a href="ejson__Array.html">Array</a></li>
<li><a href="ejson__Boolean.html">Boolean</a></li>
<li><a href="ejson__Document.html">Document</a></li>
<li><a href="ejson__Null.html">Null</a></li>
<li><a href="ejson__Number.html">Number</a></li>
<li><a href="ejson__Object.html">Object</a></li>
<li><a href="ejson__String.html">String</a></li>
<li><a href="ejson__Value.html">Value</a></li>
<li><a href="ejson__filePos.html">filePos</a></li>
</ul>
<li><a href="ejson__nodeType.html">nodeType</a></li>
</ul>
</div>
</div>
<div class="container" id="content">
<h1>Class: ejson::Object</h1>
<br/>
<h2>Synopsis:</h2>
<pre>
+ <a class="code-function" href="#Object">Object</a> (<span class="code-type">void</span>);<br>+ ~<a class="code-function" href="#Object">Object</a> (<span class="code-type">void</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#exist">exist</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <a href="ejson__Value.html" class="code-type">ejson::Value</a> * <a class="code-function" href="#get">get</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <a href="ejson__Object.html" class="code-type">ejson::Object</a> * <a class="code-function" href="#getObject">getObject</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <a href="ejson__Array.html" class="code-type">ejson::Array</a> * <a class="code-function" href="#getArray">getArray</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <a href="ejson__Null.html" class="code-type">ejson::Null</a> * <a class="code-function" href="#getNull">getNull</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <a href="ejson__String.html" class="code-type">ejson::String</a> * <a class="code-function" href="#getString">getString</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <a class="code-function" href="#getStringValue">getStringValue</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> <a class="code-function" href="#getStringValue">getStringValue</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,<br/> <span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_errorValue</span>);<br>+ <a href="ejson__Boolean.html" class="code-type">ejson::Boolean</a> * <a class="code-function" href="#getBoolean">getBoolean</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#getBooleanValue">getBooleanValue</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,<br/> <span class="code-type">bool</span> <span class="code-argument">_errorValue</span>);<br>+ <a href="ejson__Number.html" class="code-type">ejson::Number</a> * <a class="code-function" href="#getNumber">getNumber</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <span class="code-type">double</span> <a class="code-function" href="#getNumberValue">getNumberValue</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,<br/> <span class="code-type">double</span> <span class="code-argument">_errorValue</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#add">add</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,<br/> <a href="ejson__Value.html" class="code-type">ejson::Value</a> * <span class="code-argument">_value</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#addString">addString</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,<br/> <span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_value</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#addNull">addNull</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#addBoolean">addBoolean</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,<br/> <span class="code-type">bool</span> <span class="code-argument">_value</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#addNumber">addNumber</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,<br/> <span class="code-type">double</span> <span class="code-argument">_value</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#iParse">iParse</a> (<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_data</span>,<br/> <span class="code-type">size_t</span> & <span class="code-argument">_pos</span>,<br/> <a href="ejson__filePos.html" class="code-type">ejson::filePos</a> & <span class="code-argument">_filePos</span>,<br/> <a href="ejson__Document.html" class="code-type">ejson::Document</a> & <span class="code-argument">_doc</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#iGenerate">iGenerate</a> (<a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_data</span>,<br/> <span class="code-type">size_t</span> <span class="code-argument">_indent</span>);<br>+ <span class="code-storage-keyword">enum</span> nodeType <a class="code-function" href="#getType">getType</a> (<span class="code-type">void</span>);<br>+ <a href="ejson__Object.html" class="code-type">ejson::Object</a> * <a class="code-function" href="#toObject">toObject</a> (<span class="code-type">void</span>);<br>+ <span class="code-storage-keyword">const</span> <a href="ejson__Object.html" class="code-type">ejson::Object</a> * <a class="code-function" href="#toObject">toObject</a> (<span class="code-type">void</span>);<br>+ <span class="code-type">void</span> <a class="code-function" href="#clear">clear</a> (<span class="code-type">void</span>);<br>+ <span class="code-type">bool</span> <a class="code-function" href="#transfertIn">transfertIn</a> (<a href="ejson__Value.html" class="code-type">ejson::Value</a> * <span class="code-argument">_obj</span>);<br>+ <a href="ejson__Value.html" class="code-type">ejson::Value</a> * <a class="code-function" href="#duplicate">duplicate</a> (<span class="code-type">void</span>);<br></pre>
<h2>Object Hierarchy:</h2>
<pre>
<a href="ejson__Value.html">ejson::Value</a>
+--> <b>ejson::Object</b>
+--> <a href="ejson__Document.html">ejson::Document</a>
</pre>
<br/>
<h2>Detail:<h2>
<h3>ejson::<a id="Object">Object</a> ()</h3>
<pre>
<span class="code-function">Object</span>(<span class="code-type">void</span>);</pre>
<br/>
basic element of a xml structure
<br/><br/>
<hr/>
<h3>ejson::~<a id="Object">Object</a> ()</h3>
<pre>
~<span class="code-function">Object</span>(<span class="code-type">void</span>);</pre>
<br/>
destructor
<br/><br/>
<hr/>
<h3><a id="exist">exist</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">exist</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
check if an element exist.
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object.
<br/><b>Return:</b> The existance of the element.
<br/></ul>
<br/>
<hr/>
<h3><a id="get">get</a> ()</h3>
<pre>
<a href="ejson__Value.html" class="code-type">ejson::Value</a> * <span class="code-function">get</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
get the sub element with his name (no cast check)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> pointer on the element requested or NULL if it not the corect type or does not existed
<br/></ul>
<br/>
<hr/>
<h3><a id="getObject">getObject</a> ()</h3>
<pre>
<a href="ejson__Object.html" class="code-type">ejson::Object</a> * <span class="code-function">getObject</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
get the sub element with his name (Casted as Object if it is possible)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> pointer on the element requested or NULL if it not the corect type or does not existed
<br/></ul>
<br/>
<hr/>
<h3><a id="getArray">getArray</a> ()</h3>
<pre>
<a href="ejson__Array.html" class="code-type">ejson::Array</a> * <span class="code-function">getArray</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
get the sub element with his name (Casted as Array if it is possible)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> pointer on the element requested or NULL if it not the corect type or does not existed
<br/></ul>
<br/>
<hr/>
<h3><a id="getNull">getNull</a> ()</h3>
<pre>
<a href="ejson__Null.html" class="code-type">ejson::Null</a> * <span class="code-function">getNull</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
get the sub element with his name (Casted as Null if it is possible)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> pointer on the element requested or NULL if it not the corect type or does not existed
<br/></ul>
<br/>
<hr/>
<h3><a id="getString">getString</a> ()</h3>
<pre>
<a href="ejson__String.html" class="code-type">ejson::String</a> * <span class="code-function">getString</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
get the sub element with his name (Casted as String if it is possible)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> pointer on the element requested or NULL if it not the corect type or does not existed
<br/></ul>
<br/>
<hr/>
<h3><a id="getStringValue">getStringValue</a> ()</h3>
<pre>
<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-function">getStringValue</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
get the sub string value of the requested element
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> Value of the string or an error string (empty)
<br/></ul>
<br/>
<hr/>
<h3><a id="getStringValue">getStringValue</a> ()</h3>
<pre>
<a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> <span class="code-function">getStringValue</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,
<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_errorValue</span>);</pre>
<br/>
get the sub string value of the requested element (with error return value)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Parameter [input]:</b> <span class="code-argument">_errorValue</span> The return value if the element does not exist.
<br/><b>Return:</b> Value of the string or an error string (empty)
<br/></ul>
<br/>
<hr/>
<h3><a id="getBoolean">getBoolean</a> ()</h3>
<pre>
<a href="ejson__Boolean.html" class="code-type">ejson::Boolean</a> * <span class="code-function">getBoolean</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
get the sub element with his name (Casted as Boolean if it is possible)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> pointer on the element requested or NULL if it not the corect type or does not existed
<br/></ul>
<br/>
<hr/>
<h3><a id="getBooleanValue">getBooleanValue</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">getBooleanValue</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,
<span class="code-type">bool</span> <span class="code-argument">_errorValue</span>);</pre>
<br/>
get the sub boolean value of the requested element.
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object.
<br/><b>Parameter [input]:</b> <span class="code-argument">_errorValue</span> The return value if the element does not exist.
<br/><b>Return:</b> Value of the Boolean or the _errorValue;
<br/></ul>
<br/>
<hr/>
<h3><a id="getNumber">getNumber</a> ()</h3>
<pre>
<a href="ejson__Number.html" class="code-type">ejson::Number</a> * <span class="code-function">getNumber</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
get the sub element with his name (Casted as Number if it is possible)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> pointer on the element requested or NULL if it not the corect type or does not existed
<br/></ul>
<br/>
<hr/>
<h3><a id="getNumberValue">getNumberValue</a> ()</h3>
<pre>
<span class="code-type">double</span> <span class="code-function">getNumberValue</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,
<span class="code-type">double</span> <span class="code-argument">_errorValue</span>);</pre>
<br/>
get the sub Number value of the requested element.
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object.
<br/><b>Parameter [input]:</b> <span class="code-argument">_errorValue</span> The return value if the element does not exist.
<br/><b>Return:</b> Value of the Number or the _errorValue;
<br/></ul>
<br/>
<hr/>
<h3><a id="add">add</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">add</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,
<a href="ejson__Value.html" class="code-type">ejson::Value</a> * <span class="code-argument">_value</span>);</pre>
<br/>
add an element in the Object
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Parameter [input]:</b> <span class="code-argument">_value</span> Element to add
<br/><b>Return:</b> false if an error occured
<br/></ul>
<br/>
<hr/>
<h3><a id="addString">addString</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">addString</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,
<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_value</span>);</pre>
<br/>
add a string element in the Object (automatic creation)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Parameter [input]:</b> <span class="code-argument">_value</span> string value to add
<br/><b>Return:</b> false if an error occured
<br/></ul>
<br/>
<hr/>
<h3><a id="addNull">addNull</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">addNull</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>);</pre>
<br/>
add a "null" element in the Object (automatic creation)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Return:</b> false if an error occured
<br/></ul>
<br/>
<hr/>
<h3><a id="addBoolean">addBoolean</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">addBoolean</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,
<span class="code-type">bool</span> <span class="code-argument">_value</span>);</pre>
<br/>
add a boolean element in the Object (automatic creation)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Parameter [input]:</b> <span class="code-argument">_value</span> boolean value to add
<br/><b>Return:</b> false if an error occured
<br/></ul>
<br/>
<hr/>
<h3><a id="addNumber">addNumber</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">addNumber</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_name</span>,
<span class="code-type">double</span> <span class="code-argument">_value</span>);</pre>
<br/>
add a double element in the Object (automatic creation)
<br/><ul>
<b>Parameter [input]:</b> <span class="code-argument">_name</span> name of the object
<br/><b>Parameter [input]:</b> <span class="code-argument">_value</span> double value to add
<br/><b>Return:</b> false if an error occured
<br/></ul>
<br/>
<hr/>
<h3><a id="iParse">iParse</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">iParse</span>(<span class="code-storage-keyword">const</span> <a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_data</span>,
<span class="code-type">size_t</span> & <span class="code-argument">_pos</span>,
<a href="ejson__filePos.html" class="code-type">ejson::filePos</a> & <span class="code-argument">_filePos</span>,
<a href="ejson__Document.html" class="code-type">ejson::Document</a> & <span class="code-argument">_doc</span>);</pre>
<br/>
<br/>
<hr/>
<h3><a id="iGenerate">iGenerate</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">iGenerate</span>(<a href="http://www.cplusplus.com/reference/string/string/" class="code-type">std::string</a> & <span class="code-argument">_data</span>,
<span class="code-type">size_t</span> <span class="code-argument">_indent</span>);</pre>
<br/>
<br/>
<hr/>
<h3><a id="getType">getType</a> ()</h3>
<pre>
<span class="code-storage-keyword">enum</span> nodeType <span class="code-function">getType</span>(<span class="code-type">void</span>);</pre>
<br/>
<br/>
<hr/>
<h3><a id="toObject">toObject</a> ()</h3>
<pre>
<a href="ejson__Object.html" class="code-type">ejson::Object</a> * <span class="code-function">toObject</span>(<span class="code-type">void</span>);</pre>
<br/>
<br/>
<hr/>
<h3><a id="toObject">toObject</a> ()</h3>
<pre>
<span class="code-storage-keyword">const</span> <a href="ejson__Object.html" class="code-type">ejson::Object</a> * <span class="code-function">toObject</span>(<span class="code-type">void</span>);</pre>
<br/>
<br/>
<hr/>
<h3><a id="clear">clear</a> ()</h3>
<pre>
<span class="code-type">void</span> <span class="code-function">clear</span>(<span class="code-type">void</span>);</pre>
<br/>
<br/>
<hr/>
<h3><a id="transfertIn">transfertIn</a> ()</h3>
<pre>
<span class="code-type">bool</span> <span class="code-function">transfertIn</span>(<a href="ejson__Value.html" class="code-type">ejson::Value</a> * <span class="code-argument">_obj</span>);</pre>
<br/>
<br/>
<hr/>
<h3><a id="duplicate">duplicate</a> ()</h3>
<pre>
<a href="ejson__Value.html" class="code-type">ejson::Value</a> * <span class="code-function">duplicate</span>(<span class="code-type">void</span>);</pre>
<br/>
<br/>
<hr/>
</div>
</body>
</html>