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/writer_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">writer.h</div> </div> </div><!--header--> <div class="contents"> <a href="writer_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 JSON_WRITER_H_INCLUDED</span> <a name="l00007"></a>00007 <span class="preprocessor"></span><span class="preprocessor"># define JSON_WRITER_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="value_8h.html">value.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 <vector></span> <a name="l00013"></a>00013 <span class="preprocessor"># include <string></span> <a name="l00014"></a>00014 <span class="preprocessor"># include <iostream></span> <a name="l00015"></a>00015 <a name="l00016"></a>00016 <span class="keyword">namespace </span>Json { <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="keyword">class </span>Value; <a name="l00019"></a>00019 <a name="l00022"></a><a class="code" href="class_json_1_1_writer.html">00022</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_writer.html" title="Abstract class for writers.">Writer</a> <a name="l00023"></a>00023 { <a name="l00024"></a>00024 <span class="keyword">public</span>: <a name="l00025"></a>00025 <span class="keyword">virtual</span> ~<a class="code" href="class_json_1_1_writer.html" title="Abstract class for writers.">Writer</a>(); <a name="l00026"></a>00026 <a name="l00027"></a>00027 <span class="keyword">virtual</span> std::string write( <span class="keyword">const</span> <a class="code" href="class_json_1_1_value.html" title="Represents a JSON value.">Value</a> &root ) = 0; <a name="l00028"></a>00028 }; <a name="l00029"></a>00029 <a name="l00036"></a><a class="code" href="class_json_1_1_fast_writer.html">00036</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_fast_writer.html" title="Outputs a Value in JSON format without formatting (not human friendly).">FastWriter</a> : <span class="keyword">public</span> <a class="code" href="class_json_1_1_writer.html" title="Abstract class for writers.">Writer</a> <a name="l00037"></a>00037 { <a name="l00038"></a>00038 <span class="keyword">public</span>: <a name="l00039"></a>00039 <a class="code" href="class_json_1_1_fast_writer.html" title="Outputs a Value in JSON format without formatting (not human friendly).">FastWriter</a>(); <a name="l00040"></a><a class="code" href="class_json_1_1_fast_writer.html#a7eb61405d041a915e5e980be97a707aa">00040</a> <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_fast_writer.html#a7eb61405d041a915e5e980be97a707aa">~FastWriter</a>(){} <a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="keywordtype">void</span> enableYAMLCompatibility(); <a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="keyword">public</span>: <span class="comment">// overridden from Writer</span> <a name="l00045"></a>00045 <span class="keyword">virtual</span> std::string write( <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="l00046"></a>00046 <a name="l00047"></a>00047 <span class="keyword">private</span>: <a name="l00048"></a>00048 <span class="keywordtype">void</span> writeValue( <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="l00049"></a>00049 <a name="l00050"></a>00050 std::string document_; <a name="l00051"></a>00051 <span class="keywordtype">bool</span> yamlCompatiblityEnabled_; <a name="l00052"></a>00052 }; <a name="l00053"></a>00053 <a name="l00072"></a><a class="code" href="class_json_1_1_styled_writer.html">00072</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_styled_writer.html" title="Writes a Value in JSON format in a human friendly way.">StyledWriter</a>: <span class="keyword">public</span> <a class="code" href="class_json_1_1_writer.html" title="Abstract class for writers.">Writer</a> <a name="l00073"></a>00073 { <a name="l00074"></a>00074 <span class="keyword">public</span>: <a name="l00075"></a>00075 <a class="code" href="class_json_1_1_styled_writer.html" title="Writes a Value in JSON format in a human friendly way.">StyledWriter</a>(); <a name="l00076"></a><a class="code" href="class_json_1_1_styled_writer.html#a7eb58eabb70c6b80ac1ccec93c0c8602">00076</a> <span class="keyword">virtual</span> <a class="code" href="class_json_1_1_styled_writer.html#a7eb58eabb70c6b80ac1ccec93c0c8602">~StyledWriter</a>(){} <a name="l00077"></a>00077 <a name="l00078"></a>00078 <span class="keyword">public</span>: <span class="comment">// overridden from Writer</span> <a name="l00083"></a>00083 <span class="comment"></span> <span class="keyword">virtual</span> std::string write( <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="l00084"></a>00084 <a name="l00085"></a>00085 <span class="keyword">private</span>: <a name="l00086"></a>00086 <span class="keywordtype">void</span> writeValue( <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="l00087"></a>00087 <span class="keywordtype">void</span> writeArrayValue( <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="l00088"></a>00088 <span class="keywordtype">bool</span> isMultineArray( <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="l00089"></a>00089 <span class="keywordtype">void</span> pushValue( <span class="keyword">const</span> std::string &value ); <a name="l00090"></a>00090 <span class="keywordtype">void</span> writeIndent(); <a name="l00091"></a>00091 <span class="keywordtype">void</span> writeWithIndent( <span class="keyword">const</span> std::string &value ); <a name="l00092"></a>00092 <span class="keywordtype">void</span> indent(); <a name="l00093"></a>00093 <span class="keywordtype">void</span> unindent(); <a name="l00094"></a>00094 <span class="keywordtype">void</span> writeCommentBeforeValue( <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="l00095"></a>00095 <span class="keywordtype">void</span> writeCommentAfterValueOnSameLine( <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="l00096"></a>00096 <span class="keywordtype">bool</span> hasCommentForValue( <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="l00097"></a>00097 <span class="keyword">static</span> std::string normalizeEOL( <span class="keyword">const</span> std::string &text ); <a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="keyword">typedef</span> std::vector<std::string> ChildValues; <a name="l00100"></a>00100 <a name="l00101"></a>00101 ChildValues childValues_; <a name="l00102"></a>00102 std::string document_; <a name="l00103"></a>00103 std::string indentString_; <a name="l00104"></a>00104 <span class="keywordtype">int</span> rightMargin_; <a name="l00105"></a>00105 <span class="keywordtype">int</span> indentSize_; <a name="l00106"></a>00106 <span class="keywordtype">bool</span> addChildValues_; <a name="l00107"></a>00107 }; <a name="l00108"></a>00108 <a name="l00129"></a><a class="code" href="class_json_1_1_styled_stream_writer.html">00129</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_styled_stream_writer.html" title="Writes a Value in JSON format in a human friendly way, to a stream rather than to a string...">StyledStreamWriter</a> <a name="l00130"></a>00130 { <a name="l00131"></a>00131 <span class="keyword">public</span>: <a name="l00132"></a>00132 <a class="code" href="class_json_1_1_styled_stream_writer.html" title="Writes a Value in JSON format in a human friendly way, to a stream rather than to a string...">StyledStreamWriter</a>( std::string indentation=<span class="stringliteral">"\t"</span> ); <a name="l00133"></a><a class="code" href="class_json_1_1_styled_stream_writer.html#a17444a59f617970279714e97b0ddfa46">00133</a> <a class="code" href="class_json_1_1_styled_stream_writer.html#a17444a59f617970279714e97b0ddfa46">~StyledStreamWriter</a>(){} <a name="l00134"></a>00134 <a name="l00135"></a>00135 <span class="keyword">public</span>: <a name="l00141"></a>00141 <span class="keywordtype">void</span> write( std::ostream &out, <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="l00142"></a>00142 <a name="l00143"></a>00143 <span class="keyword">private</span>: <a name="l00144"></a>00144 <span class="keywordtype">void</span> writeValue( <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="l00145"></a>00145 <span class="keywordtype">void</span> writeArrayValue( <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="l00146"></a>00146 <span class="keywordtype">bool</span> isMultineArray( <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="l00147"></a>00147 <span class="keywordtype">void</span> pushValue( <span class="keyword">const</span> std::string &value ); <a name="l00148"></a>00148 <span class="keywordtype">void</span> writeIndent(); <a name="l00149"></a>00149 <span class="keywordtype">void</span> writeWithIndent( <span class="keyword">const</span> std::string &value ); <a name="l00150"></a>00150 <span class="keywordtype">void</span> indent(); <a name="l00151"></a>00151 <span class="keywordtype">void</span> unindent(); <a name="l00152"></a>00152 <span class="keywordtype">void</span> writeCommentBeforeValue( <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="l00153"></a>00153 <span class="keywordtype">void</span> writeCommentAfterValueOnSameLine( <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="l00154"></a>00154 <span class="keywordtype">bool</span> hasCommentForValue( <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="l00155"></a>00155 <span class="keyword">static</span> std::string normalizeEOL( <span class="keyword">const</span> std::string &text ); <a name="l00156"></a>00156 <a name="l00157"></a>00157 <span class="keyword">typedef</span> std::vector<std::string> ChildValues; <a name="l00158"></a>00158 <a name="l00159"></a>00159 ChildValues childValues_; <a name="l00160"></a>00160 std::ostream* document_; <a name="l00161"></a>00161 std::string indentString_; <a name="l00162"></a>00162 <span class="keywordtype">int</span> rightMargin_; <a name="l00163"></a>00163 std::string indentation_; <a name="l00164"></a>00164 <span class="keywordtype">bool</span> addChildValues_; <a name="l00165"></a>00165 }; <a name="l00166"></a>00166 <a name="l00167"></a>00167 <span class="preprocessor"># if defined(JSON_HAS_INT64)</span> <a name="l00168"></a>00168 <span class="preprocessor"></span> std::string <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="namespace_json.html#a5d3eba6789f9a9c1ab563ff8b4a5090f">valueToString</a>( <a class="code" href="namespace_json.html#a08122e8005b706d982e48cca1e2119c7">Int</a> value ); <a name="l00169"></a>00169 std::string <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="namespace_json.html#a5d3eba6789f9a9c1ab563ff8b4a5090f">valueToString</a>( <a class="code" href="namespace_json.html#a800fb90eb6ee8d5d62b600c06f87f7d4">UInt</a> value ); <a name="l00170"></a>00170 <span class="preprocessor"># endif // if defined(JSON_HAS_INT64)</span> <a name="l00171"></a>00171 <span class="preprocessor"></span> std::string <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="namespace_json.html#a5d3eba6789f9a9c1ab563ff8b4a5090f">valueToString</a>( <a class="code" href="namespace_json.html#a218d880af853ce786cd985e82571d297">LargestInt</a> value ); <a name="l00172"></a>00172 std::string <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="namespace_json.html#a5d3eba6789f9a9c1ab563ff8b4a5090f">valueToString</a>( <a class="code" href="namespace_json.html#ae202ecad69725e23443f465e257456d0">LargestUInt</a> value ); <a name="l00173"></a>00173 std::string <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="namespace_json.html#a5d3eba6789f9a9c1ab563ff8b4a5090f">valueToString</a>( <span class="keywordtype">double</span> value ); <a name="l00174"></a>00174 std::string <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="namespace_json.html#a5d3eba6789f9a9c1ab563ff8b4a5090f">valueToString</a>( <span class="keywordtype">bool</span> value ); <a name="l00175"></a>00175 std::string <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="namespace_json.html#aa0c8235a4a5c6599da5d3332743db8ac">valueToQuotedString</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *value ); <a name="l00176"></a>00176 <a name="l00179"></a>00179 std::ostream& <a class="code" href="namespace_json.html#a87bc83d7e90fc666d28aa16727deda2f" title="Output using the StyledStreamWriter.">operator<<</a>( std::ostream&, <span class="keyword">const</span> Value &root ); <a name="l00180"></a>00180 <a name="l00181"></a>00181 } <span class="comment">// namespace Json</span> <a name="l00182"></a>00182 <a name="l00183"></a>00183 <a name="l00184"></a>00184 <a name="l00185"></a>00185 <span class="preprocessor">#endif // JSON_WRITER_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