Changeset 20969

Show
Ignore:
Timestamp:
12/30/07 09:34:57 (9 months ago)
Author:
patrick
Message:

Use boost::noncopyable to simplify the implementation of gadget::SampleBuffer?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/gadgeteer/gadget/Type/SampleBuffer.h

    r20968 r20969  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 #ifndef _SAMPLE_BUFFER_H_ 
    28 #define _SAMPLE_BUFFER_H_ 
    29  
     27#ifndef _GADGET_SAMPLE_BUFFER_H_ 
     28#define _GADGET_SAMPLE_BUFFER_H_ 
    3029 
    3130#include <gadget/gadgetConfig.h> 
     31 
     32#include <vector> 
     33#include <boost/noncopyable.hpp> 
    3234 
    3335#include <vpr/Util/Assert.h> 
    3436#include <vpr/Sync/Guard.h> 
    3537#include <vpr/Sync/Mutex.h> 
    36 #include <vector> 
     38 
    3739 
    3840namespace gadget 
     
    6062 */ 
    6163template <class DATA_TYPE, unsigned MAX_BUFFER_SIZE=5000> 
    62 class SampleBuffer 
     64class SampleBuffer : private boost::noncopyable 
    6365{ 
    6466public: 
     
    127129 
    128130protected: 
    129    // vpr::Mutex is not copyable, so neither are we. 
    130    SampleBuffer(const SampleBuffer& b) {;} 
    131    void operator=(const SampleBuffer& b) {;} 
    132  
    133131   buffer_t   mStableBuffer; 
    134132   buffer_t   mReadyBuffer;