Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > dd7a95aabe1c049ac9f84beede8143d3 > files > 242

synopsis-doc-0.12-4.fc14.i686.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<!-- Scopes/Synopsis/Buffer.html -->
<!-- this view was generated by Scope -->
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/>
<title >Synopsis - Synopsis::Buffer</title>
<link href="../../style.css" type="text/css" rel="stylesheet" />
</head>
<body class="Scope">
<div class="navigation">
<span class="normal"><a href="../global.html" >Global Namespace</a></span>
<span class="normal"><a href="../../InheritanceTree.html" >Inheritance Tree</a></span>
<span class="normal"><a href="../../InheritanceGraph.html" >Inheritance Graph</a></span>
<span class="normal"><a href="../../NameIndex.html" >Name Index</a></span>
</div>
<!-- this part was generated by Heading -->
<div class="class-module">namespace <a href="../Synopsis.html" >Synopsis</a>
</div><div class="class-name">class Buffer

</div><div class="links"><div class="file">File: <a href="../../File/Synopsis/Buffer.hh.html" target="detail">../Synopsis/Buffer.hh</a></div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line22" ><img src="../../src-c++.png" alt="source code"/></a></div></div>   <div class="doc"><p>Buffer holds the memory on top of which a parse tree / syntax tree is
constructed. Besides giving access to individual characters, it provides
the means to register replacements for buffer chunks, such that when
the Buffer's write method is executed the new file will contain the
modified source.</p>
</div>
<!-- this part was generated by Summary -->
<div class="summary">
<div class="heading">Public Member functions Summary:</div>
<div class="item"><div class="synopsis">&#160;<i>constructor</i> <a class="name" id="Buffer_lstd_mstreambuf_S_cconst.std_mstring_A_r">Buffer</a>(std::streambuf*, const&#160;std::string&amp; = <span class="value">std :: string &#40; &quot;unknown&quot; &#41;</span>)  </div> <div class="xref"></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line25" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"></div></div>
<div class="item"><div class="synopsis">&#160;unsigned&#160;long <span class="name"><a href="Buffer.html#size_l_rconst" >size</a></span>() <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_msize_l_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line28" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>return the size of the buffer</p>
</div></div>
<div class="item"><div class="synopsis">&#160;char <span class="name"><a href="Buffer.html#get_l_r" >get</a></span>()  </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mget_l_r" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line31" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>report the character at the current position and advance one character</p>
</div></div>
<div class="item"><div class="synopsis">&#160;void <span class="name"><a href="Buffer.html#unget_l_r" >unget</a></span>()  </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_munget_l_r" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line33" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>undo the last get</p>
</div></div>
<div class="item"><div class="synopsis">&#160;void <span class="name"><a href="Buffer.html#reset_lunsigned.long_r" >reset</a></span>(unsigned&#160;long <span class="variable">c</span> = <span class="value">0</span>)  </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mreset_lunsigned.long_r" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line35" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>reset the current position to position c</p>
</div></div>
<div class="item"><div class="synopsis">&#160;unsigned&#160;long <span class="name"><a href="Buffer.html#position_l_rconst" >position</a></span>() <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mposition_l_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line38" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>report the current position</p>
</div></div>
<div class="item"><div class="synopsis">&#160;char <span class="name"><a href="Buffer.html#at_lunsigned.long_rconst" >at</a></span>(unsigned&#160;long <span class="variable">p</span>) <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mat_lunsigned.long_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line40" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>report the character at position p</p>
</div></div>
<div class="item"><div class="synopsis">&#160;const&#160;char* <span class="name"><a href="Buffer.html#ptr_lunsigned.long_rconst" >ptr</a></span>(unsigned&#160;long <span class="variable">p</span> = <span class="value">0</span>) <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mptr_lunsigned.long_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line42" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>report the pointer at position p</p>
</div></div>
<div class="item"><div class="synopsis">&#160;void <span class="name"><a href="Buffer.html#replace_lconst.char_S_cconst.char_S_cconst.char_S_cunsigned.long_r" >replace</a></span>(const&#160;char* <span class="variable">from</span>, const&#160;char* <span class="variable">to</span>, const&#160;char* <span class="variable">begin</span>, unsigned&#160;long <span class="variable">length</span>)  </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mreplace_lconst.char_S_cconst.char_S_cconst.char_S_cunsigned.long_r" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line47" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>replace the text between from and to by the text between
begin and begin + length</p>
</div></div>
<div class="item"><div class="synopsis">&#160;unsigned&#160;long <span class="name"><a href="Buffer.html#origin_lconst.char_S_cstd_mstring_A_rconst" >origin</a></span>(const&#160;char*, std::string&amp;) <span class="keyword">const</span> </div> <div class="xref"></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line50" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>Return the origin of the given pointer (filename and line number)</p>
</div></div>
<div class="item"><div class="synopsis">&#160;void <span class="name"><a href="Buffer.html#write_lstd_mostream_A_cconst.std_mstring_A_rconst" >write</a></span>(std::ostream&amp;, const&#160;std::string&amp;) <span class="keyword">const</span> </div> <div class="xref"></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line54" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>Write the buffer into the given output stream
The first line contains a line directive issuing the input file name;
if filename is non-empty, use this to fake another one.</p>
</div></div>
</div><!-- summary -->
<div class="summary">
<div class="heading">Private Typedefs Summary:</div>
<div class="item"><div class="synopsis">std::vector&lt;<a href="Buffer/Replacement.html" >Replacement</a>&gt; <a class="name" id="Replacements">Replacements</a></div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mReplacements" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line68" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"></div></div>
</div><!-- summary -->
<div class="summary">
<div class="heading">Private Structs Summary:</div>
<div class="item"><div class="synopsis">struct <a href="Buffer/Replacement.html" >Replacement</a></div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mReplacement" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line57" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"></div></div>
</div><!-- summary -->
<div class="summary">
<div class="heading">Private Member functions Summary:</div>
<div class="item"><div class="synopsis">&#160;long <span class="name"><a href="Buffer.html#read_line_directive_lunsigned.long_clong_cunsigned.long_A_cunsigned.long_A_rconst" >read_line_directive</a></span>(unsigned&#160;long <span class="variable">cursor</span>, long <span class="variable">line</span>, unsigned&#160;long&amp; <span class="variable">begin</span>, unsigned&#160;long&amp; <span class="variable">end</span>) <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mread_line_directive_lunsigned.long_clong_cunsigned.long_A_cunsigned.long_A_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line76" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>read a line directive starting at position pos, and return
the line number found.</p>
</div></div>
</div><!-- summary -->
<div class="summary">
<div class="heading">Private Data members Summary:</div>
<div class="item"><div class="synopsis">std::string <a class="name" id="my_filename">my_filename</a></div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mmy_filename" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line78" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"></div></div>
<div class="item"><div class="synopsis">std::string <a class="name" id="my_buffer">my_buffer</a></div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mmy_buffer" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line79" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"></div></div>
<div class="item"><div class="synopsis">unsigned&#160;long <a class="name" id="my_cursor">my_cursor</a></div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mmy_cursor" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line80" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"></div></div>
<div class="item"><div class="synopsis"><a href="Buffer.html#Replacements" >Replacements</a> <a class="name" id="my_replacements">my_replacements</a></div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mmy_replacements" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line81" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"></div></div>
</div><!-- summary -->
<!-- this part was generated by Inheritance -->
<!-- this part was generated by Detail -->
<div class="detail">
<div class="heading">Public Member functions Details:</div>
<div class="item"><div class="synopsis">&#160;unsigned&#160;long <a class="name" id="size_l_rconst">size</a>() <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_msize_l_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line28" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>return the size of the buffer</p>
</div></div>
<div class="item"><div class="synopsis">&#160;char <a class="name" id="get_l_r">get</a>()  </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mget_l_r" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line31" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>report the character at the current position and advance one character</p>
</div></div>
<div class="item"><div class="synopsis">&#160;void <a class="name" id="unget_l_r">unget</a>()  </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_munget_l_r" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line33" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>undo the last get</p>
</div></div>
<div class="item"><div class="synopsis">&#160;void <a class="name" id="reset_lunsigned.long_r">reset</a>(unsigned&#160;long <span class="variable">c</span> = <span class="value">0</span>)  </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mreset_lunsigned.long_r" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line35" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>reset the current position to position c</p>
</div></div>
<div class="item"><div class="synopsis">&#160;unsigned&#160;long <a class="name" id="position_l_rconst">position</a>() <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mposition_l_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line38" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>report the current position</p>
</div></div>
<div class="item"><div class="synopsis">&#160;char <a class="name" id="at_lunsigned.long_rconst">at</a>(unsigned&#160;long <span class="variable">p</span>) <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mat_lunsigned.long_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line40" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>report the character at position p</p>
</div></div>
<div class="item"><div class="synopsis">&#160;const&#160;char* <a class="name" id="ptr_lunsigned.long_rconst">ptr</a>(unsigned&#160;long <span class="variable">p</span> = <span class="value">0</span>) <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mptr_lunsigned.long_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line42" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>report the pointer at position p</p>
</div></div>
<div class="item"><div class="synopsis">&#160;void <a class="name" id="replace_lconst.char_S_cconst.char_S_cconst.char_S_cunsigned.long_r">replace</a>(const&#160;char* <span class="variable">from</span>, const&#160;char* <span class="variable">to</span>, const&#160;char* <span class="variable">begin</span>, unsigned&#160;long <span class="variable">length</span>)  </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mreplace_lconst.char_S_cconst.char_S_cconst.char_S_cunsigned.long_r" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line47" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>replace the text between from and to by the text between
begin and begin + length</p>
</div></div>
<div class="item"><div class="synopsis">&#160;unsigned&#160;long <a class="name" id="origin_lconst.char_S_cstd_mstring_A_rconst">origin</a>(const&#160;char*, std::string&amp;) <span class="keyword">const</span> </div> <div class="xref"></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line50" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>Return the origin of the given pointer (filename and line number)</p>
</div></div>
<div class="item"><div class="synopsis">&#160;void <a class="name" id="write_lstd_mostream_A_cconst.std_mstring_A_rconst">write</a>(std::ostream&amp;, const&#160;std::string&amp;) <span class="keyword">const</span> </div> <div class="xref"></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line54" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>Write the buffer into the given output stream
The first line contains a line directive issuing the input file name;
if filename is non-empty, use this to fake another one.</p>
</div></div>
</div><!-- detail -->
<div class="detail">
<div class="heading">Private Member functions Details:</div>
<div class="item"><div class="synopsis">&#160;long <a class="name" id="read_line_directive_lunsigned.long_clong_cunsigned.long_A_cunsigned.long_A_rconst">read_line_directive</a>(unsigned&#160;long <span class="variable">cursor</span>, long <span class="variable">line</span>, unsigned&#160;long&amp; <span class="variable">begin</span>, unsigned&#160;long&amp; <span class="variable">end</span>) <span class="keyword">const</span> </div> <div class="xref"><a href="../../XRef/xref0.html#Synopsis_mBuffer_mread_line_directive_lunsigned.long_clong_cunsigned.long_A_cunsigned.long_A_rconst" ><img src="../../xref.png" alt="references"/></a></div> <div class="source"><a href="../../Source/Synopsis/Buffer.hh.html#line76" ><img src="../../src-c++.png" alt="source code"/></a></div> <div class="doc"><p>read a line directive starting at position pos, and return
the line number found. Also report the begin and end of the filename
(with respect to the internal buffer).
line is the default line number that gets reported on error (in
which case begin and end remain unchanged)</p>
</div></div>
</div><!-- detail -->

<div class="logo">Generated on Thu Apr 16 16:27:33 2009 by 
<br/>
<a href="http://synopsis.fresco.org" target="_blank"><img src="../../synopsis.png" alt="logo"/> synopsis</a> (version devel)</div>
</body>
</html>