Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /usr/share/doc/libjsoncpp-dev/jsoncpp-api-html/ |
Current File : //usr/share/doc/libjsoncpp-dev/jsoncpp-api-html/value_8h_source.html |
<html> <head> <title> JsonCpp - JSON data format manipulation library </title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table width="100%"> <tr> <td width="40%" align="left" valign="center"> <a href="http://sourceforge.net/projects/jsoncpp/"> JsonCpp project page </a> </td> <td width="40%" align="right" valign="center"> <a href="http://jsoncpp.sourceforge.net">JsonCpp home page</a> </td> </tr> </table> <hr> <!-- Generated by Doxygen 1.7.6.1 --> <script type="text/javascript" src="dynsections.js"></script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_4a513f00ac6f820f728ea1da220c722d.html">include</a> </li> <li class="navelem"><a class="el" href="dir_abbbe21bc939c291dbf8401e36600451.html">json</a> </li> </ul> </div> </div> <div class="header"> <div class="headertitle"> <div class="title">value.h</div> </div> </div><!--header--> <div class="contents"> <a href="value_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright 2007-2010 Baptiste Lepilleur</span> <a name="l00002"></a>00002 <span class="comment">// Distributed under MIT license, or public domain if desired and</span> <a name="l00003"></a>00003 <span class="comment">// recognized in your jurisdiction.</span> <a name="l00004"></a>00004 <span class="comment">// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE</span> <a name="l00005"></a>00005 <a name="l00006"></a>00006 <span class="preprocessor">#ifndef CPPTL_JSON_H_INCLUDED</span> <a name="l00007"></a>00007 <span class="preprocessor"></span><span class="preprocessor"># define CPPTL_JSON_H_INCLUDED</span> <a name="l00008"></a>00008 <span class="preprocessor"></span> <a name="l00009"></a>00009 <span class="preprocessor">#if !defined(JSON_IS_AMALGAMATION)</span> <a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor"># include "<a class="code" href="forwards_8h.html">forwards.h</a>"</span> <a name="l00011"></a>00011 <span class="preprocessor">#endif // if !defined(JSON_IS_AMALGAMATION)</span> <a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor"># include <string></span> <a name="l00013"></a>00013 <span class="preprocessor"># include <vector></span> <a name="l00014"></a>00014 <a name="l00015"></a>00015 <span class="preprocessor"># ifndef JSON_USE_CPPTL_SMALLMAP</span> <a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor"># include <map></span> <a name="l00017"></a>00017 <span class="preprocessor"># else</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor"># include <cpptl/smallmap.h></span> <a name="l00019"></a>00019 <span class="preprocessor"># endif</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor"># ifdef JSON_USE_CPPTL</span> <a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor"># include <cpptl/forwards.h></span> <a name="l00022"></a>00022 <span class="preprocessor"># endif</span> <a name="l00023"></a>00023 <span class="preprocessor"></span> <a name="l00026"></a>00026 <span class="keyword">namespace </span>Json { <a name="l00027"></a>00027 <a name="l00030"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4e">00030</a> <span class="keyword">enum</span> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4e" title="Type of the value held by a Value object.">ValueType</a> <a name="l00031"></a>00031 { <a name="l00032"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4ea7d9899633b4409bd3fc107e6737f8391">00032</a> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4ea7d9899633b4409bd3fc107e6737f8391" title="'null' value">nullValue</a> = 0, <a name="l00033"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eae5a9d708d5c9e23ae9bf98898522512d">00033</a> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eae5a9d708d5c9e23ae9bf98898522512d" title="signed integer value">intValue</a>, <a name="l00034"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eaea788d9a3bb00adc6d68d97d43e1ccd3">00034</a> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eaea788d9a3bb00adc6d68d97d43e1ccd3" title="unsigned integer value">uintValue</a>, <a name="l00035"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eab837c7b869c14d8be712deb45c9e490e">00035</a> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eab837c7b869c14d8be712deb45c9e490e" title="double value">realValue</a>, <a name="l00036"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4ea804ef857affea2d415843c73f261c258">00036</a> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4ea804ef857affea2d415843c73f261c258" title="UTF-8 string value.">stringValue</a>, <a name="l00037"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4ea14c30dbf4da86f7b809be299f671f7fd">00037</a> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4ea14c30dbf4da86f7b809be299f671f7fd" title="bool value">booleanValue</a>, <a name="l00038"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eadc8f264f36b55b063c78126b335415f4">00038</a> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eadc8f264f36b55b063c78126b335415f4" title="array value (ordered list)">arrayValue</a>, <a name="l00039"></a><a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eae8386dcfc36d1ae897745f7b4f77a1f6">00039</a> <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4eae8386dcfc36d1ae897745f7b4f77a1f6" title="object value (collection of name/value pairs).">objectValue</a> <a name="l00040"></a>00040 }; <a name="l00041"></a>00041 <a name="l00042"></a><a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351">00042</a> <span class="keyword">enum</span> <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351">CommentPlacement</a> <a name="l00043"></a>00043 { <a name="l00044"></a><a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351a52f1733775460517b2ea6bedf4906d52">00044</a> <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351a52f1733775460517b2ea6bedf4906d52" title="a comment placed on the line before a value">commentBefore</a> = 0, <a name="l00045"></a><a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351a008a230a0586de54f30b76afe70fdcfa">00045</a> <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351a008a230a0586de54f30b76afe70fdcfa" title="a comment just after a value on the same line">commentAfterOnSameLine</a>, <a name="l00046"></a><a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351ac5784ca53b12250888ddb642b06aebef">00046</a> <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351ac5784ca53b12250888ddb642b06aebef" title="a comment on the line after a value (only make sense for root value)">commentAfter</a>, <a name="l00047"></a><a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351abcbd3eb00417335e094e4a03379659b5">00047</a> <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351abcbd3eb00417335e094e4a03379659b5">numberOfCommentPlacement</a> <a name="l00048"></a>00048 }; <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="comment">//# ifdef JSON_USE_CPPTL</span> <a name="l00051"></a>00051 <span class="comment">// typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;</span> <a name="l00052"></a>00052 <span class="comment">// typedef CppTL::AnyEnumerator<const Value &> EnumValues;</span> <a name="l00053"></a>00053 <span class="comment">//# endif</span> <a name="l00054"></a>00054 <a name="l00069"></a><a class="code" href="class_json_1_1_static_string.html">00069</a> <span class="keyword">class </span><a class="code" href="config_8h.html#a1d61ffde86ce1a18fd83194ff0d9a206" title="If defined, indicates that the source file is amalgated to prevent private header inclusion...">JSON_API</a> <a class="code" href="class_json_1_1_static_string.html" title="Lightweight wrapper to tag static string.">StaticString</a> <a name="l00070"></a>00070 { <a name="l00071"></a>00071 <span class="keyword">public</span>: <a name="l00072"></a><a class="code" href="class_json_1_1_static_string.html#afb6baf1ec078ce76f0b0f9b39d19437f">00072</a> <span class="keyword">explicit</span> <a class="code" href="class_json_1_1_static_string.html" title="Lightweight wrapper to tag static string.">StaticString</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *czstring ) <a name="l00073"></a>00073 : str_( czstring ) <a name="l00074"></a>00074 { <a name="l00075"></a>00075 } <a name="l00076"></a>00076 <a name="l00077"></a><a class="code" href="class_json_1_1_static_string.html#ac2b334d46bbea4c0227e508fc66433e9">00077</a> operator const char *()<span class="keyword"> const</span> <a name="l00078"></a>00078 <span class="keyword"> </span>{ <a name="l00079"></a>00079 <span class="keywordflow">return</span> str_; <a name="l00080"></a>00080 } <a name="l00081"></a>00081 <a name="l00082"></a><a class="code" href="class_json_1_1_static_string.html#ab86fc6a3183adf12fdba4b370acf1754">00082</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *c_str()<span class="keyword"> const</span> <a name="l00083"></a>00083 <span class="keyword"> </span>{ <a name="l00084"></a>00084 <span class="keywordflow">return</span> str_; <a name="l00085"></a>00085 } <a name="l00086"></a>00086 <a name="l00087"></a>00087 <span class="keyword">private</span>: <a name="l00088"></a>00088 <span class="keyword">const</span> <span class="keywordtype">char</span> *str_; <a name="l00089"></a>00089 }; <a name="l00090"></a>00090 <a name="l00118"></a><a class="code" href="class_json_1_1_value.html">00118</a> <span class="keyword">class </span><a class="code" href="config_8h.html#a1d61ffde86ce1a18fd83194ff0d9a206" title="If defined, indicates that the source file is amalgated to prevent private header inclusion...">JSON_API</a> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <a name="l00119"></a>00119 { <a name="l00120"></a><a class="code" href="class_json_1_1_value.html#ad016df56489e5d360735457afba2f649">00120</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a>; <a name="l00121"></a>00121 <span class="preprocessor"># ifdef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00122"></a><a class="code" href="class_json_1_1_value.html#aac4a3544ca0879612143a6e5abaa3862">00122</a> <span class="preprocessor"></span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a>; <a name="l00123"></a><a class="code" href="class_json_1_1_value.html#a5693f500f4762ccfa90e7a2644caa7de">00123</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a>; <a name="l00124"></a>00124 <span class="preprocessor"># endif</span> <a name="l00125"></a>00125 <span class="preprocessor"></span> <span class="keyword">public</span>: <a name="l00126"></a><a class="code" href="class_json_1_1_value.html#ac61bab5a465848b57610379cc07995c3">00126</a> <span class="keyword">typedef</span> std::vector<std::string> <a class="code" href="class_json_1_1_value.html#ac61bab5a465848b57610379cc07995c3">Members</a>; <a name="l00127"></a><a class="code" href="class_json_1_1_value.html#a341cdf2e01f8b3c5b7317aa2f0768c53">00127</a> <span class="keyword">typedef</span> <a class="code" href="class_json_1_1_value_iterator.html" title="Iterator for object and array value.">ValueIterator</a> <a class="code" href="class_json_1_1_value.html#a341cdf2e01f8b3c5b7317aa2f0768c53">iterator</a>; <a name="l00128"></a><a class="code" href="class_json_1_1_value.html#af92282ca92b58b320debd486afb7696a">00128</a> <span class="keyword">typedef</span> <a class="code" href="class_json_1_1_value_const_iterator.html" title="const iterator for object and array value.">ValueConstIterator</a> <a class="code" href="class_json_1_1_value.html#af92282ca92b58b320debd486afb7696a">const_iterator</a>; <a name="l00129"></a><a class="code" href="class_json_1_1_value.html#a0933d59b45793ae4aade1757c322a98d">00129</a> <span class="keyword">typedef</span> <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">Json::UInt</a> <a class="code" href="class_json_1_1_value.html#a0933d59b45793ae4aade1757c322a98d">UInt</a>; <a name="l00130"></a><a class="code" href="class_json_1_1_value.html#abdf7a7ff73eb130ffcab28504ffdb405">00130</a> <span class="keyword">typedef</span> <a class="code" href="namespace_json.html#a08122e8005b706d982e48cca1e2119c7">Json::Int</a> <a class="code" href="class_json_1_1_value.html#abdf7a7ff73eb130ffcab28504ffdb405">Int</a>; <a name="l00131"></a>00131 <span class="preprocessor"># if defined(JSON_HAS_INT64)</span> <a name="l00132"></a><a class="code" href="class_json_1_1_value.html#a8b62564be8c087c6d18de180ff4e13e3">00132</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="namespace_json.html#adabc96b7ce0a8791ec91ea1a3e22c107">Json::UInt64</a> <a class="code" href="class_json_1_1_value.html#a8b62564be8c087c6d18de180ff4e13e3">UInt64</a>; <a name="l00133"></a><a class="code" href="class_json_1_1_value.html#a1b86af9f85f0f1baa972c3319fa22695">00133</a> <span class="keyword">typedef</span> <a class="code" href="namespace_json.html#aba149b1f7d796287667db6c02ff65f64">Json::Int64</a> <a class="code" href="class_json_1_1_value.html#a1b86af9f85f0f1baa972c3319fa22695">Int64</a>; <a name="l00134"></a>00134 <span class="preprocessor">#endif // defined(JSON_HAS_INT64)</span> <a name="l00135"></a><a class="code" href="class_json_1_1_value.html#a1cbb82642ed05109b9833e49f042ece7">00135</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="namespace_json.html#a218d880af853ce786cd985e82571d297">Json::LargestInt</a> <a class="code" href="class_json_1_1_value.html#a1cbb82642ed05109b9833e49f042ece7">LargestInt</a>; <a name="l00136"></a><a class="code" href="class_json_1_1_value.html#a6682a3684d635e03fc06ba229fa24eec">00136</a> <span class="keyword">typedef</span> <a class="code" href="namespace_json.html#ae202ecad69725e23443f465e257456d0">Json::LargestUInt</a> <a class="code" href="class_json_1_1_value.html#a6682a3684d635e03fc06ba229fa24eec">LargestUInt</a>; <a name="l00137"></a><a class="code" href="class_json_1_1_value.html#a184a91566cccca7b819240f0d5561c7d">00137</a> <span class="keyword">typedef</span> <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">Json::ArrayIndex</a> <a class="code" href="class_json_1_1_value.html#a184a91566cccca7b819240f0d5561c7d">ArrayIndex</a>; <a name="l00138"></a>00138 <a name="l00139"></a><a class="code" href="class_json_1_1_value.html#a57d8e12306732c80d1719206fcc59b22">00139</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <a class="code" href="class_json_1_1_value.html#a57d8e12306732c80d1719206fcc59b22">null</a>; <a name="l00141"></a><a class="code" href="class_json_1_1_value.html#af91df130daa50dd43d2cd89e6ee67706">00141</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#a1cbb82642ed05109b9833e49f042ece7">LargestInt</a> <a class="code" href="class_json_1_1_value.html#af91df130daa50dd43d2cd89e6ee67706" title="Minimum signed integer value that can be stored in a Json::Value.">minLargestInt</a>; <a name="l00143"></a><a class="code" href="class_json_1_1_value.html#a8b4977696f13296fa8755c7953fafb2f">00143</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#a1cbb82642ed05109b9833e49f042ece7">LargestInt</a> <a class="code" href="class_json_1_1_value.html#a8b4977696f13296fa8755c7953fafb2f" title="Maximum signed integer value that can be stored in a Json::Value.">maxLargestInt</a>; <a name="l00145"></a><a class="code" href="class_json_1_1_value.html#a8ddb32d9d55fa5323ae5135639dc2e31">00145</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#a6682a3684d635e03fc06ba229fa24eec">LargestUInt</a> <a class="code" href="class_json_1_1_value.html#a8ddb32d9d55fa5323ae5135639dc2e31" title="Maximum unsigned integer value that can be stored in a Json::Value.">maxLargestUInt</a>; <a name="l00146"></a>00146 <a name="l00148"></a><a class="code" href="class_json_1_1_value.html#a7df8a39e2502b8c92a6a41e3d752d2c8">00148</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#abdf7a7ff73eb130ffcab28504ffdb405">Int</a> <a class="code" href="class_json_1_1_value.html#a7df8a39e2502b8c92a6a41e3d752d2c8" title="Minimum signed int value that can be stored in a Json::Value.">minInt</a>; <a name="l00150"></a><a class="code" href="class_json_1_1_value.html#a978c799a8af3114ef7dab6fd0a310a1b">00150</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#abdf7a7ff73eb130ffcab28504ffdb405">Int</a> <a class="code" href="class_json_1_1_value.html#a978c799a8af3114ef7dab6fd0a310a1b" title="Maximum signed int value that can be stored in a Json::Value.">maxInt</a>; <a name="l00152"></a><a class="code" href="class_json_1_1_value.html#ac79e63ee68d3aa914bfd6988be669b87">00152</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#a0933d59b45793ae4aade1757c322a98d">UInt</a> <a class="code" href="class_json_1_1_value.html#ac79e63ee68d3aa914bfd6988be669b87" title="Maximum unsigned int value that can be stored in a Json::Value.">maxUInt</a>; <a name="l00153"></a>00153 <a name="l00155"></a><a class="code" href="class_json_1_1_value.html#a815ef899bc312c93bc426511acfe31a7">00155</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#a1b86af9f85f0f1baa972c3319fa22695">Int64</a> <a class="code" href="class_json_1_1_value.html#a815ef899bc312c93bc426511acfe31a7" title="Minimum signed 64 bits int value that can be stored in a Json::Value.">minInt64</a>; <a name="l00157"></a><a class="code" href="class_json_1_1_value.html#a4492634870b8c5709ce967b384ac6006">00157</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#a1b86af9f85f0f1baa972c3319fa22695">Int64</a> <a class="code" href="class_json_1_1_value.html#a4492634870b8c5709ce967b384ac6006" title="Maximum signed 64 bits int value that can be stored in a Json::Value.">maxInt64</a>; <a name="l00159"></a><a class="code" href="class_json_1_1_value.html#ae1eb89c305c39516696ff305cffa01da">00159</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html#a8b62564be8c087c6d18de180ff4e13e3">UInt64</a> <a class="code" href="class_json_1_1_value.html#ae1eb89c305c39516696ff305cffa01da" title="Maximum unsigned 64 bits int value that can be stored in a Json::Value.">maxUInt64</a>; <a name="l00160"></a>00160 <a name="l00161"></a>00161 <span class="keyword">private</span>: <a name="l00162"></a>00162 <span class="preprocessor">#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION</span> <a name="l00163"></a>00163 <span class="preprocessor"></span><span class="preprocessor"># ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00164"></a>00164 <span class="preprocessor"></span> <span class="keyword">class </span>CZString <a name="l00165"></a>00165 { <a name="l00166"></a>00166 <span class="keyword">public</span>: <a name="l00167"></a>00167 <span class="keyword">enum</span> DuplicationPolicy <a name="l00168"></a>00168 { <a name="l00169"></a>00169 noDuplication = 0, <a name="l00170"></a>00170 duplicate, <a name="l00171"></a>00171 duplicateOnCopy <a name="l00172"></a>00172 }; <a name="l00173"></a>00173 CZString( <a class="code" href="class_json_1_1_value.html#a184a91566cccca7b819240f0d5561c7d">ArrayIndex</a> index ); <a name="l00174"></a>00174 CZString( <span class="keyword">const</span> <span class="keywordtype">char</span> *cstr, DuplicationPolicy allocate ); <a name="l00175"></a>00175 CZString( <span class="keyword">const</span> CZString &other ); <a name="l00176"></a>00176 ~CZString(); <a name="l00177"></a>00177 CZString &operator =( <span class="keyword">const</span> CZString &other ); <a name="l00178"></a>00178 <span class="keywordtype">bool</span> operator<( <span class="keyword">const</span> CZString &other ) <span class="keyword">const</span>; <a name="l00179"></a>00179 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> CZString &other ) <span class="keyword">const</span>; <a name="l00180"></a>00180 <a class="code" href="class_json_1_1_value.html#a184a91566cccca7b819240f0d5561c7d">ArrayIndex</a> index() <span class="keyword">const</span>; <a name="l00181"></a>00181 <span class="keyword">const</span> <span class="keywordtype">char</span> *c_str() <span class="keyword">const</span>; <a name="l00182"></a>00182 <span class="keywordtype">bool</span> isStaticString() <span class="keyword">const</span>; <a name="l00183"></a>00183 <span class="keyword">private</span>: <a name="l00184"></a>00184 <span class="keywordtype">void</span> swap( CZString &other ); <a name="l00185"></a>00185 <span class="keyword">const</span> <span class="keywordtype">char</span> *cstr_; <a name="l00186"></a>00186 <a class="code" href="class_json_1_1_value.html#a184a91566cccca7b819240f0d5561c7d">ArrayIndex</a> index_; <a name="l00187"></a>00187 }; <a name="l00188"></a>00188 <a name="l00189"></a>00189 <span class="keyword">public</span>: <a name="l00190"></a>00190 <span class="preprocessor"># ifndef JSON_USE_CPPTL_SMALLMAP</span> <a name="l00191"></a>00191 <span class="preprocessor"></span> <span class="keyword">typedef</span> std::map<CZString, Value> ObjectValues; <a name="l00192"></a>00192 <span class="preprocessor"># else</span> <a name="l00193"></a>00193 <span class="preprocessor"></span> <span class="keyword">typedef</span> CppTL::SmallMap<CZString, Value> ObjectValues; <a name="l00194"></a>00194 <span class="preprocessor"># endif // ifndef JSON_USE_CPPTL_SMALLMAP</span> <a name="l00195"></a>00195 <span class="preprocessor"></span><span class="preprocessor"># endif // ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00196"></a>00196 <span class="preprocessor"></span><span class="preprocessor">#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION</span> <a name="l00197"></a>00197 <span class="preprocessor"></span> <a name="l00198"></a>00198 <span class="keyword">public</span>: <a name="l00214"></a>00214 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4e" title="Type of the value held by a Value object.">ValueType</a> type = <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4ea7d9899633b4409bd3fc107e6737f8391" title="'null' value">nullValue</a> ); <a name="l00215"></a>00215 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <a class="code" href="namespace_json.html#a08122e8005b706d982e48cca1e2119c7">Int</a> value ); <a name="l00216"></a>00216 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">UInt</a> value ); <a name="l00217"></a>00217 <span class="preprocessor">#if defined(JSON_HAS_INT64)</span> <a name="l00218"></a>00218 <span class="preprocessor"></span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <a class="code" href="namespace_json.html#aba149b1f7d796287667db6c02ff65f64">Int64</a> value ); <a name="l00219"></a>00219 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <a class="code" href="namespace_json.html#adabc96b7ce0a8791ec91ea1a3e22c107">UInt64</a> value ); <a name="l00220"></a>00220 <span class="preprocessor">#endif // if defined(JSON_HAS_INT64)</span> <a name="l00221"></a>00221 <span class="preprocessor"></span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <span class="keywordtype">double</span> value ); <a name="l00222"></a>00222 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *value ); <a name="l00223"></a>00223 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *beginValue, <span class="keyword">const</span> <span class="keywordtype">char</span> *endValue ); <a name="l00234"></a>00234 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_static_string.html" title="Lightweight wrapper to tag static string.">StaticString</a> &value ); <a name="l00235"></a>00235 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <span class="keyword">const</span> std::string &value ); <a name="l00236"></a>00236 <span class="preprocessor"># ifdef JSON_USE_CPPTL</span> <a name="l00237"></a>00237 <span class="preprocessor"></span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <span class="keyword">const</span> CppTL::ConstString &value ); <a name="l00238"></a>00238 <span class="preprocessor"># endif</span> <a name="l00239"></a>00239 <span class="preprocessor"></span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <span class="keywordtype">bool</span> value ); <a name="l00240"></a>00240 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ); <a name="l00241"></a>00241 ~<a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>(); <a name="l00242"></a>00242 <a name="l00243"></a>00243 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator=( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ); <a name="l00247"></a>00247 <span class="keywordtype">void</span> swap( <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ); <a name="l00248"></a>00248 <a name="l00249"></a>00249 <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4e" title="Type of the value held by a Value object.">ValueType</a> type() <span class="keyword">const</span>; <a name="l00250"></a>00250 <a name="l00251"></a>00251 <span class="keywordtype">bool</span> operator <( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ) <span class="keyword">const</span>; <a name="l00252"></a>00252 <span class="keywordtype">bool</span> operator <=( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ) <span class="keyword">const</span>; <a name="l00253"></a>00253 <span class="keywordtype">bool</span> operator >=( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ) <span class="keyword">const</span>; <a name="l00254"></a>00254 <span class="keywordtype">bool</span> operator >( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ) <span class="keyword">const</span>; <a name="l00255"></a>00255 <a name="l00256"></a>00256 <span class="keywordtype">bool</span> operator ==( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ) <span class="keyword">const</span>; <a name="l00257"></a>00257 <span class="keywordtype">bool</span> operator !=( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ) <span class="keyword">const</span>; <a name="l00258"></a>00258 <a name="l00259"></a>00259 <span class="keywordtype">int</span> compare( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &other ) <span class="keyword">const</span>; <a name="l00260"></a>00260 <a name="l00261"></a>00261 <span class="keyword">const</span> <span class="keywordtype">char</span> *asCString() <span class="keyword">const</span>; <a name="l00262"></a>00262 std::string asString() <span class="keyword">const</span>; <a name="l00263"></a>00263 <span class="preprocessor"># ifdef JSON_USE_CPPTL</span> <a name="l00264"></a>00264 <span class="preprocessor"></span> CppTL::ConstString asConstString() <span class="keyword">const</span>; <a name="l00265"></a>00265 <span class="preprocessor"># endif</span> <a name="l00266"></a>00266 <span class="preprocessor"></span> <a class="code" href="namespace_json.html#a08122e8005b706d982e48cca1e2119c7">Int</a> asInt() <span class="keyword">const</span>; <a name="l00267"></a>00267 <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">UInt</a> asUInt() <span class="keyword">const</span>; <a name="l00268"></a>00268 <a class="code" href="namespace_json.html#aba149b1f7d796287667db6c02ff65f64">Int64</a> asInt64() <span class="keyword">const</span>; <a name="l00269"></a>00269 <a class="code" href="namespace_json.html#adabc96b7ce0a8791ec91ea1a3e22c107">UInt64</a> asUInt64() <span class="keyword">const</span>; <a name="l00270"></a>00270 <a class="code" href="namespace_json.html#a218d880af853ce786cd985e82571d297">LargestInt</a> asLargestInt() <span class="keyword">const</span>; <a name="l00271"></a>00271 <a class="code" href="namespace_json.html#ae202ecad69725e23443f465e257456d0">LargestUInt</a> asLargestUInt() <span class="keyword">const</span>; <a name="l00272"></a>00272 <span class="keywordtype">float</span> asFloat() <span class="keyword">const</span>; <a name="l00273"></a>00273 <span class="keywordtype">double</span> asDouble() <span class="keyword">const</span>; <a name="l00274"></a>00274 <span class="keywordtype">bool</span> asBool() <span class="keyword">const</span>; <a name="l00275"></a>00275 <a name="l00276"></a>00276 <span class="keywordtype">bool</span> isNull() <span class="keyword">const</span>; <a name="l00277"></a>00277 <span class="keywordtype">bool</span> isBool() <span class="keyword">const</span>; <a name="l00278"></a>00278 <span class="keywordtype">bool</span> isInt() <span class="keyword">const</span>; <a name="l00279"></a>00279 <span class="keywordtype">bool</span> isUInt() <span class="keyword">const</span>; <a name="l00280"></a>00280 <span class="keywordtype">bool</span> isIntegral() <span class="keyword">const</span>; <a name="l00281"></a>00281 <span class="keywordtype">bool</span> isDouble() <span class="keyword">const</span>; <a name="l00282"></a>00282 <span class="keywordtype">bool</span> isNumeric() <span class="keyword">const</span>; <a name="l00283"></a>00283 <span class="keywordtype">bool</span> isString() <span class="keyword">const</span>; <a name="l00284"></a>00284 <span class="keywordtype">bool</span> isArray() <span class="keyword">const</span>; <a name="l00285"></a>00285 <span class="keywordtype">bool</span> isObject() <span class="keyword">const</span>; <a name="l00286"></a>00286 <a name="l00287"></a>00287 <span class="keywordtype">bool</span> isConvertibleTo( <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4e" title="Type of the value held by a Value object.">ValueType</a> other ) <span class="keyword">const</span>; <a name="l00288"></a>00288 <a name="l00290"></a>00290 <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> size() <span class="keyword">const</span>; <a name="l00291"></a>00291 <a name="l00294"></a>00294 <span class="keywordtype">bool</span> empty() <span class="keyword">const</span>; <a name="l00295"></a>00295 <a name="l00297"></a>00297 <span class="keywordtype">bool</span> operator!() <span class="keyword">const</span>; <a name="l00298"></a>00298 <a name="l00302"></a>00302 <span class="keywordtype">void</span> clear(); <a name="l00303"></a>00303 <a name="l00309"></a>00309 <span class="keywordtype">void</span> resize( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> size ); <a name="l00310"></a>00310 <a name="l00316"></a>00316 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index ); <a name="l00317"></a>00317 <a name="l00323"></a>00323 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keywordtype">int</span> index ); <a name="l00324"></a>00324 <a name="l00328"></a>00328 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index ) <span class="keyword">const</span>; <a name="l00329"></a>00329 <a name="l00333"></a>00333 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; <a name="l00334"></a>00334 <a name="l00337"></a>00337 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <span class="keyword">get</span>( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index, <a name="l00338"></a>00338 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &defaultValue ) <span class="keyword">const</span>; <a name="l00340"></a>00340 <span class="keywordtype">bool</span> isValidIndex( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index ) <span class="keyword">const</span>; <a name="l00344"></a>00344 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &append( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &value ); <a name="l00345"></a>00345 <a name="l00347"></a>00347 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keyword">const</span> <span class="keywordtype">char</span> *key ); <a name="l00349"></a>00349 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keyword">const</span> <span class="keywordtype">char</span> *key ) <span class="keyword">const</span>; <a name="l00351"></a>00351 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keyword">const</span> std::string &key ); <a name="l00353"></a>00353 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keyword">const</span> std::string &key ) <span class="keyword">const</span>; <a name="l00365"></a>00365 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keyword">const</span> <a class="code" href="class_json_1_1_static_string.html" title="Lightweight wrapper to tag static string.">StaticString</a> &key ); <a name="l00366"></a>00366 <span class="preprocessor"># ifdef JSON_USE_CPPTL</span> <a name="l00367"></a>00367 <span class="preprocessor"></span> <a name="l00368"></a>00368 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keyword">const</span> CppTL::ConstString &key ); <a name="l00370"></a>00370 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &operator[]( <span class="keyword">const</span> CppTL::ConstString &key ) <span class="keyword">const</span>; <a name="l00371"></a>00371 <span class="preprocessor"># endif</span> <a name="l00372"></a>00372 <span class="preprocessor"></span> <a name="l00373"></a>00373 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <span class="keyword">get</span>( <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <a name="l00374"></a>00374 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &defaultValue ) <span class="keyword">const</span>; <a name="l00376"></a>00376 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <span class="keyword">get</span>( <span class="keyword">const</span> std::string &key, <a name="l00377"></a>00377 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &defaultValue ) <span class="keyword">const</span>; <a name="l00378"></a>00378 <span class="preprocessor"># ifdef JSON_USE_CPPTL</span> <a name="l00379"></a>00379 <span class="preprocessor"></span> <a name="l00380"></a>00380 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <span class="keyword">get</span>( <span class="keyword">const</span> CppTL::ConstString &key, <a name="l00381"></a>00381 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &defaultValue ) <span class="keyword">const</span>; <a name="l00382"></a>00382 <span class="preprocessor"># endif</span> <a name="l00383"></a>00383 <span class="preprocessor"></span> <a name="l00384"></a>00384 <a name="l00385"></a>00385 <a name="l00386"></a>00386 <a name="l00387"></a>00387 <a name="l00388"></a>00388 <a name="l00389"></a>00389 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> removeMember( <span class="keyword">const</span> <span class="keywordtype">char</span>* key ); <a name="l00391"></a>00391 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> removeMember( <span class="keyword">const</span> std::string &key ); <a name="l00392"></a>00392 <a name="l00394"></a>00394 <span class="keywordtype">bool</span> isMember( <span class="keyword">const</span> <span class="keywordtype">char</span> *key ) <span class="keyword">const</span>; <a name="l00396"></a>00396 <span class="keywordtype">bool</span> isMember( <span class="keyword">const</span> std::string &key ) <span class="keyword">const</span>; <a name="l00397"></a>00397 <span class="preprocessor"># ifdef JSON_USE_CPPTL</span> <a name="l00398"></a>00398 <span class="preprocessor"></span> <a name="l00399"></a>00399 <span class="keywordtype">bool</span> isMember( <span class="keyword">const</span> CppTL::ConstString &key ) <span class="keyword">const</span>; <a name="l00400"></a>00400 <span class="preprocessor"># endif</span> <a name="l00401"></a>00401 <span class="preprocessor"></span> <a name="l00407"></a>00407 Members getMemberNames() <span class="keyword">const</span>; <a name="l00408"></a>00408 <a name="l00409"></a>00409 <span class="comment">//# ifdef JSON_USE_CPPTL</span> <a name="l00410"></a>00410 <span class="comment">// EnumMemberNames enumMemberNames() const;</span> <a name="l00411"></a>00411 <span class="comment">// EnumValues enumValues() const;</span> <a name="l00412"></a>00412 <span class="comment">//# endif</span> <a name="l00413"></a>00413 <a name="l00415"></a>00415 <span class="keywordtype">void</span> setComment( <span class="keyword">const</span> <span class="keywordtype">char</span> *comment, <a name="l00416"></a>00416 <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351">CommentPlacement</a> placement ); <a name="l00418"></a>00418 <span class="keywordtype">void</span> setComment( <span class="keyword">const</span> std::string &comment, <a name="l00419"></a>00419 <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351">CommentPlacement</a> placement ); <a name="l00420"></a>00420 <span class="keywordtype">bool</span> hasComment( <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351">CommentPlacement</a> placement ) <span class="keyword">const</span>; <a name="l00422"></a>00422 std::string getComment( <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351">CommentPlacement</a> placement ) <span class="keyword">const</span>; <a name="l00423"></a>00423 <a name="l00424"></a>00424 std::string toStyledString() <span class="keyword">const</span>; <a name="l00425"></a>00425 <a name="l00426"></a>00426 const_iterator begin() <span class="keyword">const</span>; <a name="l00427"></a>00427 const_iterator end() <span class="keyword">const</span>; <a name="l00428"></a>00428 <a name="l00429"></a>00429 iterator begin(); <a name="l00430"></a>00430 iterator end(); <a name="l00431"></a>00431 <a name="l00432"></a>00432 <span class="keyword">private</span>: <a name="l00433"></a>00433 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &resolveReference( <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <a name="l00434"></a>00434 <span class="keywordtype">bool</span> isStatic ); <a name="l00435"></a>00435 <a name="l00436"></a>00436 <span class="preprocessor"># ifdef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00437"></a>00437 <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> isItemAvailable()<span class="keyword"> const</span> <a name="l00438"></a>00438 <span class="keyword"> </span>{ <a name="l00439"></a>00439 <span class="keywordflow">return</span> itemIsUsed_ == 0; <a name="l00440"></a>00440 } <a name="l00441"></a>00441 <a name="l00442"></a>00442 <span class="keyword">inline</span> <span class="keywordtype">void</span> setItemUsed( <span class="keywordtype">bool</span> isUsed = <span class="keyword">true</span> ) <a name="l00443"></a>00443 { <a name="l00444"></a>00444 itemIsUsed_ = isUsed ? 1 : 0; <a name="l00445"></a>00445 } <a name="l00446"></a>00446 <a name="l00447"></a>00447 <span class="keyword">inline</span> <span class="keywordtype">bool</span> isMemberNameStatic()<span class="keyword"> const</span> <a name="l00448"></a>00448 <span class="keyword"> </span>{ <a name="l00449"></a>00449 <span class="keywordflow">return</span> memberNameIsStatic_ == 0; <a name="l00450"></a>00450 } <a name="l00451"></a>00451 <a name="l00452"></a>00452 <span class="keyword">inline</span> <span class="keywordtype">void</span> setMemberNameIsStatic( <span class="keywordtype">bool</span> isStatic ) <a name="l00453"></a>00453 { <a name="l00454"></a>00454 memberNameIsStatic_ = isStatic ? 1 : 0; <a name="l00455"></a>00455 } <a name="l00456"></a>00456 <span class="preprocessor"># endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00457"></a>00457 <span class="preprocessor"></span> <a name="l00458"></a>00458 <span class="keyword">private</span>: <a name="l00459"></a>00459 <span class="keyword">struct </span>CommentInfo <a name="l00460"></a>00460 { <a name="l00461"></a>00461 CommentInfo(); <a name="l00462"></a>00462 ~CommentInfo(); <a name="l00463"></a>00463 <a name="l00464"></a>00464 <span class="keywordtype">void</span> setComment( <span class="keyword">const</span> <span class="keywordtype">char</span> *text ); <a name="l00465"></a>00465 <a name="l00466"></a>00466 <span class="keywordtype">char</span> *comment_; <a name="l00467"></a>00467 }; <a name="l00468"></a>00468 <a name="l00469"></a>00469 <span class="comment">//struct MemberNamesTransform</span> <a name="l00470"></a>00470 <span class="comment">//{</span> <a name="l00471"></a>00471 <span class="comment">// typedef const char *result_type;</span> <a name="l00472"></a>00472 <span class="comment">// const char *operator()( const CZString &name ) const</span> <a name="l00473"></a>00473 <span class="comment">// {</span> <a name="l00474"></a>00474 <span class="comment">// return name.c_str();</span> <a name="l00475"></a>00475 <span class="comment">// }</span> <a name="l00476"></a>00476 <span class="comment">//};</span> <a name="l00477"></a>00477 <a name="l00478"></a>00478 <span class="keyword">union </span>ValueHolder <a name="l00479"></a>00479 { <a name="l00480"></a>00480 <a class="code" href="namespace_json.html#a218d880af853ce786cd985e82571d297">LargestInt</a> int_; <a name="l00481"></a>00481 <a class="code" href="namespace_json.html#ae202ecad69725e23443f465e257456d0">LargestUInt</a> uint_; <a name="l00482"></a>00482 <span class="keywordtype">double</span> real_; <a name="l00483"></a>00483 <span class="keywordtype">bool</span> bool_; <a name="l00484"></a>00484 <span class="keywordtype">char</span> *string_; <a name="l00485"></a>00485 <span class="preprocessor"># ifdef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00486"></a>00486 <span class="preprocessor"></span> ValueInternalArray *array_; <a name="l00487"></a>00487 ValueInternalMap *map_; <a name="l00488"></a>00488 <span class="preprocessor">#else</span> <a name="l00489"></a>00489 <span class="preprocessor"></span> ObjectValues *map_; <a name="l00490"></a>00490 <span class="preprocessor"># endif</span> <a name="l00491"></a>00491 <span class="preprocessor"></span> } value_; <a name="l00492"></a>00492 <a class="code" href="namespace_json.html#a7d654b75c16a57007925868e38212b4e" title="Type of the value held by a Value object.">ValueType</a> type_ : 8; <a name="l00493"></a>00493 <span class="keywordtype">int</span> allocated_ : 1; <span class="comment">// Notes: if declared as bool, bitfield is useless.</span> <a name="l00494"></a>00494 <span class="preprocessor"># ifdef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00495"></a>00495 <span class="preprocessor"></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> itemIsUsed_ : 1; <span class="comment">// used by the ValueInternalMap container.</span> <a name="l00496"></a>00496 <span class="keywordtype">int</span> memberNameIsStatic_ : 1; <span class="comment">// used by the ValueInternalMap container.</span> <a name="l00497"></a>00497 <span class="preprocessor"># endif</span> <a name="l00498"></a>00498 <span class="preprocessor"></span> CommentInfo *comments_; <a name="l00499"></a>00499 }; <a name="l00500"></a>00500 <a name="l00501"></a>00501 <a name="l00504"></a><a class="code" href="class_json_1_1_path_argument.html">00504</a> <span class="keyword">class </span><a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a> <a name="l00505"></a>00505 { <a name="l00506"></a>00506 <span class="keyword">public</span>: <a name="l00507"></a><a class="code" href="class_json_1_1_path_argument.html#a4877239a6b7f09fbf5a61ca68a49d74c">00507</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_path.html" title="Experimental and untested: represents a "path" to access a node.">Path</a>; <a name="l00508"></a>00508 <a name="l00509"></a>00509 <a class="code" href="class_json_1_1_path_argument.html#a3c96ed20c56a55eb76d37a11553c528e">PathArgument</a>(); <a name="l00510"></a>00510 <a class="code" href="class_json_1_1_path_argument.html#a3c96ed20c56a55eb76d37a11553c528e">PathArgument</a>( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index ); <a name="l00511"></a>00511 <a class="code" href="class_json_1_1_path_argument.html#a3c96ed20c56a55eb76d37a11553c528e">PathArgument</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *key ); <a name="l00512"></a>00512 <a class="code" href="class_json_1_1_path_argument.html#a3c96ed20c56a55eb76d37a11553c528e">PathArgument</a>( <span class="keyword">const</span> std::string &key ); <a name="l00513"></a>00513 <a name="l00514"></a>00514 <span class="keyword">private</span>: <a name="l00515"></a>00515 <span class="keyword">enum</span> Kind <a name="l00516"></a>00516 { <a name="l00517"></a>00517 kindNone = 0, <a name="l00518"></a>00518 kindIndex, <a name="l00519"></a>00519 kindKey <a name="l00520"></a>00520 }; <a name="l00521"></a>00521 std::string key_; <a name="l00522"></a>00522 <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index_; <a name="l00523"></a>00523 Kind kind_; <a name="l00524"></a>00524 }; <a name="l00525"></a>00525 <a name="l00537"></a><a class="code" href="class_json_1_1_path.html">00537</a> <span class="keyword">class </span><a class="code" href="class_json_1_1_path.html" title="Experimental and untested: represents a "path" to access a node.">Path</a> <a name="l00538"></a>00538 { <a name="l00539"></a>00539 <span class="keyword">public</span>: <a name="l00540"></a>00540 <a class="code" href="class_json_1_1_path.html#aaa37a99650e770d0cd680bf53585ec99">Path</a>( <span class="keyword">const</span> std::string &path, <a name="l00541"></a>00541 <span class="keyword">const</span> <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a> &a1 = <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a>(), <a name="l00542"></a>00542 <span class="keyword">const</span> <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a> &a2 = <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a>(), <a name="l00543"></a>00543 <span class="keyword">const</span> <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a> &a3 = <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a>(), <a name="l00544"></a>00544 <span class="keyword">const</span> <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a> &a4 = <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a>(), <a name="l00545"></a>00545 <span class="keyword">const</span> <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a> &a5 = <a class="code" href="class_json_1_1_path_argument.html" title="Experimental and untested: represents an element of the "path" to access a node.">PathArgument</a>() ); <a name="l00546"></a>00546 <a name="l00547"></a>00547 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &<a class="code" href="class_json_1_1_path.html#ae1d05fa985a6ee3c57f2b8ed186b5982">resolve</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &root ) <span class="keyword">const</span>; <a name="l00548"></a>00548 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <a class="code" href="class_json_1_1_path.html#ae1d05fa985a6ee3c57f2b8ed186b5982">resolve</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &root, <a name="l00549"></a>00549 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &defaultValue ) <span class="keyword">const</span>; <a name="l00551"></a>00551 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &<a class="code" href="class_json_1_1_path.html#a5289901fc58ad1fdca1de7fb5a0b620c" title="Creates the "path" to access the specified node and returns a reference on the node.">make</a>( <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &root ) <span class="keyword">const</span>; <a name="l00552"></a>00552 <a name="l00553"></a>00553 <span class="keyword">private</span>: <a name="l00554"></a>00554 <span class="keyword">typedef</span> std::vector<const PathArgument *> InArgs; <a name="l00555"></a>00555 <span class="keyword">typedef</span> std::vector<PathArgument> Args; <a name="l00556"></a>00556 <a name="l00557"></a>00557 <span class="keywordtype">void</span> makePath( <span class="keyword">const</span> std::string &path, <a name="l00558"></a>00558 <span class="keyword">const</span> InArgs &<a class="code" href="namespace_json.html#a7378f09d8f10ef3ccbb2aeefe7ff41d3">in</a> ); <a name="l00559"></a>00559 <span class="keywordtype">void</span> addPathInArg( <span class="keyword">const</span> std::string &path, <a name="l00560"></a>00560 <span class="keyword">const</span> InArgs &in, <a name="l00561"></a>00561 InArgs::const_iterator &itInArg, <a name="l00562"></a>00562 PathArgument::Kind kind ); <a name="l00563"></a>00563 <span class="keywordtype">void</span> invalidPath( <span class="keyword">const</span> std::string &path, <a name="l00564"></a>00564 <span class="keywordtype">int</span> location ); <a name="l00565"></a>00565 <a name="l00566"></a>00566 Args args_; <a name="l00567"></a>00567 }; <a name="l00568"></a>00568 <a name="l00569"></a>00569 <a name="l00570"></a>00570 <a name="l00571"></a>00571 <span class="preprocessor">#ifdef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00572"></a>00572 <span class="preprocessor"></span> <a name="l00616"></a><a class="code" href="class_json_1_1_value_map_allocator.html">00616</a> <span class="keyword">class </span><a class="code" href="config_8h.html#a1d61ffde86ce1a18fd83194ff0d9a206" title="If defined, indicates that the source file is amalgated to prevent private header inclusion...">JSON_API</a> <a class="code" href="class_json_1_1_value_map_allocator.html" title="Allocator to customize Value internal map.">ValueMapAllocator</a> <a name="l00617"></a>00617 { <a name="l00618"></a>00618 <span class="keyword">public</span>: <a name="l00619"></a>00619 <span class="keyword">virtual</span> ~<a class="code" href="class_json_1_1_value_map_allocator.html" title="Allocator to customize Value internal map.">ValueMapAllocator</a>(); <a name="l00620"></a>00620 <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> *newMap() = 0; <a name="l00621"></a>00621 <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> *newMapCopy( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> &other ) = 0; <a name="l00622"></a>00622 <span class="keyword">virtual</span> <span class="keywordtype">void</span> destructMap( <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> *map ) = 0; <a name="l00623"></a>00623 <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *allocateMapBuckets( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size ) = 0; <a name="l00624"></a>00624 <span class="keyword">virtual</span> <span class="keywordtype">void</span> releaseMapBuckets( <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *links ) = 0; <a name="l00625"></a>00625 <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *allocateMapLink() = 0; <a name="l00626"></a>00626 <span class="keyword">virtual</span> <span class="keywordtype">void</span> releaseMapLink( <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *link ) = 0; <a name="l00627"></a>00627 }; <a name="l00628"></a>00628 <a name="l00632"></a><a class="code" href="class_json_1_1_value_internal_link.html">00632</a> <span class="keyword">class </span><a class="code" href="config_8h.html#a1d61ffde86ce1a18fd83194ff0d9a206" title="If defined, indicates that the source file is amalgated to prevent private header inclusion...">JSON_API</a> <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> <a name="l00633"></a>00633 { <a name="l00634"></a>00634 <span class="keyword">public</span>: <a name="l00635"></a><a class="code" href="class_json_1_1_value_internal_link.html#aaee3ff37afecb38ae7059b367accd9c7a0d8010349d868219320a6db3e358e3ff">00635</a> <span class="keyword">enum</span> { itemPerLink = 6 }; <span class="comment">// sizeof(ValueInternalLink) = 128 on 32 bits architecture.</span> <a name="l00636"></a><a class="code" href="class_json_1_1_value_internal_link.html#a7c4ed40669a8d4914b7df97069f9a83c">00636</a> <span class="keyword">enum</span> <a class="code" href="class_json_1_1_value_internal_link.html#a7c4ed40669a8d4914b7df97069f9a83c">InternalFlags</a> { <a name="l00637"></a><a class="code" href="class_json_1_1_value_internal_link.html#a7c4ed40669a8d4914b7df97069f9a83ca0f795fd15fe94dbe86876993ade38454">00637</a> flagAvailable = 0, <a name="l00638"></a><a class="code" href="class_json_1_1_value_internal_link.html#a7c4ed40669a8d4914b7df97069f9a83ca2f0a668007126ae51a3c449119f09bff">00638</a> flagUsed = 1 <a name="l00639"></a>00639 }; <a name="l00640"></a>00640 <a name="l00641"></a>00641 <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a>(); <a name="l00642"></a>00642 <a name="l00643"></a>00643 ~<a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a>(); <a name="l00644"></a>00644 <a name="l00645"></a><a class="code" href="class_json_1_1_value_internal_link.html#adbf1e25464768e1d5f54c269d02d2603">00645</a> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> items_[itemPerLink]; <a name="l00646"></a><a class="code" href="class_json_1_1_value_internal_link.html#ac84c031b3ddfd353bd4ac392625993c7">00646</a> <span class="keywordtype">char</span> *keys_[itemPerLink]; <a name="l00647"></a><a class="code" href="class_json_1_1_value_internal_link.html#afb217c7b00ee1c805dd2f238b05dce30">00647</a> <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *<a class="code" href="class_json_1_1_value_internal_link.html#afb217c7b00ee1c805dd2f238b05dce30">previous_</a>; <a name="l00648"></a><a class="code" href="class_json_1_1_value_internal_link.html#a1b57692540b7f9232949ed58a305686a">00648</a> <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *<a class="code" href="class_json_1_1_value_internal_link.html#a1b57692540b7f9232949ed58a305686a">next_</a>; <a name="l00649"></a>00649 }; <a name="l00650"></a>00650 <a name="l00651"></a>00651 <a name="l00664"></a><a class="code" href="class_json_1_1_value_internal_map.html">00664</a> <span class="keyword">class </span><a class="code" href="config_8h.html#a1d61ffde86ce1a18fd83194ff0d9a206" title="If defined, indicates that the source file is amalgated to prevent private header inclusion...">JSON_API</a> <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> <a name="l00665"></a>00665 { <a name="l00666"></a><a class="code" href="class_json_1_1_value_internal_map.html#ad016df56489e5d360735457afba2f649">00666</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a>; <a name="l00667"></a><a class="code" href="class_json_1_1_value_internal_map.html#aeceedf6e1a7d48a588516ce2b1983d6f">00667</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>; <a name="l00668"></a>00668 <span class="keyword">public</span>: <a name="l00669"></a><a class="code" href="class_json_1_1_value_internal_map.html#a4cfdeeb5f173ad27b3a908a339f3a2c6">00669</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_internal_map.html#a4cfdeeb5f173ad27b3a908a339f3a2c6">HashKey</a>; <a name="l00670"></a><a class="code" href="class_json_1_1_value_internal_map.html#a2d50018488ff4dfb6309652ff5ab0dc5">00670</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_internal_map.html#a2d50018488ff4dfb6309652ff5ab0dc5">BucketIndex</a>; <a name="l00671"></a>00671 <a name="l00672"></a>00672 <span class="preprocessor"># ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION</span> <a name="l00673"></a>00673 <span class="preprocessor"></span> <span class="keyword">struct </span>IteratorState <a name="l00674"></a>00674 { <a name="l00675"></a>00675 IteratorState() <a name="l00676"></a>00676 : map_(0) <a name="l00677"></a>00677 , link_(0) <a name="l00678"></a>00678 , itemIndex_(0) <a name="l00679"></a>00679 , bucketIndex_(0) <a name="l00680"></a>00680 { <a name="l00681"></a>00681 } <a name="l00682"></a>00682 <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> *map_; <a name="l00683"></a>00683 <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *link_; <a name="l00684"></a>00684 <a class="code" href="class_json_1_1_value_internal_map.html#a2d50018488ff4dfb6309652ff5ab0dc5">BucketIndex</a> itemIndex_; <a name="l00685"></a>00685 <a class="code" href="class_json_1_1_value_internal_map.html#a2d50018488ff4dfb6309652ff5ab0dc5">BucketIndex</a> bucketIndex_; <a name="l00686"></a>00686 }; <a name="l00687"></a>00687 <span class="preprocessor"># endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION</span> <a name="l00688"></a>00688 <span class="preprocessor"></span> <a name="l00689"></a>00689 <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a>(); <a name="l00690"></a>00690 <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> &other ); <a name="l00691"></a>00691 <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> &operator =( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> &other ); <a name="l00692"></a>00692 ~<a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a>(); <a name="l00693"></a>00693 <a name="l00694"></a>00694 <span class="keywordtype">void</span> swap( <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> &other ); <a name="l00695"></a>00695 <a name="l00696"></a>00696 BucketIndex size() <span class="keyword">const</span>; <a name="l00697"></a>00697 <a name="l00698"></a>00698 <span class="keywordtype">void</span> clear(); <a name="l00699"></a>00699 <a name="l00700"></a>00700 <span class="keywordtype">bool</span> reserveDelta( BucketIndex growth ); <a name="l00701"></a>00701 <a name="l00702"></a>00702 <span class="keywordtype">bool</span> reserve( BucketIndex newItemCount ); <a name="l00703"></a>00703 <a name="l00704"></a>00704 <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> *find( <span class="keyword">const</span> <span class="keywordtype">char</span> *key ) <span class="keyword">const</span>; <a name="l00705"></a>00705 <a name="l00706"></a>00706 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> *find( <span class="keyword">const</span> <span class="keywordtype">char</span> *key ); <a name="l00707"></a>00707 <a name="l00708"></a>00708 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &resolveReference( <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <a name="l00709"></a>00709 <span class="keywordtype">bool</span> isStatic ); <a name="l00710"></a>00710 <a name="l00711"></a>00711 <span class="keywordtype">void</span> <span class="keyword">remove</span>( <span class="keyword">const</span> <span class="keywordtype">char</span> *key ); <a name="l00712"></a>00712 <a name="l00713"></a>00713 <span class="keywordtype">void</span> doActualRemove( <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *link, <a name="l00714"></a>00714 BucketIndex index, <a name="l00715"></a>00715 BucketIndex bucketIndex ); <a name="l00716"></a>00716 <a name="l00717"></a>00717 <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *&getLastLinkInBucket( BucketIndex bucketIndex ); <a name="l00718"></a>00718 <a name="l00719"></a>00719 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &setNewItem( <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <a name="l00720"></a>00720 <span class="keywordtype">bool</span> isStatic, <a name="l00721"></a>00721 <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *link, <a name="l00722"></a>00722 BucketIndex index ); <a name="l00723"></a>00723 <a name="l00724"></a>00724 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &unsafeAdd( <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <a name="l00725"></a>00725 <span class="keywordtype">bool</span> isStatic, <a name="l00726"></a>00726 HashKey hashedKey ); <a name="l00727"></a>00727 <a name="l00728"></a>00728 HashKey hash( <span class="keyword">const</span> <span class="keywordtype">char</span> *key ) <span class="keyword">const</span>; <a name="l00729"></a>00729 <a name="l00730"></a>00730 <span class="keywordtype">int</span> compare( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_internal_map.html" title="A linked page based hash-table implementation used internally by Value.">ValueInternalMap</a> &other ) <span class="keyword">const</span>; <a name="l00731"></a>00731 <a name="l00732"></a>00732 <span class="keyword">private</span>: <a name="l00733"></a>00733 <span class="keywordtype">void</span> makeBeginIterator( IteratorState &it ) <span class="keyword">const</span>; <a name="l00734"></a>00734 <span class="keywordtype">void</span> makeEndIterator( IteratorState &it ) <span class="keyword">const</span>; <a name="l00735"></a>00735 <span class="keyword">static</span> <span class="keywordtype">bool</span> equals( <span class="keyword">const</span> IteratorState &x, <span class="keyword">const</span> IteratorState &other ); <a name="l00736"></a>00736 <span class="keyword">static</span> <span class="keywordtype">void</span> increment( IteratorState &iterator ); <a name="l00737"></a>00737 <span class="keyword">static</span> <span class="keywordtype">void</span> incrementBucket( IteratorState &iterator ); <a name="l00738"></a>00738 <span class="keyword">static</span> <span class="keywordtype">void</span> decrement( IteratorState &iterator ); <a name="l00739"></a>00739 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *key( <span class="keyword">const</span> IteratorState &iterator ); <a name="l00740"></a>00740 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *key( <span class="keyword">const</span> IteratorState &iterator, <span class="keywordtype">bool</span> &isStatic ); <a name="l00741"></a>00741 <span class="keyword">static</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &value( <span class="keyword">const</span> IteratorState &iterator ); <a name="l00742"></a>00742 <span class="keyword">static</span> <span class="keywordtype">int</span> distance( <span class="keyword">const</span> IteratorState &x, <span class="keyword">const</span> IteratorState &y ); <a name="l00743"></a>00743 <a name="l00744"></a>00744 <span class="keyword">private</span>: <a name="l00745"></a>00745 <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *buckets_; <a name="l00746"></a>00746 <a class="code" href="class_json_1_1_value_internal_link.html" title="ValueInternalMap hash-map bucket chain link (for internal use only).">ValueInternalLink</a> *tailLink_; <a name="l00747"></a>00747 BucketIndex bucketsSize_; <a name="l00748"></a>00748 BucketIndex itemCount_; <a name="l00749"></a>00749 }; <a name="l00750"></a>00750 <a name="l00762"></a><a class="code" href="class_json_1_1_value_internal_array.html">00762</a> <span class="keyword">class </span><a class="code" href="config_8h.html#a1d61ffde86ce1a18fd83194ff0d9a206" title="If defined, indicates that the source file is amalgated to prevent private header inclusion...">JSON_API</a> <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> <a name="l00763"></a>00763 { <a name="l00764"></a><a class="code" href="class_json_1_1_value_internal_array.html#aeceedf6e1a7d48a588516ce2b1983d6f">00764</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>; <a name="l00765"></a><a class="code" href="class_json_1_1_value_internal_array.html#ad016df56489e5d360735457afba2f649">00765</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a>; <a name="l00766"></a>00766 <span class="keyword">public</span>: <a name="l00767"></a><a class="code" href="class_json_1_1_value_internal_array.html#a3841ebaabdb63273981d34ac2fba92b3af0d181c84bd8ecc1eba82ed1d0eb1264">00767</a> <span class="keyword">enum</span> { itemsPerPage = 8 }; <span class="comment">// should be a power of 2 for fast divide and modulo.</span> <a name="l00768"></a><a class="code" href="class_json_1_1_value_internal_array.html#a03d5c4005a972818aef1162196279d88">00768</a> <span class="keyword">typedef</span> <a class="code" href="class_json_1_1_value.html#a184a91566cccca7b819240f0d5561c7d">Value::ArrayIndex</a> <a class="code" href="class_json_1_1_value_internal_array.html#a03d5c4005a972818aef1162196279d88">ArrayIndex</a>; <a name="l00769"></a><a class="code" href="class_json_1_1_value_internal_array.html#a3f48c79c9e8c04b7a52ad07f99a03695">00769</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_internal_array.html#a3f48c79c9e8c04b7a52ad07f99a03695">PageIndex</a>; <a name="l00770"></a>00770 <a name="l00771"></a>00771 <span class="preprocessor"># ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION</span> <a name="l00772"></a>00772 <span class="preprocessor"></span> <span class="keyword">struct </span>IteratorState <span class="comment">// Must be a POD</span> <a name="l00773"></a>00773 { <a name="l00774"></a>00774 IteratorState() <a name="l00775"></a>00775 : array_(0) <a name="l00776"></a>00776 , currentPageIndex_(0) <a name="l00777"></a>00777 , currentItemIndex_(0) <a name="l00778"></a>00778 { <a name="l00779"></a>00779 } <a name="l00780"></a>00780 <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> *array_; <a name="l00781"></a>00781 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> **currentPageIndex_; <a name="l00782"></a>00782 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> currentItemIndex_; <a name="l00783"></a>00783 }; <a name="l00784"></a>00784 <span class="preprocessor"># endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION</span> <a name="l00785"></a>00785 <span class="preprocessor"></span> <a name="l00786"></a>00786 <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a>(); <a name="l00787"></a>00787 <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> &other ); <a name="l00788"></a>00788 <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> &operator =( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> &other ); <a name="l00789"></a>00789 ~<a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a>(); <a name="l00790"></a>00790 <span class="keywordtype">void</span> swap( <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> &other ); <a name="l00791"></a>00791 <a name="l00792"></a>00792 <span class="keywordtype">void</span> clear(); <a name="l00793"></a>00793 <span class="keywordtype">void</span> resize( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> newSize ); <a name="l00794"></a>00794 <a name="l00795"></a>00795 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &resolveReference( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index ); <a name="l00796"></a>00796 <a name="l00797"></a>00797 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> *find( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index ) <span class="keyword">const</span>; <a name="l00798"></a>00798 <a name="l00799"></a>00799 <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> size() <span class="keyword">const</span>; <a name="l00800"></a>00800 <a name="l00801"></a>00801 <span class="keywordtype">int</span> compare( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> &other ) <span class="keyword">const</span>; <a name="l00802"></a>00802 <a name="l00803"></a>00803 <span class="keyword">private</span>: <a name="l00804"></a>00804 <span class="keyword">static</span> <span class="keywordtype">bool</span> equals( <span class="keyword">const</span> IteratorState &x, <span class="keyword">const</span> IteratorState &other ); <a name="l00805"></a>00805 <span class="keyword">static</span> <span class="keywordtype">void</span> increment( IteratorState &iterator ); <a name="l00806"></a>00806 <span class="keyword">static</span> <span class="keywordtype">void</span> decrement( IteratorState &iterator ); <a name="l00807"></a>00807 <span class="keyword">static</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &dereference( <span class="keyword">const</span> IteratorState &iterator ); <a name="l00808"></a>00808 <span class="keyword">static</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &unsafeDereference( <span class="keyword">const</span> IteratorState &iterator ); <a name="l00809"></a>00809 <span class="keyword">static</span> <span class="keywordtype">int</span> distance( <span class="keyword">const</span> IteratorState &x, <span class="keyword">const</span> IteratorState &y ); <a name="l00810"></a>00810 <span class="keyword">static</span> <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> indexOf( <span class="keyword">const</span> IteratorState &iterator ); <a name="l00811"></a>00811 <span class="keywordtype">void</span> makeBeginIterator( IteratorState &it ) <span class="keyword">const</span>; <a name="l00812"></a>00812 <span class="keywordtype">void</span> makeEndIterator( IteratorState &it ) <span class="keyword">const</span>; <a name="l00813"></a>00813 <span class="keywordtype">void</span> makeIterator( IteratorState &it, <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index ) <span class="keyword">const</span>; <a name="l00814"></a>00814 <a name="l00815"></a>00815 <span class="keywordtype">void</span> makeIndexValid( <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> index ); <a name="l00816"></a>00816 <a name="l00817"></a>00817 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> **pages_; <a name="l00818"></a>00818 <a class="code" href="namespace_json.html#a8048e741f2177c3b5d9ede4a5b8c53c2">ArrayIndex</a> size_; <a name="l00819"></a>00819 PageIndex pageCount_; <a name="l00820"></a>00820 }; <a name="l00821"></a>00821 <a name="l00881"></a><a class="code" href="class_json_1_1_value_array_allocator.html">00881</a> <span class="keyword">class </span><a class="code" href="config_8h.html#a1d61ffde86ce1a18fd83194ff0d9a206" title="If defined, indicates that the source file is amalgated to prevent private header inclusion...">JSON_API</a> <a class="code" href="class_json_1_1_value_array_allocator.html" title="Experimental: do not use.">ValueArrayAllocator</a> <a name="l00882"></a>00882 { <a name="l00883"></a>00883 <span class="keyword">public</span>: <a name="l00884"></a>00884 <span class="keyword">virtual</span> ~<a class="code" href="class_json_1_1_value_array_allocator.html" title="Experimental: do not use.">ValueArrayAllocator</a>(); <a name="l00885"></a>00885 <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> *newArray() = 0; <a name="l00886"></a>00886 <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> *newArrayCopy( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> &other ) = 0; <a name="l00887"></a>00887 <span class="keyword">virtual</span> <span class="keywordtype">void</span> destructArray( <a class="code" href="class_json_1_1_value_internal_array.html" title="A simplified deque implementation used internally by Value.">ValueInternalArray</a> *array ) = 0; <a name="l00899"></a>00899 <span class="keyword">virtual</span> <span class="keywordtype">void</span> reallocateArrayPageIndex( <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> **&indexes, <a name="l00900"></a>00900 <a class="code" href="class_json_1_1_value_internal_array.html#a3f48c79c9e8c04b7a52ad07f99a03695">ValueInternalArray::PageIndex</a> &indexCount, <a name="l00901"></a>00901 <a class="code" href="class_json_1_1_value_internal_array.html#a3f48c79c9e8c04b7a52ad07f99a03695">ValueInternalArray::PageIndex</a> minNewIndexCount ) = 0; <a name="l00902"></a>00902 <span class="keyword">virtual</span> <span class="keywordtype">void</span> releaseArrayPageIndex( <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> **indexes, <a name="l00903"></a>00903 <a class="code" href="class_json_1_1_value_internal_array.html#a3f48c79c9e8c04b7a52ad07f99a03695">ValueInternalArray::PageIndex</a> indexCount ) = 0; <a name="l00904"></a>00904 <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> *allocateArrayPage() = 0; <a name="l00905"></a>00905 <span class="keyword">virtual</span> <span class="keywordtype">void</span> releaseArrayPage( <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> *value ) = 0; <a name="l00906"></a>00906 }; <a name="l00907"></a>00907 <span class="preprocessor">#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00908"></a>00908 <span class="preprocessor"></span> <a name="l00909"></a>00909 <a name="l00913"></a><a class="code" href="class_json_1_1_value_iterator_base.html">00913</a> <span class="keyword">class </span><a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a> <a name="l00914"></a>00914 { <a name="l00915"></a>00915 <span class="keyword">public</span>: <a name="l00916"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a9d3a3c7ce5cdefe23cb486239cf07bb5">00916</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a9d3a3c7ce5cdefe23cb486239cf07bb5">size_t</a>; <a name="l00917"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a4e44bf8cbd17ec8d6e2c185904a15ebd">00917</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a4e44bf8cbd17ec8d6e2c185904a15ebd">difference_type</a>; <a name="l00918"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a9d2a940d03ea06d20d972f41a89149ee">00918</a> <span class="keyword">typedef</span> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a> <a class="code" href="class_json_1_1_value_iterator_base.html#a9d2a940d03ea06d20d972f41a89149ee">SelfType</a>; <a name="l00919"></a>00919 <a name="l00920"></a>00920 <a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">ValueIteratorBase</a>(); <a name="l00921"></a>00921 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00922"></a>00922 <span class="preprocessor"></span> <span class="keyword">explicit</span> <a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">ValueIteratorBase</a>( <span class="keyword">const</span> Value::ObjectValues::iterator &current ); <a name="l00923"></a>00923 <span class="preprocessor">#else</span> <a name="l00924"></a>00924 <span class="preprocessor"></span> <a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">ValueIteratorBase</a>( <span class="keyword">const</span> ValueInternalArray::IteratorState &state ); <a name="l00925"></a>00925 <a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">ValueIteratorBase</a>( <span class="keyword">const</span> ValueInternalMap::IteratorState &state ); <a name="l00926"></a>00926 <span class="preprocessor">#endif</span> <a name="l00927"></a>00927 <span class="preprocessor"></span> <a name="l00928"></a><a class="code" href="class_json_1_1_value_iterator_base.html#afc656672ac28502f640ade32c38c1b56">00928</a> <span class="keywordtype">bool</span> <a class="code" href="class_json_1_1_value_iterator_base.html#afc656672ac28502f640ade32c38c1b56">operator ==</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &other )<span class="keyword"> const</span> <a name="l00929"></a>00929 <span class="keyword"> </span>{ <a name="l00930"></a>00930 <span class="keywordflow">return</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a21820d6ee564e541bd118b21e4741962">isEqual</a>( other ); <a name="l00931"></a>00931 } <a name="l00932"></a>00932 <a name="l00933"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a18c2dd42e0bb989ace141bfe9de52792">00933</a> <span class="keywordtype">bool</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a18c2dd42e0bb989ace141bfe9de52792">operator !=</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &other )<span class="keyword"> const</span> <a name="l00934"></a>00934 <span class="keyword"> </span>{ <a name="l00935"></a>00935 <span class="keywordflow">return</span> !<a class="code" href="class_json_1_1_value_iterator_base.html#a21820d6ee564e541bd118b21e4741962">isEqual</a>( other ); <a name="l00936"></a>00936 } <a name="l00937"></a>00937 <a name="l00938"></a><a class="code" href="class_json_1_1_value_iterator_base.html#ab786787fcad68ca5e8745aaf520fa17f">00938</a> <a class="code" href="class_json_1_1_value_iterator_base.html#a4e44bf8cbd17ec8d6e2c185904a15ebd">difference_type</a> <a class="code" href="class_json_1_1_value_iterator_base.html#ab786787fcad68ca5e8745aaf520fa17f">operator -</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &other )<span class="keyword"> const</span> <a name="l00939"></a>00939 <span class="keyword"> </span>{ <a name="l00940"></a>00940 <span class="keywordflow">return</span> <a class="code" href="class_json_1_1_value_iterator_base.html#ad6c553b249e89e3dc9933e100ccbe064">computeDistance</a>( other ); <a name="l00941"></a>00941 } <a name="l00942"></a>00942 <a name="l00944"></a>00944 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <a class="code" href="class_json_1_1_value_iterator_base.html#aa2ff5e79fc96acd4c3cd288e92614fc7" title="Return either the index or the member name of the referenced value as a Value.">key</a>() <span class="keyword">const</span>; <a name="l00945"></a>00945 <a name="l00947"></a>00947 <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">UInt</a> <a class="code" href="class_json_1_1_value_iterator_base.html#aa90591f5f7f8d2f06cc4605816b53738" title="Return the index of the referenced Value. -1 if it is not an arrayValue.">index</a>() <span class="keyword">const</span>; <a name="l00948"></a>00948 <a name="l00950"></a>00950 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="class_json_1_1_value_iterator_base.html#a83768d87c608c8d1133de8721eefc31b" title="Return the member name of the referenced Value. "" if it is not an objectValue.">memberName</a>() <span class="keyword">const</span>; <a name="l00951"></a>00951 <a name="l00952"></a>00952 <span class="keyword">protected</span>: <a name="l00953"></a>00953 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &<a class="code" href="class_json_1_1_value_iterator_base.html#a40a20c65abc423a26e3aae68d9a0525c">deref</a>() <span class="keyword">const</span>; <a name="l00954"></a>00954 <a name="l00955"></a>00955 <span class="keywordtype">void</span> <a class="code" href="class_json_1_1_value_iterator_base.html#afe58f9534e1fd2033419fd9fe244551e">increment</a>(); <a name="l00956"></a>00956 <a name="l00957"></a>00957 <span class="keywordtype">void</span> <a class="code" href="class_json_1_1_value_iterator_base.html#affc8cf5ff54a9f432cc693362c153fa6">decrement</a>(); <a name="l00958"></a>00958 <a name="l00959"></a>00959 <a class="code" href="class_json_1_1_value_iterator_base.html#a4e44bf8cbd17ec8d6e2c185904a15ebd">difference_type</a> <a class="code" href="class_json_1_1_value_iterator_base.html#ad6c553b249e89e3dc9933e100ccbe064">computeDistance</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a9d2a940d03ea06d20d972f41a89149ee">SelfType</a> &other ) <span class="keyword">const</span>; <a name="l00960"></a>00960 <a name="l00961"></a>00961 <span class="keywordtype">bool</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a21820d6ee564e541bd118b21e4741962">isEqual</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a9d2a940d03ea06d20d972f41a89149ee">SelfType</a> &other ) <span class="keyword">const</span>; <a name="l00962"></a>00962 <a name="l00963"></a>00963 <span class="keywordtype">void</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a496e6aba44808433ec5858c178be5719">copy</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a9d2a940d03ea06d20d972f41a89149ee">SelfType</a> &other ); <a name="l00964"></a>00964 <a name="l00965"></a>00965 <span class="keyword">private</span>: <a name="l00966"></a>00966 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00967"></a>00967 <span class="preprocessor"></span> Value::ObjectValues::iterator current_; <a name="l00968"></a>00968 <span class="comment">// Indicates that iterator is for a null value.</span> <a name="l00969"></a>00969 <span class="keywordtype">bool</span> isNull_; <a name="l00970"></a>00970 <span class="preprocessor">#else</span> <a name="l00971"></a>00971 <span class="preprocessor"></span> <span class="keyword">union</span> <a name="l00972"></a>00972 { <a name="l00973"></a><a class="code" href="class_json_1_1_value_iterator_base.html#ab4f9f76a9eb955e7d56a337a19c05a21">00973</a> ValueInternalArray::IteratorState <a class="code" href="class_json_1_1_value_iterator_base.html#ab4f9f76a9eb955e7d56a337a19c05a21">array_</a>; <a name="l00974"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a5b5754cb0037cc60a871bcdc3d6ad72e">00974</a> ValueInternalMap::IteratorState <a class="code" href="class_json_1_1_value_iterator_base.html#a5b5754cb0037cc60a871bcdc3d6ad72e">map_</a>; <a name="l00975"></a>00975 } iterator_; <a name="l00976"></a>00976 <span class="keywordtype">bool</span> isArray_; <a name="l00977"></a>00977 <span class="preprocessor">#endif</span> <a name="l00978"></a>00978 <span class="preprocessor"></span> }; <a name="l00979"></a>00979 <a name="l00983"></a><a class="code" href="class_json_1_1_value_const_iterator.html">00983</a> <span class="keyword">class </span><a class="code" href="class_json_1_1_value_const_iterator.html" title="const iterator for object and array value.">ValueConstIterator</a> : <span class="keyword">public</span> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a> <a name="l00984"></a>00984 { <a name="l00985"></a><a class="code" href="class_json_1_1_value_const_iterator.html#aeceedf6e1a7d48a588516ce2b1983d6f">00985</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>; <a name="l00986"></a>00986 <span class="keyword">public</span>: <a name="l00987"></a><a class="code" href="class_json_1_1_value_const_iterator.html#a8685219d214dbd2b763357ae94fb0f27">00987</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_const_iterator.html#a8685219d214dbd2b763357ae94fb0f27">size_t</a>; <a name="l00988"></a><a class="code" href="class_json_1_1_value_const_iterator.html#a32b36aa9d76e2b48ca74fb6e1979a95a">00988</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_const_iterator.html#a32b36aa9d76e2b48ca74fb6e1979a95a">difference_type</a>; <a name="l00989"></a><a class="code" href="class_json_1_1_value_const_iterator.html#aa9b05c6a37cd352ea1ee6e13b816f709">00989</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &<a class="code" href="class_json_1_1_value_const_iterator.html#aa9b05c6a37cd352ea1ee6e13b816f709">reference</a>; <a name="l00990"></a><a class="code" href="class_json_1_1_value_const_iterator.html#a400136bd8bc09e9fddec0785fa2cff14">00990</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> *<a class="code" href="class_json_1_1_value_const_iterator.html#a400136bd8bc09e9fddec0785fa2cff14">pointer</a>; <a name="l00991"></a><a class="code" href="class_json_1_1_value_const_iterator.html#a0c2e33e7eb5a80dd8709fb28ece83933">00991</a> <span class="keyword">typedef</span> <a class="code" href="class_json_1_1_value_const_iterator.html" title="const iterator for object and array value.">ValueConstIterator</a> <a class="code" href="class_json_1_1_value_const_iterator.html#a0c2e33e7eb5a80dd8709fb28ece83933">SelfType</a>; <a name="l00992"></a>00992 <a name="l00993"></a>00993 <a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">ValueConstIterator</a>(); <a name="l00994"></a>00994 <span class="keyword">private</span>: <a name="l00997"></a>00997 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00998"></a>00998 <span class="preprocessor"></span> <span class="keyword">explicit</span> <a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">ValueConstIterator</a>( <span class="keyword">const</span> Value::ObjectValues::iterator &current ); <a name="l00999"></a>00999 <span class="preprocessor">#else</span> <a name="l01000"></a>01000 <span class="preprocessor"></span> <a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">ValueConstIterator</a>( <span class="keyword">const</span> ValueInternalArray::IteratorState &state ); <a name="l01001"></a>01001 <a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">ValueConstIterator</a>( <span class="keyword">const</span> ValueInternalMap::IteratorState &state ); <a name="l01002"></a>01002 <span class="preprocessor">#endif</span> <a name="l01003"></a>01003 <span class="preprocessor"></span> <span class="keyword">public</span>: <a name="l01004"></a>01004 <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &<a class="code" href="class_json_1_1_value_const_iterator.html#ad1b1c11f8d7fb22d4d3c231915f2b15b">operator =</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a> &other ); <a name="l01005"></a>01005 <a name="l01006"></a><a class="code" href="class_json_1_1_value_const_iterator.html#ab3f0c2edbfc8f7d60645f3d597d05e28">01006</a> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> <a class="code" href="class_json_1_1_value_const_iterator.html#a2cfe2f7a94a688186efdafb1b181c319">operator++</a>( <span class="keywordtype">int</span> ) <a name="l01007"></a>01007 { <a name="l01008"></a>01008 <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> temp( *<span class="keyword">this</span> ); <a name="l01009"></a>01009 ++*<span class="keyword">this</span>; <a name="l01010"></a>01010 <span class="keywordflow">return</span> temp; <a name="l01011"></a>01011 } <a name="l01012"></a>01012 <a name="l01013"></a><a class="code" href="class_json_1_1_value_const_iterator.html#a94935961e9331c6f7b907b05ec8df75e">01013</a> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> <a class="code" href="class_json_1_1_value_const_iterator.html#a31415e44e44e56fb2bfda7e8bb784646">operator--</a>( <span class="keywordtype">int</span> ) <a name="l01014"></a>01014 { <a name="l01015"></a>01015 <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> temp( *<span class="keyword">this</span> ); <a name="l01016"></a>01016 --*<span class="keyword">this</span>; <a name="l01017"></a>01017 <span class="keywordflow">return</span> temp; <a name="l01018"></a>01018 } <a name="l01019"></a>01019 <a name="l01020"></a><a class="code" href="class_json_1_1_value_const_iterator.html#a31415e44e44e56fb2bfda7e8bb784646">01020</a> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &<a class="code" href="class_json_1_1_value_const_iterator.html#a31415e44e44e56fb2bfda7e8bb784646">operator--</a>() <a name="l01021"></a>01021 { <a name="l01022"></a>01022 <a class="code" href="class_json_1_1_value_iterator_base.html#affc8cf5ff54a9f432cc693362c153fa6">decrement</a>(); <a name="l01023"></a>01023 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l01024"></a>01024 } <a name="l01025"></a>01025 <a name="l01026"></a><a class="code" href="class_json_1_1_value_const_iterator.html#a2cfe2f7a94a688186efdafb1b181c319">01026</a> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &<a class="code" href="class_json_1_1_value_const_iterator.html#a2cfe2f7a94a688186efdafb1b181c319">operator++</a>() <a name="l01027"></a>01027 { <a name="l01028"></a>01028 <a class="code" href="class_json_1_1_value_iterator_base.html#afe58f9534e1fd2033419fd9fe244551e">increment</a>(); <a name="l01029"></a>01029 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l01030"></a>01030 } <a name="l01031"></a>01031 <a name="l01032"></a><a class="code" href="class_json_1_1_value_const_iterator.html#aeb44153d71c61ac9397a84d5ecc244c5">01032</a> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">reference</a> <a class="code" href="class_json_1_1_value_const_iterator.html#aeb44153d71c61ac9397a84d5ecc244c5">operator *</a>()<span class="keyword"> const</span> <a name="l01033"></a>01033 <span class="keyword"> </span>{ <a name="l01034"></a>01034 <span class="keywordflow">return</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a40a20c65abc423a26e3aae68d9a0525c">deref</a>(); <a name="l01035"></a>01035 } <a name="l01036"></a>01036 }; <a name="l01037"></a>01037 <a name="l01038"></a>01038 <a name="l01041"></a><a class="code" href="class_json_1_1_value_iterator.html">01041</a> <span class="keyword">class </span><a class="code" href="class_json_1_1_value_iterator.html" title="Iterator for object and array value.">ValueIterator</a> : <span class="keyword">public</span> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a> <a name="l01042"></a>01042 { <a name="l01043"></a><a class="code" href="class_json_1_1_value_iterator.html#aeceedf6e1a7d48a588516ce2b1983d6f">01043</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>; <a name="l01044"></a>01044 <span class="keyword">public</span>: <a name="l01045"></a><a class="code" href="class_json_1_1_value_iterator.html#a308b8932ffc83eaa9d12dadd5c11a7dd">01045</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_iterator.html#a308b8932ffc83eaa9d12dadd5c11a7dd">size_t</a>; <a name="l01046"></a><a class="code" href="class_json_1_1_value_iterator.html#a2be1a9aa60bbfc8812e9dd1a7f1a8786">01046</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="class_json_1_1_value_iterator.html#a2be1a9aa60bbfc8812e9dd1a7f1a8786">difference_type</a>; <a name="l01047"></a><a class="code" href="class_json_1_1_value_iterator.html#ae87929b4567aa00372cf602c43b57160">01047</a> <span class="keyword">typedef</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &<a class="code" href="class_json_1_1_value_iterator.html#ae87929b4567aa00372cf602c43b57160">reference</a>; <a name="l01048"></a><a class="code" href="class_json_1_1_value_iterator.html#acec45feb1ef1f3bf81240157d06d5432">01048</a> <span class="keyword">typedef</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> *<a class="code" href="class_json_1_1_value_iterator.html#acec45feb1ef1f3bf81240157d06d5432">pointer</a>; <a name="l01049"></a><a class="code" href="class_json_1_1_value_iterator.html#a23357670fdad61792670d86f62db7e16">01049</a> <span class="keyword">typedef</span> <a class="code" href="class_json_1_1_value_iterator.html" title="Iterator for object and array value.">ValueIterator</a> <a class="code" href="class_json_1_1_value_iterator.html#a23357670fdad61792670d86f62db7e16">SelfType</a>; <a name="l01050"></a>01050 <a name="l01051"></a>01051 <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator</a>(); <a name="l01052"></a>01052 <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_const_iterator.html" title="const iterator for object and array value.">ValueConstIterator</a> &other ); <a name="l01053"></a>01053 <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator.html" title="Iterator for object and array value.">ValueIterator</a> &other ); <a name="l01054"></a>01054 <span class="keyword">private</span>: <a name="l01057"></a>01057 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l01058"></a>01058 <span class="preprocessor"></span> <span class="keyword">explicit</span> <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator</a>( <span class="keyword">const</span> Value::ObjectValues::iterator &current ); <a name="l01059"></a>01059 <span class="preprocessor">#else</span> <a name="l01060"></a>01060 <span class="preprocessor"></span> <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator</a>( <span class="keyword">const</span> ValueInternalArray::IteratorState &state ); <a name="l01061"></a>01061 <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator</a>( <span class="keyword">const</span> ValueInternalMap::IteratorState &state ); <a name="l01062"></a>01062 <span class="preprocessor">#endif</span> <a name="l01063"></a>01063 <span class="preprocessor"></span> <span class="keyword">public</span>: <a name="l01064"></a>01064 <a name="l01065"></a>01065 <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &<a class="code" href="class_json_1_1_value_iterator.html#a8e23312b1db874f7e403fd7e76611bdc">operator =</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &other ); <a name="l01066"></a>01066 <a name="l01067"></a><a class="code" href="class_json_1_1_value_iterator.html#abcf4ddd994a010742cd4a436d65acd08">01067</a> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> <a class="code" href="class_json_1_1_value_iterator.html#a92146c46f8249e2b2d12869e70cd4cee">operator++</a>( <span class="keywordtype">int</span> ) <a name="l01068"></a>01068 { <a name="l01069"></a>01069 <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> temp( *<span class="keyword">this</span> ); <a name="l01070"></a>01070 ++*<span class="keyword">this</span>; <a name="l01071"></a>01071 <span class="keywordflow">return</span> temp; <a name="l01072"></a>01072 } <a name="l01073"></a>01073 <a name="l01074"></a><a class="code" href="class_json_1_1_value_iterator.html#a06d6a29d96caf6af324a53973159e12b">01074</a> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> <a class="code" href="class_json_1_1_value_iterator.html#a811302a868518a0995a9def955df5720">operator--</a>( <span class="keywordtype">int</span> ) <a name="l01075"></a>01075 { <a name="l01076"></a>01076 <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> temp( *<span class="keyword">this</span> ); <a name="l01077"></a>01077 --*<span class="keyword">this</span>; <a name="l01078"></a>01078 <span class="keywordflow">return</span> temp; <a name="l01079"></a>01079 } <a name="l01080"></a>01080 <a name="l01081"></a><a class="code" href="class_json_1_1_value_iterator.html#a811302a868518a0995a9def955df5720">01081</a> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &<a class="code" href="class_json_1_1_value_iterator.html#a811302a868518a0995a9def955df5720">operator--</a>() <a name="l01082"></a>01082 { <a name="l01083"></a>01083 <a class="code" href="class_json_1_1_value_iterator_base.html#affc8cf5ff54a9f432cc693362c153fa6">decrement</a>(); <a name="l01084"></a>01084 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l01085"></a>01085 } <a name="l01086"></a>01086 <a name="l01087"></a><a class="code" href="class_json_1_1_value_iterator.html#a92146c46f8249e2b2d12869e70cd4cee">01087</a> <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">SelfType</a> &<a class="code" href="class_json_1_1_value_iterator.html#a92146c46f8249e2b2d12869e70cd4cee">operator++</a>() <a name="l01088"></a>01088 { <a name="l01089"></a>01089 <a class="code" href="class_json_1_1_value_iterator_base.html#afe58f9534e1fd2033419fd9fe244551e">increment</a>(); <a name="l01090"></a>01090 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l01091"></a>01091 } <a name="l01092"></a>01092 <a name="l01093"></a><a class="code" href="class_json_1_1_value_iterator.html#aaa5be3457eedf0526a03b8a3b4c7c0a0">01093</a> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">reference</a> <a class="code" href="class_json_1_1_value_iterator.html#aaa5be3457eedf0526a03b8a3b4c7c0a0">operator *</a>()<span class="keyword"> const</span> <a name="l01094"></a>01094 <span class="keyword"> </span>{ <a name="l01095"></a>01095 <span class="keywordflow">return</span> <a class="code" href="class_json_1_1_value_iterator_base.html#a40a20c65abc423a26e3aae68d9a0525c">deref</a>(); <a name="l01096"></a>01096 } <a name="l01097"></a>01097 }; <a name="l01098"></a>01098 <a name="l01099"></a>01099 <a name="l01100"></a>01100 } <span class="comment">// namespace Json</span> <a name="l01101"></a>01101 <a name="l01102"></a>01102 <a name="l01103"></a>01103 <span class="preprocessor">#endif // CPPTL_JSON_H_INCLUDED</span> </pre></div></div><!-- contents --> <hr> <table width="100%"> <tr> <td width="10%" align="left" valign="center"> <a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=144446" width="88" height="31" border="0" alt="SourceForge Logo"></a> </td> <td width="20%" align="left" valign="center"> hosts this site. </td> <td> </td> <td align="right" valign="center"> Send comments to:<br> <a href="mailto:jsoncpp-devel@lists.sourceforge.net">Json-cpp Developers</a> </td> </tr> </table> </body> </html>
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare