Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

MRAmpBase.iterator Class Reference

#include <MRAmpBase.h>

Collaboration diagram for MRAmpBase.iterator:

Collaboration graph
[legend]

Public Member Functions

bool is_equal (const iterator &)
bool is_null ()
 iterator (MRAmpBase *)
MRAacoef operator * ()
 operator bool ()
bool operator! ()
bool operator!= (const iterator &)
iteratoroperator++ ()
bool operator< (const iterator &)
bool operator<= (const iterator &)
bool operator== (const iterator &)
bool operator> (const iterator &)
bool operator>= (const iterator &)
int pos ()
void set_null ()
 ~iterator ()

Protected Attributes

int _pos
MRAmpBase_ptmp

Private Member Functions

 iterator ()

Friends

class MRAmpBase

Constructor & Destructor Documentation

MRAmpBase.iterator::iterator MRAmpBase  ) 
 

Definition at line 689 of file MRAmpBase.h.

00690   : _pos(0), _ptmp(ptmp)
00691 {}

MRAmpBase.iterator::~iterator  ) 
 

Definition at line 694 of file MRAmpBase.h.

References MRAmpBase.iterator._ptmp.

00694 { _ptmp = 0; }

MRAmpBase.iterator.iterator  )  [private]
 

Definition at line 155 of file MRAmpBase.h.

00155 {}


Member Function Documentation

bool MRAmpBase.iterator::is_equal const iterator  ) 
 

Definition at line 754 of file MRAmpBase.h.

References MRAmpBase.iterator._pos.

Referenced by MRAmpBase.iterator.operator!=(), and MRAmpBase.iterator.operator==().

00755 {
00756   return ( _pos == iter._pos );
00757 }

bool MRAmpBase.iterator::is_null  ) 
 

Definition at line 745 of file MRAmpBase.h.

References MRAmpBase.iterator._pos.

Referenced by MRAmpBase.iterator.operator *(), MRAmpBase.iterator.operator bool(), MRAmpBase.iterator.operator!(), and MRAmpBase.iterator.operator++().

00745 { return ( _pos == 0 ); }

MRAacoef MRAmpBase.iterator::operator *  ) 
 

Definition at line 720 of file MRAmpBase.h.

References MRAmpBase._mpenc, MRAmpBase.iterator._pos, MRAmpBase._ptbuffer, MRAmpBase.iterator._ptmp, MRAacoef.a, MRAmpEncode.array_dim(), MRAacoef.bpcoef, MRAmpEncode.bplen_a(), MRAmpEncode.bplen_coef(), MRAmpBase.iterator.is_null(), BufferBase.read(), BufferBase.seekg(), and BufferBase.tellg().

00721 { 
00722       bytepack bp;
00723       MRAacoef acoef( _ptmp->_mpenc.array_dim() );
00724    if ( !is_null() ) {
00725       int tmppos = _ptmp->_ptbuffer->tellg();
00726       _ptmp->_ptbuffer->seekg(_pos);
00727 
00728 //      mp.write( *(_ptsb->_ptbuffer) );
00729       for( int d = 0; d < _ptmp->_mpenc.array_dim(); ++d ) {
00730          _ptmp->_ptbuffer->read( bp( 0, _ptmp->_mpenc.bplen_a(d) ) ); 
00731          acoef.a[d] = int(bp);
00732       }
00733       _ptmp->_ptbuffer->read( bp( 0, _ptmp->_mpenc.bplen_coef() ) ); 
00734       acoef.bpcoef = bp;
00735 
00736       _ptmp->_ptbuffer->seekg(tmppos);
00737    }
00738    return acoef; 
00739 }

MRAmpBase.iterator::operator bool  ) 
 

Definition at line 751 of file MRAmpBase.h.

References MRAmpBase.iterator.is_null().

00751 { return !is_null(); }

bool MRAmpBase.iterator::operator!  ) 
 

Definition at line 748 of file MRAmpBase.h.

References MRAmpBase.iterator.is_null().

00748 { return is_null(); }

bool MRAmpBase.iterator::operator!= const iterator  ) 
 

Definition at line 766 of file MRAmpBase.h.

References MRAmpBase.iterator.is_equal().

