parallel/pico/CBuffer.cpp

00001 // -*- C++ -*-
00002 //
00003 //  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00004 //
00005 //                                   Fehmi Cirak
00006 //                        California Institute of Technology
00007 //                           (C) 2004 All Rights Reserved
00008 //
00009 //  <LicenseText>
00010 //
00011 //  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00012 //
00013 // EDITED BY MATT GALLOWAY FOR USE WITH DAPTA
00014 
00015 #include "DAPTA.hpp"
00016 #include "CBuffer.hpp"
00017 
00018 #include <algorithm>
00019 
00020 namespace DAPTA { // Define namespace DAPTA
00021 
00022 namespace pico { // Define namespace pico
00023 
00024 CBuffer::~CBuffer() {
00025     _buf.clear();
00026 }
00027 
00028 void CBuffer::copyToBuffer(const char * const start, const size_t& size){ 
00029     _buf.resize(size);  
00030     std::copy(start, start+size, _buf.begin());
00031 }
00032 
00033 void CBuffer::allocateBuffer(const size_t& size){
00034     _buf.resize(size);
00035 }
00036 
00037 } // namespace pico
00038 
00039 } // namespace DAPTA

Generated on Tue May 29 17:13:48 2007 for DAPTA by  doxygen 1.5.1