iso::data::Buffer< DataType > Class Template Reference

#include <iso_data_buffer.h>

Collaboration diagram for iso::data::Buffer< DataType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Buffer ()
 create buffer
 Buffer (const math::Vector< unsigned int > &pSize, unsigned int pChannelCount, bool pNoData=false)
 create buffer
 Buffer (const math::Vector< unsigned int > &pSize, unsigned int pChannelCount, DataType pValue)
 create buffer
 Buffer (const Buffer< DataType > &pBuffer)
 copy constructor
 ~Buffer ()
 destructor
void reset (const math::Vector< unsigned int > &pSize, unsigned int pChannelCount)
 reset buffer to new size & channelcount
unsigned int dim () const
 return dimension
unsigned int channelCount () const
 return channelCount
const math::Vector< unsigned
int > & 
size () const
 return size
unsigned int dataCount () const
 return data count
DataType * data ()
 return bufer data
const DataType * data () const
 return bufer data
void set (DataType pValue)
 set all buffer data to same value
void set (unsigned int pChannel, DataType pValue)
 set all buffer data in specified channel to same value
base::String info () const
 print textual buffer information

Public Attributes

DataType * mData
 buffer data

Protected Attributes

unsigned int mDim
unsigned int mChannelCount
 dimension
math::Vector< unsigned int > mSize
 channel count
unsigned int mDataCount
 size

Static Protected Attributes

static int sChannelCount
 default channel count
static math::Vector< unsigned
int > 
sSize
 default size

Friends

std::ostream & operator<< (std::ostream &pOstream, const Buffer< DataType > &pBuffer)
 print buffer information

Detailed Description

template<typename DataType>
class iso::data::Buffer< DataType >

n-dimensional interleaved buffer

Created by Daniel Bisig on 12/4/07.


Constructor & Destructor Documentation

template<typename DataType>
iso::data::Buffer< DataType >::Buffer (  ) 

create buffer

template<typename DataType>
iso::data::Buffer< DataType >::Buffer ( const math::Vector< unsigned int > &  pSize,
unsigned int  pChannelCount,
bool  pNoData = false 
)

create buffer

Parameters:
pSize size of buffer
pChannelCount number of channels
pNoData buffer stores no data
if buffer contains data, all buffer data is set to zero

template<typename DataType>
iso::data::Buffer< DataType >::Buffer ( const math::Vector< unsigned int > &  pSize,
unsigned int  pChannelCount,
DataType  pValue 
)

create buffer

Parameters:
pSize size of buffer
pChannelCount number of channels
pValue value of buffer data
sets value of all array elements to pValue

template<typename DataType>
iso::data::Buffer< DataType >::Buffer ( const Buffer< DataType > &  pBuffer  ) 

copy constructor

Parameters:
pBuffer buffer

template<typename DataType>
iso::data::Buffer< DataType >::~Buffer (  ) 

destructor


Member Function Documentation

template<typename DataType>
void iso::data::Buffer< DataType >::reset ( const math::Vector< unsigned int > &  pSize,
unsigned int  pChannelCount 
)

reset buffer to new size & channelcount

Parameters:
pSize size
pChannelCount channel count

template<typename DataType>
unsigned int iso::data::Buffer< DataType >::dim (  )  const

return dimension

Returns:
dimension

template<typename DataType>
unsigned int iso::data::Buffer< DataType >::channelCount (  )  const

return channelCount

Returns:
channelCount

template<typename DataType>
const math::Vector< unsigned int > & iso::data::Buffer< DataType >::size (  )  const

return size

template<typename DataType>
unsigned int iso::data::Buffer< DataType >::dataCount (  )  const

return data count

Returns:
data count

template<typename DataType>
DataType * iso::data::Buffer< DataType >::data (  ) 

return bufer data

Returns:
buffer data

template<typename DataType>
const DataType * iso::data::Buffer< DataType >::data (  )  const

return bufer data

Returns:
buffer data

template<typename DataType>
void iso::data::Buffer< DataType >::set ( DataType  pValue  ) 

set all buffer data to same value

Parameters:
pValue value

template<typename DataType>
void iso::data::Buffer< DataType >::set ( unsigned int  pChannel,
DataType  pValue 
)

set all buffer data in specified channel to same value

Parameters:
pChannel channel
pValue value
Remarks:
fails if channel is out of bounds

template<typename DataType>
base::String iso::data::Buffer< DataType >::info (  )  const

print textual buffer information


Friends And Related Function Documentation

template<typename DataType>
std::ostream& operator<< ( std::ostream &  pOstream,
const Buffer< DataType > &  pBuffer 
) [friend]

print buffer information

Parameters:
pOstream output stream
pBuffer buffer


Member Data Documentation

template<typename DataType>
DataType* iso::data::Buffer< DataType >::mData

buffer data

template<typename DataType>
int iso::data::Buffer< DataType >::sChannelCount [static, protected]

default channel count

template<typename DataType>
math::Vector< unsigned int > iso::data::Buffer< DataType >::sSize [static, protected]

default size

template<typename DataType>
unsigned int iso::data::Buffer< DataType >::mDim [protected]

template<typename DataType>
unsigned int iso::data::Buffer< DataType >::mChannelCount [protected]

dimension

template<typename DataType>
math::Vector<unsigned int> iso::data::Buffer< DataType >::mSize [protected]

channel count

template<typename DataType>
unsigned int iso::data::Buffer< DataType >::mDataCount [protected]

size


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 13:57:33 2011 for iso_data by  doxygen 1.5.1