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/reader_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">reader.h</div> </div> </div><!--header--> <div class="contents"> <a href="reader_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_READER_H_INCLUDED</span> <a name="l00007"></a>00007 <span class="preprocessor"></span><span class="preprocessor"># define CPPTL_JSON_READER_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="features_8h.html">features.h</a>"</span> <a name="l00011"></a>00011 <span class="preprocessor"># include "<a class="code" href="value_8h.html">value.h</a>"</span> <a name="l00012"></a>00012 <span class="preprocessor">#endif // if !defined(JSON_IS_AMALGAMATION)</span> <a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor"># include <deque></span> <a name="l00014"></a>00014 <span class="preprocessor"># include <stack></span> <a name="l00015"></a>00015 <span class="preprocessor"># include <string></span> <a name="l00016"></a>00016 <span class="preprocessor"># include <iostream></span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="keyword">namespace </span>Json { <a name="l00019"></a>00019 <a name="l00023"></a><a class="code" href="class_json_1_1_reader.html">00023</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_reader.html" title="Unserialize a JSON document into a Value.">Reader</a> <a name="l00024"></a>00024 { <a name="l00025"></a>00025 <span class="keyword">public</span>: <a name="l00026"></a><a class="code" href="class_json_1_1_reader.html#a3eec9118f3e9a672ba8348c3a79d0f45">00026</a> <span class="keyword">typedef</span> <span class="keywordtype">char</span> <a class="code" href="class_json_1_1_reader.html#a3eec9118f3e9a672ba8348c3a79d0f45">Char</a>; <a name="l00027"></a><a class="code" href="class_json_1_1_reader.html#a46795b5b272bf79a7730e406cb96375a">00027</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <a class="code" href="class_json_1_1_reader.html#a3eec9118f3e9a672ba8348c3a79d0f45">Char</a> *<a class="code" href="class_json_1_1_reader.html#a46795b5b272bf79a7730e406cb96375a">Location</a>; <a name="l00028"></a>00028 <a name="l00032"></a>00032 <a class="code" href="class_json_1_1_reader.html" title="Unserialize a JSON document into a Value.">Reader</a>(); <a name="l00033"></a>00033 <a name="l00037"></a>00037 <a class="code" href="class_json_1_1_reader.html" title="Unserialize a JSON document into a Value.">Reader</a>( <span class="keyword">const</span> <a class="code" href="class_json_1_1_features.html" title="Configuration passed to reader and writer.">Features</a> &features ); <a name="l00038"></a>00038 <a name="l00049"></a>00049 <span class="keywordtype">bool</span> parse( <span class="keyword">const</span> std::string &document, <a name="l00050"></a>00050 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &root, <a name="l00051"></a>00051 <span class="keywordtype">bool</span> collectComments = <span class="keyword">true</span> ); <a name="l00052"></a>00052 <a name="l00065"></a>00065 <span class="keywordtype">bool</span> parse( <span class="keyword">const</span> <span class="keywordtype">char</span> *beginDoc, <span class="keyword">const</span> <span class="keywordtype">char</span> *endDoc, <a name="l00066"></a>00066 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &root, <a name="l00067"></a>00067 <span class="keywordtype">bool</span> collectComments = <span class="keyword">true</span> ); <a name="l00068"></a>00068 <a name="l00071"></a>00071 <span class="keywordtype">bool</span> parse( std::istream &is, <a name="l00072"></a>00072 <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &root, <a name="l00073"></a>00073 <span class="keywordtype">bool</span> collectComments = <span class="keyword">true</span> ); <a name="l00074"></a>00074 <a name="l00081"></a>00081 JSONCPP_DEPRECATED(<span class="stringliteral">"Use getFormattedErrorMessages instead"</span>) <a name="l00082"></a>00082 std::<span class="keywordtype">string</span> getFormatedErrorMessages() const; <a name="l00083"></a>00083 <a name="l00089"></a>00089 std::<span class="keywordtype">string</span> getFormattedErrorMessages() const; <a name="l00090"></a>00090 <a name="l00091"></a>00091 private: <a name="l00092"></a>00092 enum TokenType <a name="l00093"></a>00093 { <a name="l00094"></a>00094 tokenEndOfStream = 0, <a name="l00095"></a>00095 tokenObjectBegin, <a name="l00096"></a>00096 tokenObjectEnd, <a name="l00097"></a>00097 tokenArrayBegin, <a name="l00098"></a>00098 tokenArrayEnd, <a name="l00099"></a>00099 tokenString, <a name="l00100"></a>00100 tokenNumber, <a name="l00101"></a>00101 tokenTrue, <a name="l00102"></a>00102 tokenFalse, <a name="l00103"></a>00103 tokenNull, <a name="l00104"></a>00104 tokenArraySeparator, <a name="l00105"></a>00105 tokenMemberSeparator, <a name="l00106"></a>00106 tokenComment, <a name="l00107"></a>00107 tokenError <a name="l00108"></a>00108 }; <a name="l00109"></a>00109 <a name="l00110"></a>00110 <span class="keyword">class </span>Token <a name="l00111"></a>00111 { <a name="l00112"></a>00112 <span class="keyword">public</span>: <a name="l00113"></a>00113 TokenType type_; <a name="l00114"></a>00114 Location start_; <a name="l00115"></a>00115 Location end_; <a name="l00116"></a>00116 }; <a name="l00117"></a>00117 <a name="l00118"></a>00118 <span class="keyword">class </span>ErrorInfo <a name="l00119"></a>00119 { <a name="l00120"></a>00120 <span class="keyword">public</span>: <a name="l00121"></a>00121 Token token_; <a name="l00122"></a>00122 std::string message_; <a name="l00123"></a>00123 Location extra_; <a name="l00124"></a>00124 }; <a name="l00125"></a>00125 <a name="l00126"></a>00126 <span class="keyword">typedef</span> std::deque<ErrorInfo> Errors; <a name="l00127"></a>00127 <a name="l00128"></a>00128 <span class="keywordtype">bool</span> expectToken( TokenType type, Token &token, <span class="keyword">const</span> <span class="keywordtype">char</span> *message ); <a name="l00129"></a>00129 <span class="keywordtype">bool</span> readToken( Token &token ); <a name="l00130"></a>00130 <span class="keywordtype">void</span> skipSpaces(); <a name="l00131"></a>00131 <span class="keywordtype">bool</span> match( Location pattern, <a name="l00132"></a>00132 <span class="keywordtype">int</span> patternLength ); <a name="l00133"></a>00133 <span class="keywordtype">bool</span> readComment(); <a name="l00134"></a>00134 <span class="keywordtype">bool</span> readCStyleComment(); <a name="l00135"></a>00135 <span class="keywordtype">bool</span> readCppStyleComment(); <a name="l00136"></a>00136 <span class="keywordtype">bool</span> readString(); <a name="l00137"></a>00137 <span class="keywordtype">void</span> readNumber(); <a name="l00138"></a>00138 <span class="keywordtype">bool</span> readValue(); <a name="l00139"></a>00139 <span class="keywordtype">bool</span> readObject( Token &token ); <a name="l00140"></a>00140 <span class="keywordtype">bool</span> readArray( Token &token ); <a name="l00141"></a>00141 <span class="keywordtype">bool</span> decodeNumber( Token &token ); <a name="l00142"></a>00142 <span class="keywordtype">bool</span> decodeString( Token &token ); <a name="l00143"></a>00143 <span class="keywordtype">bool</span> decodeString( Token &token, std::string &decoded ); <a name="l00144"></a>00144 <span class="keywordtype">bool</span> decodeDouble( Token &token ); <a name="l00145"></a>00145 <span class="keywordtype">bool</span> decodeUnicodeCodePoint( Token &token, <a name="l00146"></a>00146 Location &current, <a name="l00147"></a>00147 Location end, <a name="l00148"></a>00148 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &unicode ); <a name="l00149"></a>00149 <span class="keywordtype">bool</span> decodeUnicodeEscapeSequence( Token &token, <a name="l00150"></a>00150 Location &current, <a name="l00151"></a>00151 Location end, <a name="l00152"></a>00152 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &unicode ); <a name="l00153"></a>00153 <span class="keywordtype">bool</span> addError( <span class="keyword">const</span> std::string &message, <a name="l00154"></a>00154 Token &token, <a name="l00155"></a>00155 Location extra = 0 ); <a name="l00156"></a>00156 <span class="keywordtype">bool</span> recoverFromError( TokenType skipUntilToken ); <a name="l00157"></a>00157 <span class="keywordtype">bool</span> addErrorAndRecover( <span class="keyword">const</span> std::string &message, <a name="l00158"></a>00158 Token &token, <a name="l00159"></a>00159 TokenType skipUntilToken ); <a name="l00160"></a>00160 <span class="keywordtype">void</span> skipUntilSpace(); <a name="l00161"></a>00161 Value &currentValue(); <a name="l00162"></a>00162 Char getNextChar(); <a name="l00163"></a>00163 <span class="keywordtype">void</span> getLocationLineAndColumn( Location location, <a name="l00164"></a>00164 <span class="keywordtype">int</span> &line, <a name="l00165"></a>00165 <span class="keywordtype">int</span> &column ) <span class="keyword">const</span>; <a name="l00166"></a>00166 std::string getLocationLineAndColumn( Location location ) <span class="keyword">const</span>; <a name="l00167"></a>00167 <span class="keywordtype">void</span> addComment( Location begin, <a name="l00168"></a>00168 Location end, <a name="l00169"></a>00169 <a class="code" href="namespace_json.html#a4fc417c23905b2ae9e2c47d197a45351">CommentPlacement</a> placement ); <a name="l00170"></a>00170 <span class="keywordtype">void</span> skipCommentTokens( Token &token ); <a name="l00171"></a>00171 <a name="l00172"></a>00172 <span class="keyword">typedef</span> std::stack<Value *> Nodes; <a name="l00173"></a>00173 Nodes nodes_; <a name="l00174"></a>00174 Errors errors_; <a name="l00175"></a>00175 std::string document_; <a name="l00176"></a>00176 Location begin_; <a name="l00177"></a>00177 Location end_; <a name="l00178"></a>00178 Location current_; <a name="l00179"></a>00179 Location lastValueEnd_; <a name="l00180"></a>00180 Value *lastValue_; <a name="l00181"></a>00181 std::string commentsBefore_; <a name="l00182"></a>00182 Features features_; <a name="l00183"></a>00183 <span class="keywordtype">bool</span> collectComments_; <a name="l00184"></a>00184 }; <a name="l00185"></a>00185 <a name="l00210"></a>00210 std::istream& <a class="code" href="namespace_json.html#a4d245ef719cc0853e8e78eb5f99c16e5" title="Read from 'sin' into 'root'.">operator>></a>( std::istream&, Value& ); <a name="l00211"></a>00211 <a name="l00212"></a>00212 } <span class="comment">// namespace Json</span> <a name="l00213"></a>00213 <a name="l00214"></a>00214 <span class="preprocessor">#endif // CPPTL_JSON_READER_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