All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions
QGpCoreWave::ModalStorage::Iterator Class Reference

#include <ModalStorage.h>

List of all members.

Public Member Functions

bool atEnd () const
 Iterator (const ModalStorage *s, int iMode)
Iteratoroperator++ ()
const RealValuevalue ()
double x () const

Constructor & Destructor Documentation

QGpCoreWave::ModalStorage::Iterator::Iterator ( const ModalStorage s,
int  iMode 
) [inline]

References QGpCoreWave::ModalStorage::mode(), QGpCoreWave::ModalStorage::refineBegin(), QGpCoreWave::ModalStorage::refineEnd(), TRACE, and QGpCoreWave::ModalStorage::x().

{
  TRACE;
  _storage=s;
  _nextFixed=_storage->x(0);
  _fixedIterator=0;
  _refineIterator=_storage->refineBegin();
  if(_refineIterator!=_storage->refineEnd()) {
    _nextRefine=_refineIterator->x();
  } else {
    _nextRefine=1e99;
  }
  _iMode=iMode;
  _values=_storage->mode(_iMode);
}

Member Function Documentation

References TRACE.

Referenced by QGpCoreWave::ModalStorage::curve(), QGpCoreWave::ModalStorage::toStream(), and QGpCoreWave::ModalStorage::writeReport().

{
  TRACE;
  return _fixedIterator==_storage->xCount() && _refineIterator==_storage->refineEnd();
}
ModalStorage::Iterator & QGpCoreWave::ModalStorage::Iterator::operator++ ( ) [inline]

References x(), and QGpCoreWave::ModalStorage::xCount().

{
  if(_nextFixed < _nextRefine) {
    _fixedIterator++;
    if(_fixedIterator < _storage->xCount())
      _nextFixed=_storage->x(_fixedIterator);
    else {
      _nextFixed=1e99;
    }
  } else {
    ++_refineIterator;
    if(_refineIterator!=_storage->refineEnd())
      _nextRefine=_refineIterator->x();
    else {
      _nextRefine=1e99;
    }
  }
  return *this;
}

References QGpCoreTools::Value< numberType >::value().

{
  if(_nextFixed < _nextRefine) {
    return _values[_fixedIterator] ;
  } else {
    return _refineIterator->value(_iMode) ;
  }
}
double QGpCoreWave::ModalStorage::Iterator::x ( ) const [inline]

References TRACE.

Referenced by operator++().

{
  TRACE;
  if(_nextFixed < _nextRefine) {
    return _nextFixed;
  } else {
    return _nextRefine;
  }
}

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines