Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

gmtl::Matrix::RowAccessor Class Template Reference

Helper class for Matrix op[]. More...

#include <Matrix.h>

Collaboration diagram for gmtl::Matrix::RowAccessor:

Collaboration graph
[legend]
List of all members.

Public Methods

 RowAccessor (Matrix< DATA_TYPE, ROWS, COLS > *mat, const unsigned row)
DATA_TYPE & operator[] (const unsigned column)

Public Attributes

Matrix< DATA_TYPE, ROWS, COLS > * mMat
unsigned mRow

Detailed Description

template<typename DATA_TYPE, unsigned ROWS, unsigned COLS>
class gmtl::Matrix< DATA_TYPE, ROWS, COLS >::RowAccessor

Helper class for Matrix op[].

This class encapsulates the row that the user is accessing and implements a new op[] that passes the column to use

Definition at line 89 of file Matrix.h.


Constructor & Destructor Documentation

template<typename DATA_TYPE, unsigned ROWS, unsigned COLS>
gmtl::Matrix< DATA_TYPE, ROWS, COLS >::RowAccessor::RowAccessor Matrix< DATA_TYPE, ROWS, COLS > *    mat,
const unsigned    row
[inline]
 

Definition at line 92 of file Matrix.h.

References gmtlASSERT, mMat, and mRow.

00093          : mMat(mat), mRow(row)
00094       {
00095          gmtlASSERT(row < ROWS);
00096          gmtlASSERT(NULL != mat);
00097       }


Member Function Documentation

template<typename DATA_TYPE, unsigned ROWS, unsigned COLS>
DATA_TYPE& gmtl::Matrix< DATA_TYPE, ROWS, COLS >::RowAccessor::operator[] const unsigned    column [inline]
 

Definition at line 99 of file Matrix.h.

References gmtlASSERT, and mRow.

00100       {
00101          gmtlASSERT(column < COLS);
00102          return (*mMat)(mRow,column);
00103       }


Member Data Documentation

template<typename DATA_TYPE, unsigned ROWS, unsigned COLS>
Matrix<DATA_TYPE,ROWS,COLS>* gmtl::Matrix::RowAccessor::mMat
 

Definition at line 105 of file Matrix.h.

Referenced by RowAccessor.

template<typename DATA_TYPE, unsigned ROWS, unsigned COLS>
unsigned gmtl::Matrix::RowAccessor::mRow
 

Definition at line 106 of file Matrix.h.

Referenced by operator[], and RowAccessor.


The documentation for this class was generated from the following file:
Generated on Mon Apr 7 15:29:31 2003 for GenericMathTemplateLibrary by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002