00767 { 
00768   return !is_equal(iter);
00769 } 

MRAmpBase::iterator & MRAmpBase.iterator::operator++  ) 
 

Definition at line 698 of file MRAmpBase.h.

References MRAmpBase._mpenc, MRAmpBase.iterator._pos, MRAmpBase._ptbuffer, MRAmpBase.iterator._ptmp, MRAmpEncode.array_dim(), MRAmpEncode.bplen_a(), MRAmpEncode.bplen_coef(), MRAmpBase.iterator.is_null(), BufferBase.read(), BufferBase.seekg(), and BufferBase.tellg().

00699 { 
00700    if ( !is_null() ) {
00701       bytepack bp;
00702       int tmppos = _ptmp->_ptbuffer->tellg();
00703       _ptmp->_ptbuffer->seekg(_pos);
00704 
00705 //      mp.write( *(_ptsb->_ptbuffer) );
00706       for( int d = 0; d < _ptmp->_mpenc.array_dim(); ++d ) {
00707          _ptmp->_ptbuffer->read( bp( 0, _ptmp->_mpenc.bplen_a(d) ) ); 
00708            // _a[d] = int(bp);
00709       }
00710       _ptmp->_ptbuffer->read( bp( 0, _ptmp->_mpenc.bplen_coef() ) ); 
00711         //_coef = Data_t(bp);
00712 
00713       _pos = _ptmp->_ptbuffer->tellg();
00714       _ptmp->_ptbuffer->seekg(tmppos);
00715    }
00716    return *this; 
00717 }

bool MRAmpBase.iterator::operator< const iterator  ) 
 

Definition at line 778 of file MRAmpBase.h.

References MRAmpBase.iterator._pos.

00779 {
00780   return ( _pos < iter._pos );
00781 }

bool MRAmpBase.iterator::operator<= const iterator  ) 
 

Definition at line 790 of file MRAmpBase.h.

00791 {
00792    return ( ( *this < iter ) ||  ( *this == iter ) );
00793 }

bool MRAmpBase.iterator::operator== const iterator  ) 
 

Definition at line 760 of file MRAmpBase.h.

References MRAmpBase.iterator.is_equal().

00761 {
00762   return is_equal(iter);
00763 }

bool MRAmpBase.iterator::operator> const iterator  ) 
 

Definition at line 772 of file MRAmpBase.h.

References MRAmpBase.iterator._pos.

00773 {
00774   return ( _pos > iter._pos );
00775 }

bool MRAmpBase.iterator::operator>= const iterator  ) 
 

Definition at line 784 of file MRAmpBase.h.

00785 {
00786    return ( ( *this > iter ) ||  ( *this == iter ) );
00787 }

int MRAmpBase.iterator.pos  ) 
 

Definition at line 150 of file MRAmpBase.h.

References MRAmpBase.iterator._pos.

00150 { return _pos; }

void MRAmpBase.iterator::set_null  ) 
 

Definition at line 742 of file MRAmpBase.h.

References MRAmpBase.iterator._pos.

00742 { _pos = 0; }


Friends And Related Function Documentation

friend class MRAmpBase [friend]
 

Definition at line 156 of file MRAmpBase.h.


Field Documentation

int MRAmpBase.iterator._pos [protected]
 

Definition at line 152 of file MRAmpBase.h.

Referenced by MRAmpBase.begin(), MRAmpBase.end(), MRAmpBase.iterator.is_equal(), MRAmpBase.iterator.is_null(), MRAmpBase.iterator.operator *(), MRAmpBase.iterator.operator++(), MRAmpBase.iterator.operator<(), MRAmpBase.iterator.operator>(), MRAmpBase.iterator.pos(), and MRAmpBase.iterator.set_null().

MRAmpBase* MRAmpBase.iterator._ptmp [protected]
 

Definition at line 153 of file MRAmpBase.h.

Referenced by MRAmpBase.iterator.operator *(), MRAmpBase.iterator.operator++(), and MRAmpBase.iterator.~iterator().


The documentation for this class was generated from the following file:
Generated on Mon May 31 21:41:27 2004 for SR2k4 Assembler by doxygen 1.3.6