Mercator
Buffer_impl.h
00001 // This file may be redistributed and modified only under the terms of
00002 // the GNU General Public License (See COPYING for details).
00003 // Copyright (C) 2003 Alistair Riddoch
00004 
00005 #include <Mercator/Buffer.h>
00006 
00007 #include <Mercator/Segment.h>
00008 
00009 namespace Mercator {
00010 
00011 template <typename DataType>
00012 Buffer<DataType>::Buffer(const Segment & segment, unsigned int channels) :
00013          m_segment(segment), m_channels(channels), m_size(segment.getSize()),
00014          m_data(0)
00015 {
00016 }
00017 
00018 template <typename DataType>
00019 Buffer<DataType>::~Buffer()
00020 {
00021     if (m_data != 0) {
00022         delete [] m_data;
00023     }
00024 }
00025 
00026 } // namespace Mercator