blob: b8bf4606a01de3812843e9889bf624a6671832b7 [file] [log] [blame]
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>activemq-cpp-3.4.0: activemq::wireformat::openwire::utils::BooleanStream Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">activemq-cpp-3.4.0</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<h1>activemq::wireformat::openwire::utils::BooleanStream Class Reference</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="activemq::wireformat::openwire::utils::BooleanStream" -->
<p>Manages the writing and reading of boolean data streams to and from a data source such as a DataInputStream or DataOutputStream.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_boolean_stream_8h_source.html">src/main/activemq/wireformat/openwire/utils/BooleanStream.h</a>&gt;</code></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#a89db8a14a87f92626943069ded8cab87">BooleanStream</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#a51ad82799ac096acc861135e98203170">~BooleanStream</a> () throw ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#a07dbebc44f4808d60c124738286a0195">readBoolean</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a boolean data element from the internal data buffer. <a href="#a07dbebc44f4808d60c124738286a0195"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#a0552ff61615fe5a1168879a5449a406b">writeBoolean</a> (bool value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes a Boolean value to the internal data buffer. <a href="#a0552ff61615fe5a1168879a5449a406b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#aa49fbe2b06c85158a668dd63dc3dc72e">marshal</a> (<a class="el" href="classdecaf_1_1io_1_1_data_output_stream.html">decaf::io::DataOutputStream</a> *dataOut)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Marshal the data to a DataOutputStream. <a href="#aa49fbe2b06c85158a668dd63dc3dc72e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#af14c1287ed5a6be6358175b1892c3a63">marshal</a> (std::vector&lt; unsigned char &gt; &amp;dataOut)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Marshal the data to a STL vector of unsigned chars. <a href="#af14c1287ed5a6be6358175b1892c3a63"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#a60826195fdd6e4f252f6eb3fc46aa329">unmarshal</a> (<a class="el" href="classdecaf_1_1io_1_1_data_input_stream.html">decaf::io::DataInputStream</a> *dataIn)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Unmarshal a Boolean data stream from the Input Stream. <a href="#a60826195fdd6e4f252f6eb3fc46aa329"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#a0389ea8707a256b8e936dc93e60bb5b6">clear</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears to old position markers, data starts at the beginning. <a href="#a0389ea8707a256b8e936dc93e60bb5b6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html#ad9af395b7f413b2c6260e47f5344646f">marshalledSize</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Calc the size that data is marshalled to. <a href="#ad9af395b7f413b2c6260e47f5344646f"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Manages the writing and reading of boolean data streams to and from a data source such as a DataInputStream or DataOutputStream. </p>
<p>The booleans are stored as single bits in the stream, with the stream size pre-pended to the stream when the data is marshalled.</p>
<p>The serialized form of the size field can be between 1 and 3 bytes. If the number of used bytes &lt; 64, size=1 byte If the number of used bytes &gt;=64 and &lt; 256 (size of an unsigned byte), size=2 bytes If the number of used bytes &gt;=256, size=3 bytes</p>
<p>The high-order 2 bits (128 and 64) of the first byte of the size field are used to encode the information about the number of bytes in the size field. The only time the first byte will contain a value &gt;=64 is if there are more bytes in the size field. If the first byte &lt; 64, the value of the byte is simply the size value. If the first byte = 0xC0, the following unsigned byte is the size field. If the first byte = 0x80, the following short (two bytes) are the size field. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a89db8a14a87f92626943069ded8cab87"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::BooleanStream" ref="a89db8a14a87f92626943069ded8cab87" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">activemq::wireformat::openwire::utils::BooleanStream::BooleanStream </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a51ad82799ac096acc861135e98203170"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::~BooleanStream" ref="a51ad82799ac096acc861135e98203170" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual activemq::wireformat::openwire::utils::BooleanStream::~BooleanStream </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> throw ()<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0389ea8707a256b8e936dc93e60bb5b6"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::clear" ref="a0389ea8707a256b8e936dc93e60bb5b6" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void activemq::wireformat::openwire::utils::BooleanStream::clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Clears to old position markers, data starts at the beginning. </p>
</div>
</div>
<a class="anchor" id="af14c1287ed5a6be6358175b1892c3a63"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::marshal" ref="af14c1287ed5a6be6358175b1892c3a63" args="(std::vector&lt; unsigned char &gt; &amp;dataOut)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void activemq::wireformat::openwire::utils::BooleanStream::marshal </td>
<td>(</td>
<td class="paramtype">std::vector&lt; unsigned char &gt; &amp;&#160;</td>
<td class="paramname"><em>dataOut</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Marshal the data to a STL vector of unsigned chars. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dataOut</td><td>- reference to a vector to write the data to.</td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IOException</td><td>if an I/O error occurs during this operation. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aa49fbe2b06c85158a668dd63dc3dc72e"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::marshal" ref="aa49fbe2b06c85158a668dd63dc3dc72e" args="(decaf::io::DataOutputStream *dataOut)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void activemq::wireformat::openwire::utils::BooleanStream::marshal </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classdecaf_1_1io_1_1_data_output_stream.html">decaf::io::DataOutputStream</a> *&#160;</td>
<td class="paramname"><em>dataOut</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Marshal the data to a DataOutputStream. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dataOut</td><td>- Stream to write the data to.</td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IOException</td><td>if an I/O error occurs during this operation. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad9af395b7f413b2c6260e47f5344646f"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::marshalledSize" ref="ad9af395b7f413b2c6260e47f5344646f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int activemq::wireformat::openwire::utils::BooleanStream::marshalledSize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Calc the size that data is marshalled to. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>int size of marshalled data. </dd></dl>
</div>
</div>
<a class="anchor" id="a07dbebc44f4808d60c124738286a0195"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::readBoolean" ref="a07dbebc44f4808d60c124738286a0195" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool activemq::wireformat::openwire::utils::BooleanStream::readBoolean </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read a boolean data element from the internal data buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>boolean from the stream</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IOException</td><td>if an I/O error occurs during this operation. </td></tr>
</table>
</dd>
</dl>
<p>Referenced by <a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1marshal_1_1_base_data_stream_marshaller.html#a073152c012d33ef260e0222f3df251af">activemq::wireformat::openwire::marshal::BaseDataStreamMarshaller::tightMarshalObjectArray2()</a>.</p>
</div>
</div>
<a class="anchor" id="a60826195fdd6e4f252f6eb3fc46aa329"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::unmarshal" ref="a60826195fdd6e4f252f6eb3fc46aa329" args="(decaf::io::DataInputStream *dataIn)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void activemq::wireformat::openwire::utils::BooleanStream::unmarshal </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classdecaf_1_1io_1_1_data_input_stream.html">decaf::io::DataInputStream</a> *&#160;</td>
<td class="paramname"><em>dataIn</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Unmarshal a Boolean data stream from the Input Stream. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dataIn</td><td>- Input Stream to read data from.</td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IOException</td><td>if an I/O error occurs during this operation. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a0552ff61615fe5a1168879a5449a406b"></a><!-- doxytag: member="activemq::wireformat::openwire::utils::BooleanStream::writeBoolean" ref="a0552ff61615fe5a1168879a5449a406b" args="(bool value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void activemq::wireformat::openwire::utils::BooleanStream::writeBoolean </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes a Boolean value to the internal data buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value</td><td>- boolean data to write.</td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IOException</td><td>if an I/O error occurs during this operation. </td></tr>
</table>
</dd>
</dl>
<p>Referenced by <a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1marshal_1_1_base_data_stream_marshaller.html#a1952572627907bce4afbe0fef677ebe7">activemq::wireformat::openwire::marshal::BaseDataStreamMarshaller::tightMarshalObjectArray1()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/main/activemq/wireformat/openwire/utils/<a class="el" href="_boolean_stream_8h_source.html">BooleanStream.h</a></li>
</ul>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceactivemq.html">activemq</a> </li>
<li class="navelem"><a class="el" href="namespaceactivemq_1_1wireformat.html">wireformat</a> </li>
<li class="navelem"><a class="el" href="namespaceactivemq_1_1wireformat_1_1openwire.html">openwire</a> </li>
<li class="navelem"><a class="el" href="namespaceactivemq_1_1wireformat_1_1openwire_1_1utils.html">utils</a> </li>
<li class="navelem"><a class="el" href="classactivemq_1_1wireformat_1_1openwire_1_1utils_1_1_boolean_stream.html">BooleanStream</a> </li>
<li class="footer">Generated on Mon Apr 25 2011 for activemq-cpp-3.4.0 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
</body>
</html>