Type for a iterator over an AirFrame interval matrix. More...
#include <ChannelInfo.h>
Inherits BaseIntersectionIterator< AirFrameMatrix, AirFrameMatrix::iterator, AirFrameTimeList::iterator >.
Public Member Functions | |
IntersectionIterator (AirFrameMatrix *airFrames, simtime_t from, simtime_t to) | |
Creates an iterator for the specified interval at the specified AirFrameMatrix. | |
void | eraseAirFrame () |
Erases the AirFrame the iterator currently points to from the AirFrameMatrix. | |
Private Types | |
typedef BaseIntersectionIterator < AirFrameMatrix, AirFrameMatrix::iterator, AirFrameTimeList::iterator > | Base |
Type for shortcut to base class type. |
Type for a iterator over an AirFrame interval matrix.
Extends the const-version by an erase method.
Definition at line 177 of file ChannelInfo.h.
void ChannelInfo::IntersectionIterator::eraseAirFrame | ( | ) | [inline] |
Erases the AirFrame the iterator currently points to from the AirFrameMatrix.
After the erase the iterator points to an invalid value and "next()" should be called.
Definition at line 205 of file ChannelInfo.h.
References ChannelInfo::BaseIntersectionIterator< AirFrameMatrix, AirFrameMatrix::iterator, AirFrameTimeList::iterator >::alreadyNext, ChannelInfo::BaseIntersectionIterator< AirFrameMatrix, AirFrameMatrix::iterator, AirFrameTimeList::iterator >::endIt, ChannelInfo::BaseIntersectionIterator< AirFrameMatrix, AirFrameMatrix::iterator, AirFrameTimeList::iterator >::intervals, and ChannelInfo::BaseIntersectionIterator< AirFrameMatrix, AirFrameMatrix::iterator, AirFrameTimeList::iterator >::startIt.
Referenced by ChannelInfo::checkAndCleanInterval().
{ assert(endIt != intervals->end()); assert(startIt != endIt->second.end()); //erase AirFrame from list startIt = endIt->second.erase(startIt); //check if we've deleted the last entry in the list if(startIt == endIt->second.end()) { //check if we deleted the only entry in the list if(endIt->second.empty()) { intervals->erase(endIt++); //delete list from map } else { endIt++; } //increase to a valid value if we are not done if(endIt != intervals->end()) { startIt = endIt->second.begin(); } } alreadyNext = true; }