Main Page Class Hierarchy Compound List File List Compound Members File Members

# iterator Class Reference

`#include <cmt_vector_iterator.h>`

Collaboration diagram for iterator:

[legend]
List of all members.

## Public Methods
| iterator ()
| iterator (cmt_vector& vector)
| iterator (const iterator& other)
iterator& | operator= (const iterator& other)
bool | operator== (const iterator& other)
iterator& | operator++ ()
iterator& | operator-- ()
int | operator- (const iterator* other)
iterator | operator+ (int offset)
iterator | operator- (int offset)
T& | operator * ()
## Private Attributes
int | _index
cmt_vector* | _vector

## Constructor & Destructor Documentation

iterator::iterator ( | )`[inline]`

| Definition at line 4 of file cmt_vector_iterator.h.
    00005       {
    00006         _index = 0;
    00007         _vector = 0;
    00008       }

iterator::iterator ( | cmt_vector & vector )`[inline]`

| Definition at line 10 of file cmt_vector_iterator.h.
    00011       {
    00012         _index = 0;
    00013         _vector = &vector;
    00014       }

iterator::iterator ( | const iterator & other )`[inline]`

| Definition at line 16 of file cmt_vector_iterator.h.
    00017       {
    00018         _index = other._index;
    00019         _vector = other._vector;
    00020       }

## Member Function Documentation

T & iterator::operator * ( | )`[inline]`

| Definition at line 70 of file cmt_vector_iterator.h.
    00071       {
    00072         return ();
    00073       }

iterator iterator::operator+ ( | int offset )`[inline]`

| Definition at line 58 of file cmt_vector_iterator.h.
    00059       {
    00060         iterator it = *this;
    00061         return (it);
    00062       }

iterator & iterator::operator++ ( | )`[inline]`

| Definition at line 38 of file cmt_vector_iterator.h.
    00039       {
    00040         if (_vector != 0)
    00041           {
    00042             _index++;
    00043           }
    00044
    00045         return (*this);
    00046       }

iterator iterator::operator- ( | int offset )`[inline]`

| Definition at line 64 of file cmt_vector_iterator.h.
    00065       {
    00066         iterator it = *this;
    00067         return (it);
    00068       }

int iterator::operator- ( | const iterator * other )`[inline]`

| Definition at line 53 of file cmt_vector_iterator.h.
    00054       {
    00055         return (0);
    00056       }

iterator & iterator::operator-- ( | )`[inline]`

| Definition at line 48 of file cmt_vector_iterator.h.
    00049       {
    00050         return (*this);
    00051       }

iterator & iterator::operator= ( | const iterator & other )`[inline]`

| Definition at line 22 of file cmt_vector_iterator.h.
    00023       {
    00024         _index = other._index;
    00025         _vector = other._vector;
    00026
    00027         return (*this);
    00028       }

bool iterator::operator== ( | const iterator & other )`[inline]`

| Definition at line 30 of file cmt_vector_iterator.h.
    00031       {
    00032         if (_vector != other._vector) return (false);
    00033         if (_index != other._index) return (false);
    00034
    00035         return (true);
    00036       }

## Member Data Documentation

int iterator::_index`[private]`

| Definition at line 76 of file cmt_vector_iterator.h.

cmt_vector * iterator::_vector`[private]`

| Definition at line 77 of file cmt_vector_iterator.h.

The documentation for this class was generated from the following file:

- cmt_vector_iterator.h