<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>HippoDraw Class Library</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="hippoApp.ico"> </head><body> <!-- Generated by Doxygen 1.6.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_81660c05fb6bfb5c6c7ef0fee605ba15.html">datasrcs</a> </div> </div> <div class="contents"> <h1>CircularBuffer.h</h1><a href="CircularBuffer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c++ -*- */</span> <a name="l00002"></a>00002 <a name="l00014"></a>00014 <span class="preprocessor">#ifndef CIRCULARBUFFER_H</span> <a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define CIRCULARBUFFER_H</span> <a name="l00016"></a>00016 <span class="preprocessor"></span> <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="NTuple_8h.html" title="hippodraw::NTuple class interface.">NTuple.h</a>"</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="keyword">namespace </span>hippodraw { <a name="l00020"></a>00020 <a name="l00028"></a><a class="code" href="classhippodraw_1_1CircularBuffer.html">00028</a> <span class="keyword">class </span><a class="code" href="libhippo_8h.html#a480024fd54849c743866874550153711">MDL_HIPPOPLOT_API</a> <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> : <span class="keyword">public</span> <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> <a name="l00029"></a>00029 { <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="keyword">private</span>: <a name="l00032"></a>00032 <a name="l00035"></a><a class="code" href="classhippodraw_1_1CircularBuffer.html#a66029418ac04136dd4431f15527ed03f">00035</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_capacity; <a name="l00036"></a>00036 <a name="l00039"></a><a class="code" href="classhippodraw_1_1CircularBuffer.html#ab0f3f4daf0d838a61ddc4a8c28a63b77">00039</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_next_row; <a name="l00040"></a>00040 <a name="l00044"></a><a class="code" href="classhippodraw_1_1CircularBuffer.html#a8a69ed56adb8d51220481d0b6e839c8d">00044</a> <span class="keywordtype">bool</span> m_has_filled; <a name="l00045"></a>00045 <a name="l00048"></a>00048 <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> & operator= ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> & rhs ); <a name="l00049"></a>00049 <a name="l00054"></a>00054 <span class="keywordtype">void</span> incrementRowIndex (); <a name="l00055"></a>00055 <a name="l00056"></a>00056 <span class="keyword">public</span>: <a name="l00057"></a>00057 <a name="l00060"></a>00060 <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> ( <span class="keyword">const</span> std::string & name ); <a name="l00061"></a>00061 <a name="l00064"></a>00064 <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> ( <span class="keyword">const</span> std::vector < std::string > & labels ); <a name="l00065"></a>00065 <a name="l00069"></a>00069 <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> & nt); <a name="l00070"></a>00070 <a name="l00073"></a>00073 <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n ); <a name="l00074"></a>00074 <a name="l00077"></a>00077 <a class="code" href="classhippodraw_1_1CircularBuffer.html" title="CircularBuffer manager.">CircularBuffer</a> (); <a name="l00078"></a>00078 <a name="l00081"></a>00081 <span class="keyword">virtual</span> <span class="keywordtype">void</span> clear(); <a name="l00082"></a>00082 <a name="l00089"></a>00089 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addRow ( <span class="keyword">const</span> std::vector<double> & v ); <a name="l00090"></a>00090 <a name="l00093"></a>00093 <span class="keyword">virtual</span> <span class="keywordtype">void</span> reserve ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> count ); <a name="l00094"></a>00094 <a name="l00095"></a>00095 }; <a name="l00096"></a>00096 <a name="l00097"></a>00097 } <span class="comment">// namespace hippodraw</span> <a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="preprocessor">#endif // CIRCULARBUFFER_H</span> </pre></div></div> <hr size="1"><address style="align: right;"><small> Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0> </a> </small></address> </body> </html>