Ring Class Template Reference

Inheritance diagram for Ring:

Array List of all members.

Detailed Description

template<class T>
class Ring< T >

This class template provides a wrapping array.

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 234 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

 Ring (const int size)
 Ring (const int size, const T &value)
 Ring (const Ring< T > &ring)
 ~Ring ()
Element access
reference operator[] (const size_type index)
const_reference operator[] (const size_type index) const
reference operator() (const size_type index)
const_reference operator() (const size_type index) const

Private Member Functions

int wrap_index (const int index) const


Member Typedef Documentation

typedef T value_type

Reimplemented from Array.

Definition at line 245 of file Array.H.

typedef value_type* pointer

Reimplemented from Array.

Definition at line 247 of file Array.H.

typedef const value_type* const_pointer

Reimplemented from Array.

Definition at line 248 of file Array.H.

typedef value_type& reference

Reimplemented from Array.

Definition at line 249 of file Array.H.

typedef const value_type& const_reference

Reimplemented from Array.

Definition at line 250 of file Array.H.

typedef ptrdiff_t difference_type

Reimplemented from Array.

Definition at line 252 of file Array.H.

typedef size_t size_type

Reimplemented from Array.

Definition at line 253 of file Array.H.

typedef pointer iterator

Reimplemented from Array.

Definition at line 255 of file Array.H.

typedef const_pointer const_iterator

Reimplemented from Array.

Definition at line 256 of file Array.H.

typedef std::reverse_iterator<iterator> reverse_iterator

Reimplemented from Array.

Definition at line 258 of file Array.H.

typedef std::reverse_iterator<const_iterator> const_reverse_iterator

Reimplemented from Array.

Definition at line 259 of file Array.H.


Constructor & Destructor Documentation

Ring ( const int  size  )  [inline, explicit]

Definition at line 236 of file Array.H.

Ring ( const int  size,
const T &  value 
) [inline]

Definition at line 237 of file Array.H.

Ring ( const Ring< T > &  ring  )  [inline]

Definition at line 238 of file Array.H.

~Ring (  )  [inline]

Definition at line 239 of file Array.H.


Member Function Documentation

reference operator[] ( const size_type  index  )  [inline]

Reimplemented from Array.

Definition at line 264 of file Array.H.

References Array::operator[](), and wrap_index().

const_reference operator[] ( const size_type  index  )  const [inline]

Reimplemented from Array.

Definition at line 265 of file Array.H.

References Array::operator[](), and wrap_index().

reference operator() ( const size_type  index  )  [inline]

Reimplemented from Array.

Definition at line 267 of file Array.H.

References wrap_index().

const_reference operator() ( const size_type  index  )  const [inline]

Reimplemented from Array.

Definition at line 268 of file Array.H.

References wrap_index().

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

Definition at line 274 of file Array.H.

References Array::size().

Referenced by operator()(), and 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