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/json__valueiterator_8inl_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_98a0868cf2f166cd104f97edd9e7e6b0.html">src</a> </li> <li class="navelem"><a class="el" href="dir_c3e165d54b8a49f78816620c9cb89059.html">lib_json</a> </li> </ul> </div> </div> <div class="header"> <div class="headertitle"> <div class="title">json_valueiterator.inl</div> </div> </div><!--header--> <div class="contents"> <a href="json__valueiterator_8inl.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="comment">// included by json_value.cpp</span> <a name="l00007"></a>00007 <a name="l00008"></a>00008 <span class="keyword">namespace </span>Json { <a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00011"></a>00011 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00012"></a>00012 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00013"></a>00013 <span class="comment">// class ValueIteratorBase</span> <a name="l00014"></a>00014 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00015"></a>00015 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00016"></a>00016 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00017"></a>00017 <a name="l00018"></a><a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">00018</a> <a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">ValueIteratorBase::ValueIteratorBase</a>() <a name="l00019"></a>00019 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00020"></a>00020 <span class="preprocessor"></span> : current_() <a name="l00021"></a>00021 , isNull_( <span class="keyword">true</span> ) <a name="l00022"></a>00022 { <a name="l00023"></a>00023 } <a name="l00024"></a>00024 <span class="preprocessor">#else</span> <a name="l00025"></a>00025 <span class="preprocessor"></span> : isArray_( <span class="keyword">true</span> ) <a name="l00026"></a>00026 , isNull_( <span class="keyword">true</span> ) <a name="l00027"></a>00027 { <a name="l00028"></a>00028 iterator_.array_ = ValueInternalArray::IteratorState(); <a name="l00029"></a>00029 } <a name="l00030"></a>00030 <span class="preprocessor">#endif</span> <a name="l00031"></a>00031 <span class="preprocessor"></span> <a name="l00032"></a>00032 <a name="l00033"></a>00033 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00034"></a>00034 <span class="preprocessor"></span><a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">ValueIteratorBase::ValueIteratorBase</a>( <span class="keyword">const</span> Value::ObjectValues::iterator &current ) <a name="l00035"></a>00035 : current_( current ) <a name="l00036"></a>00036 , isNull_( false ) <a name="l00037"></a>00037 { <a name="l00038"></a>00038 } <a name="l00039"></a>00039 <span class="preprocessor">#else</span> <a name="l00040"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a960e13a8309a7f6926c54fe400777f8d">00040</a> <span class="preprocessor"></span><a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">ValueIteratorBase::ValueIteratorBase</a>( <span class="keyword">const</span> ValueInternalArray::IteratorState &state ) <a name="l00041"></a>00041 : isArray_( true ) <a name="l00042"></a>00042 { <a name="l00043"></a>00043 iterator_.array_ = state; <a name="l00044"></a>00044 } <a name="l00045"></a>00045 <a name="l00046"></a>00046 <a name="l00047"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a7512c77a51315e4e8682532deb7b85d2">00047</a> <a class="code" href="class_json_1_1_value_iterator_base.html#af45b028d9ff9cbd2554a87878b42dd75">ValueIteratorBase::ValueIteratorBase</a>( <span class="keyword">const</span> ValueInternalMap::IteratorState &state ) <a name="l00048"></a>00048 : isArray_( false ) <a name="l00049"></a>00049 { <a name="l00050"></a>00050 iterator_.map_ = state; <a name="l00051"></a>00051 } <a name="l00052"></a>00052 <span class="preprocessor">#endif</span> <a name="l00053"></a>00053 <span class="preprocessor"></span> <a name="l00054"></a>00054 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> & <a name="l00055"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a40a20c65abc423a26e3aae68d9a0525c">00055</a> <a class="code" href="class_json_1_1_value_iterator_base.html#a40a20c65abc423a26e3aae68d9a0525c">ValueIteratorBase::deref</a>()<span class="keyword"> const</span> <a name="l00056"></a>00056 <span class="keyword"></span>{ <a name="l00057"></a>00057 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00058"></a>00058 <span class="preprocessor"></span> <span class="keywordflow">return</span> current_->second; <a name="l00059"></a>00059 <span class="preprocessor">#else</span> <a name="l00060"></a>00060 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isArray_ ) <a name="l00061"></a>00061 <span class="keywordflow">return</span> ValueInternalArray::dereference( iterator_.array_ ); <a name="l00062"></a>00062 <span class="keywordflow">return</span> ValueInternalMap::value( iterator_.map_ ); <a name="l00063"></a>00063 <span class="preprocessor">#endif</span> <a name="l00064"></a>00064 <span class="preprocessor"></span>} <a name="l00065"></a>00065 <a name="l00066"></a>00066 <a name="l00067"></a>00067 <span class="keywordtype">void</span> <a name="l00068"></a><a class="code" href="class_json_1_1_value_iterator_base.html#afe58f9534e1fd2033419fd9fe244551e">00068</a> <a class="code" href="class_json_1_1_value_iterator_base.html#afe58f9534e1fd2033419fd9fe244551e">ValueIteratorBase::increment</a>() <a name="l00069"></a>00069 { <a name="l00070"></a>00070 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00071"></a>00071 <span class="preprocessor"></span> ++current_; <a name="l00072"></a>00072 <span class="preprocessor">#else</span> <a name="l00073"></a>00073 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isArray_ ) <a name="l00074"></a>00074 <a class="code" href="class_json_1_1_value_iterator_base.html#afe58f9534e1fd2033419fd9fe244551e">ValueInternalArray::increment</a>( iterator_.array_ ); <a name="l00075"></a>00075 <a class="code" href="class_json_1_1_value_iterator_base.html#afe58f9534e1fd2033419fd9fe244551e">ValueInternalMap::increment</a>( iterator_.map_ ); <a name="l00076"></a>00076 <span class="preprocessor">#endif</span> <a name="l00077"></a>00077 <span class="preprocessor"></span>} <a name="l00078"></a>00078 <a name="l00079"></a>00079 <a name="l00080"></a>00080 <span class="keywordtype">void</span> <a name="l00081"></a><a class="code" href="class_json_1_1_value_iterator_base.html#affc8cf5ff54a9f432cc693362c153fa6">00081</a> <a class="code" href="class_json_1_1_value_iterator_base.html#affc8cf5ff54a9f432cc693362c153fa6">ValueIteratorBase::decrement</a>() <a name="l00082"></a>00082 { <a name="l00083"></a>00083 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00084"></a>00084 <span class="preprocessor"></span> --current_; <a name="l00085"></a>00085 <span class="preprocessor">#else</span> <a name="l00086"></a>00086 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isArray_ ) <a name="l00087"></a>00087 <a class="code" href="class_json_1_1_value_iterator_base.html#affc8cf5ff54a9f432cc693362c153fa6">ValueInternalArray::decrement</a>( iterator_.array_ ); <a name="l00088"></a>00088 <a class="code" href="class_json_1_1_value_iterator_base.html#affc8cf5ff54a9f432cc693362c153fa6">ValueInternalMap::decrement</a>( iterator_.map_ ); <a name="l00089"></a>00089 <span class="preprocessor">#endif</span> <a name="l00090"></a>00090 <span class="preprocessor"></span>} <a name="l00091"></a>00091 <a name="l00092"></a>00092 <a name="l00093"></a>00093 <a class="code" href="class_json_1_1_value_iterator_base.html#a4e44bf8cbd17ec8d6e2c185904a15ebd">ValueIteratorBase::difference_type</a> <a name="l00094"></a><a class="code" href="class_json_1_1_value_iterator_base.html#ad6c553b249e89e3dc9933e100ccbe064">00094</a> <a class="code" href="class_json_1_1_value_iterator_base.html#ad6c553b249e89e3dc9933e100ccbe064">ValueIteratorBase::computeDistance</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="l00095"></a>00095 <span class="keyword"></span>{ <a name="l00096"></a>00096 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor"># ifdef JSON_USE_CPPTL_SMALLMAP</span> <a name="l00098"></a>00098 <span class="preprocessor"></span> <span class="keywordflow">return</span> current_ - other.current_; <a name="l00099"></a>00099 <span class="preprocessor"># else</span> <a name="l00100"></a>00100 <span class="preprocessor"></span> <span class="comment">// Iterator for null value are initialized using the default</span> <a name="l00101"></a>00101 <span class="comment">// constructor, which initialize current_ to the default</span> <a name="l00102"></a>00102 <span class="comment">// std::map::iterator. As begin() and end() are two instance </span> <a name="l00103"></a>00103 <span class="comment">// of the default std::map::iterator, they can not be compared.</span> <a name="l00104"></a>00104 <span class="comment">// To allow this, we handle this comparison specifically.</span> <a name="l00105"></a>00105 <span class="keywordflow">if</span> ( isNull_ && other.isNull_ ) <a name="l00106"></a>00106 { <a name="l00107"></a>00107 <span class="keywordflow">return</span> 0; <a name="l00108"></a>00108 } <a name="l00109"></a>00109 <a name="l00110"></a>00110 <a name="l00111"></a>00111 <span class="comment">// Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL,</span> <a name="l00112"></a>00112 <span class="comment">// which is the one used by default).</span> <a name="l00113"></a>00113 <span class="comment">// Using a portable hand-made version for non random iterator instead:</span> <a name="l00114"></a>00114 <span class="comment">// return difference_type( std::distance( current_, other.current_ ) );</span> <a name="l00115"></a>00115 <a class="code" href="class_json_1_1_value_iterator_base.html#a4e44bf8cbd17ec8d6e2c185904a15ebd">difference_type</a> myDistance = 0; <a name="l00116"></a>00116 <span class="keywordflow">for</span> ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it ) <a name="l00117"></a>00117 { <a name="l00118"></a>00118 ++myDistance; <a name="l00119"></a>00119 } <a name="l00120"></a>00120 <span class="keywordflow">return</span> myDistance; <a name="l00121"></a>00121 <span class="preprocessor"># endif</span> <a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00123"></a>00123 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isArray_ ) <a name="l00124"></a>00124 <span class="keywordflow">return</span> ValueInternalArray::distance( iterator_.array_, other.iterator_.<a class="code" href="class_json_1_1_value_iterator_base.html#ab4f9f76a9eb955e7d56a337a19c05a21">array_</a> ); <a name="l00125"></a>00125 <span class="keywordflow">return</span> ValueInternalMap::distance( iterator_.map_, other.iterator_.<a class="code" href="class_json_1_1_value_iterator_base.html#a5b5754cb0037cc60a871bcdc3d6ad72e">map_</a> ); <a name="l00126"></a>00126 <span class="preprocessor">#endif</span> <a name="l00127"></a>00127 <span class="preprocessor"></span>} <a name="l00128"></a>00128 <a name="l00129"></a>00129 <a name="l00130"></a>00130 <span class="keywordtype">bool</span> <a name="l00131"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a21820d6ee564e541bd118b21e4741962">00131</a> <a class="code" href="class_json_1_1_value_iterator_base.html#a21820d6ee564e541bd118b21e4741962">ValueIteratorBase::isEqual</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="l00132"></a>00132 <span class="keyword"></span>{ <a name="l00133"></a>00133 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00134"></a>00134 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isNull_ ) <a name="l00135"></a>00135 { <a name="l00136"></a>00136 <span class="keywordflow">return</span> other.isNull_; <a name="l00137"></a>00137 } <a name="l00138"></a>00138 <span class="keywordflow">return</span> current_ == other.current_; <a name="l00139"></a>00139 <span class="preprocessor">#else</span> <a name="l00140"></a>00140 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isArray_ ) <a name="l00141"></a>00141 <span class="keywordflow">return</span> ValueInternalArray::equals( iterator_.array_, other.iterator_.<a class="code" href="class_json_1_1_value_iterator_base.html#ab4f9f76a9eb955e7d56a337a19c05a21">array_</a> ); <a name="l00142"></a>00142 <span class="keywordflow">return</span> ValueInternalMap::equals( iterator_.map_, other.iterator_.<a class="code" href="class_json_1_1_value_iterator_base.html#a5b5754cb0037cc60a871bcdc3d6ad72e">map_</a> ); <a name="l00143"></a>00143 <span class="preprocessor">#endif</span> <a name="l00144"></a>00144 <span class="preprocessor"></span>} <a name="l00145"></a>00145 <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="keywordtype">void</span> <a name="l00148"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a496e6aba44808433ec5858c178be5719">00148</a> <a class="code" href="class_json_1_1_value_iterator_base.html#a496e6aba44808433ec5858c178be5719">ValueIteratorBase::copy</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="l00149"></a>00149 { <a name="l00150"></a>00150 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00151"></a>00151 <span class="preprocessor"></span> current_ = other.current_; <a name="l00152"></a>00152 <span class="preprocessor">#else</span> <a name="l00153"></a>00153 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isArray_ ) <a name="l00154"></a>00154 iterator_.array_ = other.iterator_.<a class="code" href="class_json_1_1_value_iterator_base.html#ab4f9f76a9eb955e7d56a337a19c05a21">array_</a>; <a name="l00155"></a>00155 iterator_.map_ = other.iterator_.<a class="code" href="class_json_1_1_value_iterator_base.html#a5b5754cb0037cc60a871bcdc3d6ad72e">map_</a>; <a name="l00156"></a>00156 <span class="preprocessor">#endif</span> <a name="l00157"></a>00157 <span class="preprocessor"></span>} <a name="l00158"></a>00158 <a name="l00159"></a>00159 <a name="l00160"></a>00160 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> <a name="l00161"></a><a class="code" href="class_json_1_1_value_iterator_base.html#aa2ff5e79fc96acd4c3cd288e92614fc7">00161</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.">ValueIteratorBase::key</a>()<span class="keyword"> const</span> <a name="l00162"></a>00162 <span class="keyword"></span>{ <a name="l00163"></a>00163 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00164"></a>00164 <span class="preprocessor"></span> <span class="keyword">const</span> Value::CZString czstring = (*current_).first; <a name="l00165"></a>00165 <span class="keywordflow">if</span> ( czstring.c_str() ) <a name="l00166"></a>00166 { <a name="l00167"></a>00167 <span class="keywordflow">if</span> ( czstring.isStaticString() ) <a name="l00168"></a>00168 <span class="keywordflow">return</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_static_string.html" title="Lightweight wrapper to tag static string.">StaticString</a>( czstring.c_str() ) ); <a name="l00169"></a>00169 <span class="keywordflow">return</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( czstring.c_str() ); <a name="l00170"></a>00170 } <a name="l00171"></a>00171 <span class="keywordflow">return</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( czstring.index() ); <a name="l00172"></a>00172 <span class="preprocessor">#else</span> <a name="l00173"></a>00173 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isArray_ ) <a name="l00174"></a>00174 <span class="keywordflow">return</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( ValueInternalArray::indexOf( iterator_.array_ ) ); <a name="l00175"></a>00175 <span class="keywordtype">bool</span> isStatic; <a name="l00176"></a>00176 <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> = <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.">ValueInternalMap::key</a>( iterator_.map_, isStatic ); <a name="l00177"></a>00177 <span class="keywordflow">if</span> ( isStatic ) <a name="l00178"></a>00178 <span class="keywordflow">return</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_static_string.html" title="Lightweight wrapper to tag static string.">StaticString</a>( memberName ) ); <a name="l00179"></a>00179 <span class="keywordflow">return</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a>( memberName ); <a name="l00180"></a>00180 <span class="preprocessor">#endif</span> <a name="l00181"></a>00181 <span class="preprocessor"></span>} <a name="l00182"></a>00182 <a name="l00183"></a>00183 <a name="l00184"></a>00184 <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">UInt</a> <a name="l00185"></a><a class="code" href="class_json_1_1_value_iterator_base.html#aa90591f5f7f8d2f06cc4605816b53738">00185</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.">ValueIteratorBase::index</a>()<span class="keyword"> const</span> <a name="l00186"></a>00186 <span class="keyword"></span>{ <a name="l00187"></a>00187 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00188"></a>00188 <span class="preprocessor"></span> <span class="keyword">const</span> Value::CZString czstring = (*current_).first; <a name="l00189"></a>00189 <span class="keywordflow">if</span> ( !czstring.c_str() ) <a name="l00190"></a>00190 <span class="keywordflow">return</span> czstring.index(); <a name="l00191"></a>00191 <span class="keywordflow">return</span> <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">Value::UInt</a>( -1 ); <a name="l00192"></a>00192 <span class="preprocessor">#else</span> <a name="l00193"></a>00193 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( isArray_ ) <a name="l00194"></a>00194 <span class="keywordflow">return</span> <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">Value::UInt</a>( ValueInternalArray::indexOf( iterator_.array_ ) ); <a name="l00195"></a>00195 <span class="keywordflow">return</span> <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">Value::UInt</a>( -1 ); <a name="l00196"></a>00196 <span class="preprocessor">#endif</span> <a name="l00197"></a>00197 <span class="preprocessor"></span>} <a name="l00198"></a>00198 <a name="l00199"></a>00199 <a name="l00200"></a>00200 <span class="keyword">const</span> <span class="keywordtype">char</span> * <a name="l00201"></a><a class="code" href="class_json_1_1_value_iterator_base.html#a83768d87c608c8d1133de8721eefc31b">00201</a> <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.">ValueIteratorBase::memberName</a>()<span class="keyword"> const</span> <a name="l00202"></a>00202 <span class="keyword"></span>{ <a name="l00203"></a>00203 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00204"></a>00204 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">char</span> *name = (*current_).first.c_str(); <a name="l00205"></a>00205 <span class="keywordflow">return</span> name ? name : <span class="stringliteral">""</span>; <a name="l00206"></a>00206 <span class="preprocessor">#else</span> <a name="l00207"></a>00207 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( !isArray_ ) <a name="l00208"></a>00208 <span class="keywordflow">return</span> <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.">ValueInternalMap::key</a>( iterator_.map_ ); <a name="l00209"></a>00209 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; <a name="l00210"></a>00210 <span class="preprocessor">#endif</span> <a name="l00211"></a>00211 <span class="preprocessor"></span>} <a name="l00212"></a>00212 <a name="l00213"></a>00213 <a name="l00214"></a>00214 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00215"></a>00215 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00216"></a>00216 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00217"></a>00217 <span class="comment">// class ValueConstIterator</span> <a name="l00218"></a>00218 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00219"></a>00219 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00220"></a>00220 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00221"></a>00221 <a name="l00222"></a><a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">00222</a> <a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">ValueConstIterator::ValueConstIterator</a>() <a name="l00223"></a>00223 { <a name="l00224"></a>00224 } <a name="l00225"></a>00225 <a name="l00226"></a>00226 <a name="l00227"></a>00227 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00228"></a>00228 <span class="preprocessor"></span><a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">ValueConstIterator::ValueConstIterator</a>( <span class="keyword">const</span> Value::ObjectValues::iterator &current ) <a name="l00229"></a>00229 : <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a>( current ) <a name="l00230"></a>00230 { <a name="l00231"></a>00231 } <a name="l00232"></a>00232 <span class="preprocessor">#else</span> <a name="l00233"></a>00233 <span class="preprocessor"></span><a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">ValueConstIterator::ValueConstIterator</a>( <span class="keyword">const</span> ValueInternalArray::IteratorState &state ) <a name="l00234"></a>00234 : ValueIteratorBase( state ) <a name="l00235"></a>00235 { <a name="l00236"></a>00236 } <a name="l00237"></a>00237 <a name="l00238"></a>00238 <a class="code" href="class_json_1_1_value_const_iterator.html#a1b10a46f1606421b0663492a5f9a2aad">ValueConstIterator::ValueConstIterator</a>( <span class="keyword">const</span> ValueInternalMap::IteratorState &state ) <a name="l00239"></a>00239 : ValueIteratorBase( state ) <a name="l00240"></a>00240 { <a name="l00241"></a>00241 } <a name="l00242"></a>00242 <span class="preprocessor">#endif</span> <a name="l00243"></a>00243 <span class="preprocessor"></span> <a name="l00244"></a>00244 ValueConstIterator & <a name="l00245"></a><a class="code" href="class_json_1_1_value_const_iterator.html#ad1b1c11f8d7fb22d4d3c231915f2b15b">00245</a> <a class="code" href="class_json_1_1_value_const_iterator.html#ad1b1c11f8d7fb22d4d3c231915f2b15b">ValueConstIterator::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="l00246"></a>00246 { <a name="l00247"></a>00247 <a class="code" href="class_json_1_1_value_iterator_base.html#a496e6aba44808433ec5858c178be5719">copy</a>( other ); <a name="l00248"></a>00248 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00249"></a>00249 } <a name="l00250"></a>00250 <a name="l00251"></a>00251 <a name="l00252"></a>00252 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00253"></a>00253 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00254"></a>00254 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00255"></a>00255 <span class="comment">// class ValueIterator</span> <a name="l00256"></a>00256 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00257"></a>00257 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00258"></a>00258 <span class="comment">// //////////////////////////////////////////////////////////////////</span> <a name="l00259"></a>00259 <a name="l00260"></a><a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">00260</a> <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator::ValueIterator</a>() <a name="l00261"></a>00261 { <a name="l00262"></a>00262 } <a name="l00263"></a>00263 <a name="l00264"></a>00264 <a name="l00265"></a>00265 <span class="preprocessor">#ifndef JSON_VALUE_USE_INTERNAL_MAP</span> <a name="l00266"></a>00266 <span class="preprocessor"></span><a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator::ValueIterator</a>( <span class="keyword">const</span> Value::ObjectValues::iterator &current ) <a name="l00267"></a>00267 : <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a>( current ) <a name="l00268"></a>00268 { <a name="l00269"></a>00269 } <a name="l00270"></a>00270 <span class="preprocessor">#else</span> <a name="l00271"></a>00271 <span class="preprocessor"></span><a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator::ValueIterator</a>( <span class="keyword">const</span> ValueInternalArray::IteratorState &state ) <a name="l00272"></a>00272 : ValueIteratorBase( state ) <a name="l00273"></a>00273 { <a name="l00274"></a>00274 } <a name="l00275"></a>00275 <a name="l00276"></a>00276 <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator::ValueIterator</a>( <span class="keyword">const</span> ValueInternalMap::IteratorState &state ) <a name="l00277"></a>00277 : ValueIteratorBase( state ) <a name="l00278"></a>00278 { <a name="l00279"></a>00279 } <a name="l00280"></a>00280 <span class="preprocessor">#endif</span> <a name="l00281"></a>00281 <span class="preprocessor"></span> <a name="l00282"></a><a class="code" href="class_json_1_1_value_iterator.html#aa85aa208670891670392259efa0143bb">00282</a> <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator::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="l00283"></a>00283 : <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a>( other ) <a name="l00284"></a>00284 { <a name="l00285"></a>00285 } <a name="l00286"></a>00286 <a name="l00287"></a><a class="code" href="class_json_1_1_value_iterator.html#a7d5e58a9a4a553968acdf3064b39d21c">00287</a> <a class="code" href="class_json_1_1_value_iterator.html#a09425cf4dc12244072a942f290a5c0ec">ValueIterator::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="l00288"></a>00288 : <a class="code" href="class_json_1_1_value_iterator_base.html" title="base class for Value iterators.">ValueIteratorBase</a>( other ) <a name="l00289"></a>00289 { <a name="l00290"></a>00290 } <a name="l00291"></a>00291 <a name="l00292"></a>00292 <a class="code" href="class_json_1_1_value_iterator.html" title="Iterator for object and array value.">ValueIterator</a> & <a name="l00293"></a><a class="code" href="class_json_1_1_value_iterator.html#a8e23312b1db874f7e403fd7e76611bdc">00293</a> <a class="code" href="class_json_1_1_value_iterator.html#a8e23312b1db874f7e403fd7e76611bdc">ValueIterator::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="l00294"></a>00294 { <a name="l00295"></a>00295 <a class="code" href="class_json_1_1_value_iterator_base.html#a496e6aba44808433ec5858c178be5719">copy</a>( other ); <a name="l00296"></a>00296 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00297"></a>00297 } <a name="l00298"></a>00298 <a name="l00299"></a>00299 } <span class="comment">// namespace Json</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