blob: 7548097e207a0b76f246e1aee105a7cf2aa88fc6 [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: decaf::nio::DoubleBuffer 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('classdecaf_1_1nio_1_1_double_buffer.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> </div>
<div class="headertitle">
<h1>decaf::nio::DoubleBuffer Class Reference</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="decaf::nio::DoubleBuffer" --><!-- doxytag: inherits="decaf::nio::Buffer,Comparable&lt; DoubleBuffer &gt;" -->
<p>This class defines four categories of operations upon double buffers:
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_double_buffer_8h_source.html">src/main/decaf/nio/DoubleBuffer.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for decaf::nio::DoubleBuffer:</div>
<div class="dyncontent">
<div class="center"><img src="classdecaf_1_1nio_1_1_double_buffer__inherit__graph.png" border="0" usemap="#decaf_1_1nio_1_1_double_buffer_inherit__map" alt="Inheritance graph"/></div>
<map name="decaf_1_1nio_1_1_double_buffer_inherit__map" id="decaf_1_1nio_1_1_double_buffer_inherit__map">
<area shape="rect" id="node7" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html" title="decaf::internal::nio::DoubleArrayBuffer" alt="" coords="59,160,341,189"/><area shape="rect" id="node2" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type." alt="" coords="5,5,147,35"/><area shape="rect" id="node4" href="classdecaf_1_1lang_1_1_comparable.html" title="decaf::lang::Comparable\&lt; DoubleBuffer \&gt;" alt="" coords="171,5,477,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<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">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a821e063159bf11d942d848e38fc53d0d">~DoubleBuffer</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#ac1a78875468e96da1d409ea806d3121c">toString</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#ab68828b6c2d51f09ead529bc27fcd771">array</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the double array that backs this buffer (optional operation). <a href="#ab68828b6c2d51f09ead529bc27fcd771"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a7c905151aace3f4ecfb8171206e6216d">arrayOffset</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the offset within this buffer's backing array of the first element of the buffer (optional operation). <a href="#a7c905151aace3f4ecfb8171206e6216d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a3935135e47b6c8897b873965a048dd08">asReadOnlyBuffer</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new, read-only double buffer that shares this buffer's content. <a href="#a3935135e47b6c8897b873965a048dd08"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#ae2383977fc726f1f0e44f1b818202e17">compact</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Compacts this buffer. <a href="#ae2383977fc726f1f0e44f1b818202e17"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#ab7c507400ea98dfffb5db4a0c2b84594">duplicate</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new double buffer that shares this buffer's content. <a href="#ab7c507400ea98dfffb5db4a0c2b84594"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#aa13556e04d714e71ed2111d143caf3ac">get</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Relative get method. <a href="#aa13556e04d714e71ed2111d143caf3ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#ae7a0ff34392cdee3cf3032e234263681">get</a> (int index) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Absolute get method. <a href="#ae7a0ff34392cdee3cf3032e234263681"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#afd46024a2a8c001735ab28842d690262">get</a> (std::vector&lt; double &gt; buffer)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Relative bulk get method. <a href="#afd46024a2a8c001735ab28842d690262"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a2c782f1a10f143427d6f5aa815079557">get</a> (double *buffer, int size, int offset, int length)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Relative bulk get method. <a href="#a2c782f1a10f143427d6f5aa815079557"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a4f754d2c5a67a525767c617faa81b654">hasArray</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells whether or not this buffer is backed by an accessible double array. <a href="#a4f754d2c5a67a525767c617faa81b654"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a9eafebbb980e839cfb601ed99f11d8f9">put</a> (<a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;src)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method transfers the doubles remaining in the given source buffer into this buffer. <a href="#a9eafebbb980e839cfb601ed99f11d8f9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a8fa6ba5b6c80c8260f60f464689efbe1">put</a> (const double *buffer, int size, int offset, int length)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method transfers doubles into this buffer from the given source array. <a href="#a8fa6ba5b6c80c8260f60f464689efbe1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a9a464d1711b6a6577d32cbc65a63ee9e">put</a> (std::vector&lt; double &gt; &amp;buffer)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method transfers the entire content of the given source doubles array into this buffer. <a href="#a9a464d1711b6a6577d32cbc65a63ee9e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#aeb8fe554f3c6cced5699225695395810">put</a> (double value)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the given doubles into this buffer at the current position, and then increments the position. <a href="#aeb8fe554f3c6cced5699225695395810"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#acf60952e5d6054ee6f44641447d9d0ba">put</a> (int index, double value)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the given doubles into this buffer at the given index. <a href="#acf60952e5d6054ee6f44641447d9d0ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#ab0659429c0d7b7dac3088c18e2ff8fd8">slice</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a> whose content is a shared subsequence of this buffer's content. <a href="#ab0659429c0d7b7dac3088c18e2ff8fd8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a134f548e6177c6f81e0cd98edda46f62">compareTo</a> (const <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;value) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"> <a href="#a134f548e6177c6f81e0cd98edda46f62"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a4544a74c192a7cb47f0e5e87c7f9316b">equals</a> (const <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;value) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"> <a href="#a4544a74c192a7cb47f0e5e87c7f9316b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a59a4867bfe9f65b11252eeb457b3b4f5">operator==</a> (const <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;value) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"> <a href="#a59a4867bfe9f65b11252eeb457b3b4f5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a4d151a72788e307e953156cbdfcd204b">operator&lt;</a> (const <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;value) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"> <a href="#a4d151a72788e307e953156cbdfcd204b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#af4624a4ba61d994712a721242e250dc8">allocate</a> (int capacity)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a new <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a>. <a href="#af4624a4ba61d994712a721242e250dc8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a308d1e1a96001cd6f453e827589ec1f4">wrap</a> (double *array, int size, int offset, int length)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Wraps the passed buffer with a new <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a>. <a href="#a308d1e1a96001cd6f453e827589ec1f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#acef056ab74950ca31e62c71e57c4d76d">wrap</a> (std::vector&lt; double &gt; &amp;buffer)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Wraps the passed STL double Vector in a <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a>. <a href="#acef056ab74950ca31e62c71e57c4d76d"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html#a659508dc379832ab99541fd2844c5f40">DoubleBuffer</a> (int capacity)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a> object that has its backing array allocated internally and is then owned and deleted when this object is deleted. <a href="#a659508dc379832ab99541fd2844c5f40"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This class defines four categories of operations upon double buffers: </p>
<p>o Absolute and relative get and put methods that read and write single doubles; o Relative bulk get methods that transfer contiguous sequences of doubles from this buffer into an array; and o Relative bulk put methods that transfer contiguous sequences of doubles from a double array or some other double buffer into this buffer o Methods for compacting, duplicating, and slicing a double buffer.</p>
<p>Double buffers can be created either by allocation, which allocates space for the buffer's content, by wrapping an existing double array into a buffer, or by creating a view of an existing byte buffer</p>
<p>Methods in this class that do not otherwise have a value to return are specified to return the buffer upon which they are invoked. This allows method invocations to be chained.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0 </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a659508dc379832ab99541fd2844c5f40"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::DoubleBuffer" ref="a659508dc379832ab99541fd2844c5f40" args="(int capacity)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">decaf::nio::DoubleBuffer::DoubleBuffer </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>capacity</em></td><td>)</td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a> object that has its backing array allocated internally and is then owned and deleted when this object is deleted. </p>
<p>The array is initially created with all elements initialized to zero.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">capacity</td><td>The size and limit of the <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a> in doubles</td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IllegalArguementException</td><td>if capacity is negative. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a821e063159bf11d942d848e38fc53d0d"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::~DoubleBuffer" ref="a821e063159bf11d942d848e38fc53d0d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual decaf::nio::DoubleBuffer::~DoubleBuffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af4624a4ba61d994712a721242e250dc8"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::allocate" ref="af4624a4ba61d994712a721242e250dc8" args="(int capacity)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>* decaf::nio::DoubleBuffer::allocate </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>capacity</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Allocates a new <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a>. </p>
<p>The new buffer's position will be zero, its limit will be its capacity, and its mark will be undefined. It will have a backing array, and its array offset will be zero.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">capacity</td><td>The size of the Double buffer in doubles.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a> that was allocated, caller owns.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IllegalArgumentException</td><td>is the capacity value is negative. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab68828b6c2d51f09ead529bc27fcd771"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::array" ref="ab68828b6c2d51f09ead529bc27fcd771" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual double* decaf::nio::DoubleBuffer::array </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the double array that backs this buffer (optional operation). </p>
<p>Modifications to this buffer's content will cause the returned array's content to be modified, and vice versa.</p>
<p>Invoke the hasArray method before invoking this method in order to ensure that this buffer has an accessible backing array.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the array that backs this <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a>.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_read_only_buffer_exception.html">ReadOnlyBufferException</a></td><td>if this <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a> is read only. </td></tr>
<tr><td class="paramname">UnsupportedOperationException</td><td>if the underlying store has no array. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a8263ff5f1a7c937d0da4f653eaf9f1e1">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="a7c905151aace3f4ecfb8171206e6216d"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::arrayOffset" ref="a7c905151aace3f4ecfb8171206e6216d" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual int decaf::nio::DoubleBuffer::arrayOffset </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the offset within this buffer's backing array of the first element of the buffer (optional operation). </p>
<p>Invoke the hasArray method before invoking this method in order to ensure that this buffer has an accessible backing array.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The offset into the backing array where index zero starts.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_read_only_buffer_exception.html">ReadOnlyBufferException</a></td><td>if this <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a> is read only. </td></tr>
<tr><td class="paramname">UnsupportedOperationException</td><td>if the underlying store has no array. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a83e245a70d156fecaad27e16c50d7d3f">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="a3935135e47b6c8897b873965a048dd08"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::asReadOnlyBuffer" ref="a3935135e47b6c8897b873965a048dd08" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>* decaf::nio::DoubleBuffer::asReadOnlyBuffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new, read-only double buffer that shares this buffer's content. </p>
<p>The content of the new buffer will be that of this buffer. Changes to this buffer's content will be visible in the new buffer; the new buffer itself, however, will be read-only and will not allow the shared content to be modified. The two buffers' position, limit, and mark values will be independent.</p>
<p>If this buffer is itself read-only then this method behaves in exactly the same way as the duplicate method.</p>
<p>The new buffer's capacity, limit, position, and mark values will be identical to those of this buffer.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The new, read-only double buffer which the caller then owns. </dd></dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a3cbd7211ecbc8a7605469e6079309a21">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="ae2383977fc726f1f0e44f1b818202e17"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::compact" ref="ae2383977fc726f1f0e44f1b818202e17" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>&amp; decaf::nio::DoubleBuffer::compact </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Compacts this buffer. </p>
<p>The bytes between the buffer's current position and its limit, if any, are copied to the beginning of the buffer. That is, the byte at index p = <a class="el" href="classdecaf_1_1nio_1_1_buffer.html#ac3f3a9b58ba3c2986e0c7b3752b52c15">position()</a> is copied to index zero, the byte at index p + 1 is copied to index one, and so forth until the byte at index <a class="el" href="classdecaf_1_1nio_1_1_buffer.html#a7517c02b4d27d040c44f970c307bf5b3">limit()</a> - 1 is copied to index n = <a class="el" href="classdecaf_1_1nio_1_1_buffer.html#a7517c02b4d27d040c44f970c307bf5b3">limit()</a> - 1 - p. The buffer's position is then set to n+1 and its limit is set to its capacity. The mark, if defined, is discarded.</p>
<p>The buffer's position is set to the number of bytes copied, rather than to zero, so that an invocation of this method can be followed immediately by an invocation of another relative put method.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a reference to this <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a>.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_read_only_buffer_exception.html">ReadOnlyBufferException</a></td><td>if this buffer is read-only. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a07cf11ffde6056eb897318609d0d485c">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="a134f548e6177c6f81e0cd98edda46f62"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::compareTo" ref="a134f548e6177c6f81e0cd98edda46f62" args="(const DoubleBuffer &amp;value) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual int decaf::nio::DoubleBuffer::compareTo </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p></p>
</div>
</div>
<a class="anchor" id="ab7c507400ea98dfffb5db4a0c2b84594"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::duplicate" ref="ab7c507400ea98dfffb5db4a0c2b84594" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>* decaf::nio::DoubleBuffer::duplicate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new double buffer that shares this buffer's content. </p>
<p>The content of the new buffer will be that of this buffer. Changes to this buffer's content will be visible in the new buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.</p>
<p>The new buffer's capacity, limit, position, and mark values will be identical to those of this buffer. The new buffer will be read-only if, and only if, this buffer is read-only.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a new double <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a> which the caller owns. </dd></dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a70ba29f560a4a1b0a482e10b08580655">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="a4544a74c192a7cb47f0e5e87c7f9316b"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::equals" ref="a4544a74c192a7cb47f0e5e87c7f9316b" args="(const DoubleBuffer &amp;value) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool decaf::nio::DoubleBuffer::equals </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p></p>
</div>
</div>
<a class="anchor" id="afd46024a2a8c001735ab28842d690262"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::get" ref="afd46024a2a8c001735ab28842d690262" args="(std::vector&lt; double &gt; buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>&amp; decaf::nio::DoubleBuffer::get </td>
<td>(</td>
<td class="paramtype">std::vector&lt; double &gt;&#160;</td>
<td class="paramname"><em>buffer</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Relative bulk get method. </p>
<p>This method transfers values from this buffer into the given destination vector. An invocation of this method of the form src.get(a) behaves in exactly the same way as the invocation. The vector must be sized to the amount of data that is to be read, that is to say, the caller should call buffer.resize( N ) before calling this get method.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a reference to this <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a>.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_buffer_underflow_exception.html">BufferUnderflowException</a></td><td>iIf there are fewer than length doubles remaining in this buffer </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ae7a0ff34392cdee3cf3032e234263681"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::get" ref="ae7a0ff34392cdee3cf3032e234263681" args="(int index) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual double decaf::nio::DoubleBuffer::get </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>index</em></td><td>)</td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Absolute get method. </p>
<p>Reads the value at the given index.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">index</td><td>The index in the <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a> where the double is to be read.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the double that is located at the given index.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IndexOutOfBoundsException</td><td>if index is not smaller than the buffer's limit </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a7c264fe41cdc5bcf2efdd7657531f9e5">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="a2c782f1a10f143427d6f5aa815079557"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::get" ref="a2c782f1a10f143427d6f5aa815079557" args="(double *buffer, int size, int offset, int length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>&amp; decaf::nio::DoubleBuffer::get </td>
<td>(</td>
<td class="paramtype">double *&#160;</td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Relative bulk get method. </p>
<p>This method transfers doubles from this buffer into the given destination array. If there are fewer doubles remaining in the buffer than are required to satisfy the request, that is, if length &gt; <a class="el" href="classdecaf_1_1nio_1_1_buffer.html#a21cd75b27abc500af892a4078083c10e" title="Returns the number of elements between the current position and the limit.">remaining()</a>, then no bytes are transferred and a <a class="el" href="classdecaf_1_1nio_1_1_buffer_underflow_exception.html">BufferUnderflowException</a> is thrown.</p>
<p>Otherwise, this method copies length doubles from this buffer into the given array, starting at the current position of this buffer and at the given offset in the array. The position of this buffer is then incremented by length.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">buffer</td><td>The pointer to an allocated buffer to fill. </td></tr>
<tr><td class="paramname">size</td><td>The size of the buffer passed. </td></tr>
<tr><td class="paramname">offset</td><td>The position in the buffer to start filling. </td></tr>
<tr><td class="paramname">length</td><td>The amount of data to put in the passed buffer.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a reference to this <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a>.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_buffer_underflow_exception.html">BufferUnderflowException</a></td><td>if there are fewer than length doubles remaining in this buffer </td></tr>
<tr><td class="paramname">NullPointerException</td><td>if the passed buffer is null. </td></tr>
<tr><td class="paramname">IndexOutOfBoundsException</td><td>if the preconditions of size, offset, or length are not met. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aa13556e04d714e71ed2111d143caf3ac"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::get" ref="aa13556e04d714e71ed2111d143caf3ac" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual double decaf::nio::DoubleBuffer::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Relative get method. </p>
<p>Reads the value at this buffer's current position, and then increments the position.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the double at the current position.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_buffer_underflow_exception.html">BufferUnderflowException</a></td><td>if there no more data to return. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a6f49b94642eb43a1da60ad6091008e8d">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="a4f754d2c5a67a525767c617faa81b654"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::hasArray" ref="a4f754d2c5a67a525767c617faa81b654" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool decaf::nio::DoubleBuffer::hasArray </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Tells whether or not this buffer is backed by an accessible double array. </p>
<p>If this method returns true then the array and arrayOffset methods may safely be invoked. Subclasses should override this method if they do not have a backing array as this class always returns true.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if, and only if, this buffer is backed by an array and is not read-only </dd></dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a7a1ee6726661141d1efc966da5640d89">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="a4d151a72788e307e953156cbdfcd204b"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::operator&lt;" ref="a4d151a72788e307e953156cbdfcd204b" args="(const DoubleBuffer &amp;value) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool decaf::nio::DoubleBuffer::operator&lt; </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p></p>
</div>
</div>
<a class="anchor" id="a59a4867bfe9f65b11252eeb457b3b4f5"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::operator==" ref="a59a4867bfe9f65b11252eeb457b3b4f5" args="(const DoubleBuffer &amp;value) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool decaf::nio::DoubleBuffer::operator== </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p></p>
</div>
</div>
<a class="anchor" id="aeb8fe554f3c6cced5699225695395810"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::put" ref="aeb8fe554f3c6cced5699225695395810" args="(double value)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>&amp; decaf::nio::DoubleBuffer::put </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes the given doubles into this buffer at the current position, and then increments the position. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value</td><td>The doubles value to be written.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a reference to this buffer.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_buffer_overflow_exception.html">BufferOverflowException</a></td><td>if this buffer's current position is not smaller than its limit. </td></tr>
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_read_only_buffer_exception.html">ReadOnlyBufferException</a></td><td>if this buffer is read-only. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#aafe46d5ec20db8b700401e8a90d0eb9b">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="acf60952e5d6054ee6f44641447d9d0ba"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::put" ref="acf60952e5d6054ee6f44641447d9d0ba" args="(int index, double value)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>&amp; decaf::nio::DoubleBuffer::put </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes the given doubles into this buffer at the given index. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">index</td><td>The position in the <a class="el" href="classdecaf_1_1nio_1_1_buffer.html" title="A container for data of a specific primitive type.">Buffer</a> to write the data. </td></tr>
<tr><td class="paramname">value</td><td>The doubles to write.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a reference to this buffer</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">IndexOutOfBoundsException</td><td>if index greater than the buffer's limit minus the size of the type being written, or the index is negative. </td></tr>
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_read_only_buffer_exception.html">ReadOnlyBufferException</a></td><td>if this buffer is read-only. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#a08c524bc1192fba11ac4b09df6125131">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="a8fa6ba5b6c80c8260f60f464689efbe1"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::put" ref="a8fa6ba5b6c80c8260f60f464689efbe1" args="(const double *buffer, int size, int offset, int length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>&amp; decaf::nio::DoubleBuffer::put </td>
<td>(</td>
<td class="paramtype">const double *&#160;</td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This method transfers doubles into this buffer from the given source array. </p>
<p>If there are more doubles to be copied from the array than remain in this buffer, that is, if length &gt; <a class="el" href="classdecaf_1_1nio_1_1_buffer.html#a21cd75b27abc500af892a4078083c10e" title="Returns the number of elements between the current position and the limit.">remaining()</a>, then no doubles are transferred and a <a class="el" href="classdecaf_1_1nio_1_1_buffer_overflow_exception.html">BufferOverflowException</a> is thrown.</p>
<p>Otherwise, this method copies length bytes from the given array into this buffer, starting at the given offset in the array and at the current position of this buffer. The position of this buffer is then incremented by length.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">buffer</td><td>The array from which doubles are to be read. </td></tr>
<tr><td class="paramname">size</td><td>The size of the buffer passed. </td></tr>
<tr><td class="paramname">offset</td><td>The offset within the array of the first char to be read. </td></tr>
<tr><td class="paramname">length</td><td>The number of doubles to be read from the given array.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a reference to this buffer.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_buffer_overflow_exception.html">BufferOverflowException</a></td><td>if there is insufficient space in this buffer </td></tr>
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_read_only_buffer_exception.html">ReadOnlyBufferException</a></td><td>if this buffer is read-only </td></tr>
<tr><td class="paramname">NullPointerException</td><td>if the passed buffer is null. </td></tr>
<tr><td class="paramname">IndexOutOfBoundsException</td><td>if the preconditions of size, offset, or length are not met. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a9a464d1711b6a6577d32cbc65a63ee9e"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::put" ref="a9a464d1711b6a6577d32cbc65a63ee9e" args="(std::vector&lt; double &gt; &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>&amp; decaf::nio::DoubleBuffer::put </td>
<td>(</td>
<td class="paramtype">std::vector&lt; double &gt; &amp;&#160;</td>
<td class="paramname"><em>buffer</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This method transfers the entire content of the given source doubles array into this buffer. </p>
<p>This is the same as calling put( &amp;buffer[0], 0, buffer.size().</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">buffer</td><td>The buffer whose contents are copied to this <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a reference to this buffer.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_buffer_overflow_exception.html">BufferOverflowException</a></td><td>if there is insufficient space in this buffer. </td></tr>
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_read_only_buffer_exception.html">ReadOnlyBufferException</a></td><td>if this buffer is read-only. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a9eafebbb980e839cfb601ed99f11d8f9"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::put" ref="a9eafebbb980e839cfb601ed99f11d8f9" args="(DoubleBuffer &amp;src)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>&amp; decaf::nio::DoubleBuffer::put </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>src</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This method transfers the doubles remaining in the given source buffer into this buffer. </p>
<p>If there are more doubles remaining in the source buffer than in this buffer, that is, if src.remaining() &gt; <a class="el" href="classdecaf_1_1nio_1_1_buffer.html#a21cd75b27abc500af892a4078083c10e" title="Returns the number of elements between the current position and the limit.">remaining()</a>, then no doubles are transferred and a <a class="el" href="classdecaf_1_1nio_1_1_buffer_overflow_exception.html">BufferOverflowException</a> is thrown.</p>
<p>Otherwise, this method copies n = src.remaining() doubles from the given buffer into this buffer, starting at each buffer's current position. The positions of both buffers are then incremented by n.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">src</td><td>The buffer to take doubles from an place in this one.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a reference to this buffer.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_buffer_overflow_exception.html">BufferOverflowException</a></td><td>if there is insufficient space in this buffer for the remaining doubles in the source buffer </td></tr>
<tr><td class="paramname">IllegalArgumentException</td><td>if the source buffer is this buffer. </td></tr>
<tr><td class="paramname"><a class="el" href="classdecaf_1_1nio_1_1_read_only_buffer_exception.html">ReadOnlyBufferException</a></td><td>if this buffer is read-only. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab0659429c0d7b7dac3088c18e2ff8fd8"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::slice" ref="ab0659429c0d7b7dac3088c18e2ff8fd8" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>* decaf::nio::DoubleBuffer::slice </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a> whose content is a shared subsequence of this buffer's content. </p>
<p>The content of the new buffer will start at this buffer's current position. Changes to this buffer's content will be visible in the new buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.</p>
<p>The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer, and its mark will be undefined. The new buffer will be read-only if, and only if, this buffer is read-only.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly create <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a> which the caller owns. </dd></dl>
<p>Implemented in <a class="el" href="classdecaf_1_1internal_1_1nio_1_1_double_array_buffer.html#ab20500060fe93f747a81ec3981e32eaf">decaf::internal::nio::DoubleArrayBuffer</a>.</p>
</div>
</div>
<a class="anchor" id="ac1a78875468e96da1d409ea806d3121c"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::toString" ref="ac1a78875468e96da1d409ea806d3121c" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual std::string decaf::nio::DoubleBuffer::toString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>a std::string describing this object </dd></dl>
</div>
</div>
<a class="anchor" id="a308d1e1a96001cd6f453e827589ec1f4"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::wrap" ref="a308d1e1a96001cd6f453e827589ec1f4" args="(double *array, int size, int offset, int length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>* decaf::nio::DoubleBuffer::wrap </td>
<td>(</td>
<td class="paramtype">double *&#160;</td>
<td class="paramname"><em>array</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Wraps the passed buffer with a new <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a>. </p>
<p>The new buffer will be backed by the given double array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">array</td><td>The array that will back the new buffer. </td></tr>
<tr><td class="paramname">size</td><td>The size of the passed in array. </td></tr>
<tr><td class="paramname">offset</td><td>The offset of the subarray to be used. </td></tr>
<tr><td class="paramname">length</td><td>The length of the subarray to be used.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a new <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a> that is backed by buffer, caller owns.</dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">NullPointerException</td><td>if the array pointer is NULL. </td></tr>
<tr><td class="paramname">IndexOutOfBoundsException</td><td>if the preconditions of size, offset, or length are not met. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="acef056ab74950ca31e62c71e57c4d76d"></a><!-- doxytag: member="decaf::nio::DoubleBuffer::wrap" ref="acef056ab74950ca31e62c71e57c4d76d" args="(std::vector&lt; double &gt; &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</a>* decaf::nio::DoubleBuffer::wrap </td>
<td>(</td>
<td class="paramtype">std::vector&lt; double &gt; &amp;&#160;</td>
<td class="paramname"><em>buffer</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Wraps the passed STL double Vector in a <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a>. </p>
<p>The new buffer will be backed by the given double array; modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be buffer.size(), its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">buffer</td><td>The vector that will back the new buffer, the vector must have been sized to the desired size already by calling vector.resize( N ).</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a new <a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html" title="This class defines four categories of operations upon double buffers:">DoubleBuffer</a> that is backed by buffer, caller owns. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/main/decaf/nio/<a class="el" href="_double_buffer_8h_source.html">DoubleBuffer.h</a></li>
</ul>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacedecaf.html">decaf</a> </li>
<li class="navelem"><a class="el" href="namespacedecaf_1_1nio.html">nio</a> </li>
<li class="navelem"><a class="el" href="classdecaf_1_1nio_1_1_double_buffer.html">DoubleBuffer</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>