CircularBuffer.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 
00014 #ifndef CIRCULARBUFFER_H
00015 #define CIRCULARBUFFER_H
00016 
00017 #include "NTuple.h"
00018 
00019 namespace hippodraw {
00020 
00028 class MDL_HIPPOPLOT_API CircularBuffer : public NTuple
00029 {
00030 
00031  private:
00032 
00035   unsigned int m_capacity;
00036 
00039   unsigned int m_next_row;
00040 
00044   bool m_has_filled;
00045 
00048   CircularBuffer & operator= ( const CircularBuffer & rhs );
00049 
00054   void incrementRowIndex ();
00055 
00056  public:
00057 
00060   CircularBuffer ( const std::string & name );
00061 
00064   CircularBuffer ( const std::vector < std::string > & labels );
00065 
00069   CircularBuffer ( const CircularBuffer & nt);
00070 
00073   CircularBuffer ( unsigned int n );
00074 
00077   CircularBuffer ();
00078 
00081   virtual void clear();
00082   
00089   virtual void addRow ( const std::vector<double> & v );
00090 
00093   virtual void reserve ( unsigned int count );
00094 
00095 };
00096 
00097 } // namespace hippodraw
00098 
00099 #endif // CIRCULARBUFFER_H

Generated for HippoDraw Class Library by doxygen