Torus Class Template Reference

Inheritance diagram for Torus:

Array2d List of all members.

Detailed Description

template<class T>
class Torus< T >

Torus template class

This class template provides a wrapping 2d array. Row and column references off the end (or beginning) of the array are wrapped to fall inside of the range of the array.

Author:
Bill Smart
Version:
1.0
Date:
May 2005

Definition at line 284 of file Array.H.

Public Types

STL integration
typedef T value_type
typedef value_typepointer
typedef const value_typeconst_pointer
typedef value_typereference
typedef const value_typeconst_reference
typedef ptrdiff_t difference_type
typedef size_t size_type
typedef pointer iterator
typedef const_pointer const_iterator
typedef std::reverse_iterator<
iterator
reverse_iterator
typedef std::reverse_iterator<
const_iterator
const_reverse_iterator

Public Member Functions

 Torus (const int rows, const int columns)
 Torus (const int rows, const int columns, const T &value)
 Torus (const Torus< T > &torus)
 ~Torus ()
Element access
reference operator() (const size_type row, const size_type column)
const_reference operator() (const size_type row, const size_type column) const

Private Member Functions

int wrap_index (const int index, const int size) const


Member Typedef Documentation

typedef T value_type

Reimplemented from Array2d.

Definition at line 295 of file Array.H.

typedef value_type* pointer

Reimplemented from Array2d.

Definition at line 297 of file Array.H.

typedef const value_type* const_pointer

Reimplemented from Array2d.

Definition at line 298 of file Array.H.

typedef value_type& reference

Reimplemented from Array2d.

Definition at line 299 of file Array.H.

typedef const value_type& const_reference

Reimplemented from Array2d.

Definition at line 300 of file Array.H.

typedef ptrdiff_t difference_type

Reimplemented from Array2d.

Definition at line 302 of file Array.H.

typedef size_t size_type

Reimplemented from Array2d.

Definition at line 303 of file Array.H.

typedef pointer iterator

Reimplemented from Array2d.

Definition at line 305 of file Array.H.

typedef const_pointer const_iterator

Reimplemented from Array2d.

Definition at line 306 of file Array.H.

typedef std::reverse_iterator<iterator> reverse_iterator

Reimplemented from Array2d.

Definition at line 308 of file Array.H.

typedef std::reverse_iterator<const_iterator> const_reverse_iterator

Reimplemented from Array2d.

Definition at line 309 of file Array.H.


Constructor & Destructor Documentation

Torus ( const int  rows,
const int  columns 
) [inline]

Definition at line 286 of file Array.H.

Torus ( const int  rows,
const int  columns,
const T &  value 
) [inline]

Definition at line 287 of file Array.H.

Torus ( const Torus< T > &  torus  )  [inline]

Definition at line 288 of file Array.H.

~Torus (  )  [inline]

Definition at line 289 of file Array.H.


Member Function Documentation

reference operator() ( const size_type  row,
const size_type  column 
) [inline]

Reimplemented from Array2d.

Definition at line 314 of file Array.H.

References Array2d::columns(), Array2d::rows(), and wrap_index().

const_reference operator() ( const size_type  row,
const size_type  column 
) const [inline]

Reimplemented from Array2d.

Definition at line 316 of file Array.H.

References Array2d::columns(), Array2d::rows(), and wrap_index().

int wrap_index ( const int  index,
const int  size 
) const [inline, private]

Definition at line 325 of file Array.H.

Referenced by operator()().


The documentation for this class was generated from the following file:
Generated on Thu Feb 1 15:31:55 2007 for WURDE by  doxygen 1.5.1