a template class to store a 2D array of m_data More...
#include <MWAWPictBitmap.hxx>
Public Member Functions | |
| MWAWPictBitmapContainer (MWAWVec2i const &sz) | |
| constructor given size | |
| virtual | ~MWAWPictBitmapContainer () |
| destructor | |
| bool | ok () const |
| returns ok, if the m_data is allocated | |
| int | cmp (MWAWPictBitmapContainer< T > const &orig) const |
| a comparison operator | |
| MWAWVec2i const & | size () const |
| return the array size | |
| int | numRows () const |
| gets the number of row | |
| int | numColumns () const |
| gets the number of column | |
| T const & | get (int i, int j) const |
| accessor of a cell m_data | |
| T const * | getRow (int j) const |
| accessor of a row m_data | |
| void | set (int i, int j, T const &v) |
| sets a cell m_data | |
| template<class U > | |
| void | setRow (int j, U const *val) |
| sets a line of m_data | |
| template<class U > | |
| void | setColumn (int i, U const *val) |
| sets a column of m_data | |
Protected Attributes | |
| MWAWVec2i | m_size |
| the size | |
| T * | m_data |
| the m_data placed by row ie. d_00, d_10, ... , d_{X-1}0, .. | |
Private Member Functions | |
| MWAWPictBitmapContainer (MWAWPictBitmapContainer const &orig) | |
| MWAWPictBitmapContainer & | operator= (MWAWPictBitmapContainer const &orig) |
a template class to store a 2D array of m_data
| MWAWPictBitmapContainer< T >::MWAWPictBitmapContainer | ( | MWAWVec2i const & | sz | ) | [inline] |
constructor given size
| virtual MWAWPictBitmapContainer< T >::~MWAWPictBitmapContainer | ( | ) | [inline, virtual] |
destructor
| MWAWPictBitmapContainer< T >::MWAWPictBitmapContainer | ( | MWAWPictBitmapContainer< T > const & | orig | ) | [private] |
| int MWAWPictBitmapContainer< T >::cmp | ( | MWAWPictBitmapContainer< T > const & | orig | ) | const [inline] |
a comparison operator
Referenced by MWAWPictBitmapIndexed::cmp(), and MWAWPictBitmapColor::cmp().
| T const& MWAWPictBitmapContainer< T >::get | ( | int | i, |
| int | j | ||
| ) | const [inline] |
accessor of a cell m_data
Referenced by MWAWPictBitmapBW::get(), MWAWPictBitmapIndexed::get(), and MWAWPictBitmapColor::get().
| T const* MWAWPictBitmapContainer< T >::getRow | ( | int | j | ) | const [inline] |
accessor of a row m_data
Referenced by MWAWPictBitmapInternal::getBMPData(), getPBMData(), getPPMData(), MWAWPictBitmapInternal::getPPMData(), MWAWPictBitmapBW::getRow(), MWAWPictBitmapIndexed::getRow(), and MWAWPictBitmapColor::getRow().
| int MWAWPictBitmapContainer< T >::numColumns | ( | ) | const [inline] |
gets the number of column
Referenced by MWAWPictBitmapBW::numColumns(), MWAWPictBitmapIndexed::numColumns(), and MWAWPictBitmapColor::numColumns().
| int MWAWPictBitmapContainer< T >::numRows | ( | ) | const [inline] |
gets the number of row
Referenced by MWAWPictBitmapBW::numRows(), MWAWPictBitmapIndexed::numRows(), and MWAWPictBitmapColor::numRows().
| bool MWAWPictBitmapContainer< T >::ok | ( | ) | const [inline] |
returns ok, if the m_data is allocated
Referenced by MWAWPictBitmapBW::valid(), MWAWPictBitmapIndexed::valid(), and MWAWPictBitmapColor::valid().
| MWAWPictBitmapContainer& MWAWPictBitmapContainer< T >::operator= | ( | MWAWPictBitmapContainer< T > const & | orig | ) | [private] |
| void MWAWPictBitmapContainer< T >::set | ( | int | i, |
| int | j, | ||
| T const & | v | ||
| ) | [inline] |
sets a cell m_data
Referenced by MWAWPictBitmapBW::set(), MWAWPictBitmapIndexed::set(), and MWAWPictBitmapColor::set().
| void MWAWPictBitmapContainer< T >::setColumn | ( | int | i, |
| U const * | val | ||
| ) | [inline] |
sets a column of m_data
Referenced by MWAWPictBitmapBW::setColumn(), MWAWPictBitmapIndexed::setColumn(), and MWAWPictBitmapColor::setColumn().
| void MWAWPictBitmapContainer< T >::setRow | ( | int | j, |
| U const * | val | ||
| ) | [inline] |
sets a line of m_data
Referenced by MWAWPictBitmapBW::setRow(), MWAWPictBitmapIndexed::setRow(), and MWAWPictBitmapColor::setRow().
| MWAWVec2i const& MWAWPictBitmapContainer< T >::size | ( | ) | const [inline] |
return the array size
Referenced by MWAWPictBitmapInternal::getBMPData(), getPBMData(), getPPMData(), MWAWPictBitmapInternal::getPPMData(), MWAWPictBitmapBW::size(), MWAWPictBitmapIndexed::size(), and MWAWPictBitmapColor::size().
T* MWAWPictBitmapContainer< T >::m_data [protected] |
the m_data placed by row ie. d_00, d_10, ... , d_{X-1}0, ..
Referenced by MWAWPictBitmapContainer< bool >::cmp(), MWAWPictBitmapContainerBool::cmp(), MWAWPictBitmapContainer< bool >::get(), MWAWPictBitmapContainer< bool >::getRow(), MWAWPictBitmapContainer< bool >::MWAWPictBitmapContainer(), MWAWPictBitmapContainer< bool >::ok(), MWAWPictBitmapContainer< bool >::set(), MWAWPictBitmapContainer< bool >::setColumn(), MWAWPictBitmapContainer< bool >::setRow(), and MWAWPictBitmapContainer< bool >::~MWAWPictBitmapContainer().
MWAWVec2i MWAWPictBitmapContainer< T >::m_size [protected] |
the size
Referenced by MWAWPictBitmapContainer< bool >::cmp(), MWAWPictBitmapContainerBool::cmp(), MWAWPictBitmapContainer< bool >::get(), MWAWPictBitmapContainer< bool >::getRow(), MWAWPictBitmapContainer< bool >::MWAWPictBitmapContainer(), MWAWPictBitmapContainer< bool >::numColumns(), MWAWPictBitmapContainer< bool >::numRows(), MWAWPictBitmapContainer< bool >::set(), MWAWPictBitmapContainer< bool >::setColumn(), MWAWPictBitmapContainer< bool >::setRow(), and MWAWPictBitmapContainer< bool >::size().