#include <partialmatch.hh>
Public Member Functions | |
| PartialMatchQueue () | |
| bool | empty () const |
| bool | full () const |
| PartialMatch * | front () const |
| INLINE PartialMatch * | addFront () |
| Add a new entry to the front of the queue. | |
| INLINE PartialMatch * | lowestStartOffset () const |
| Return pointer to element with the lowest startOff value, or null if queue empty. | |
| INLINE uint64 | nextEvent () const |
| Return lowest nextEvent() of all queue entries, which is always the nextEvent() of the first queue entry. | |
| INLINE PartialMatch * | findStartOffset (uint64 off) const |
| Return first matching entry with startOffset()==off, or null if none found. | |
| INLINE PartialMatch * | findLowestStartOffset () const |
| Return entry in list with lowest startOffset() value. | |
| void | erase () |
| Remove all entries from list. | |
| INLINE void | eraseFront () |
| Remove first entry from list. | |
| INLINE void | eraseStartOffsetLess (uint64 off) |
| Remove all entries whose startOffset is strictly less than off. | |
| INLINE PartialMatch * | findDropCandidate (unsigned *sectorLength, uint64 newStartOffset) |
| If the queue is full, use some heuristics to find a PartialMatch in the queue which is "unlikely to lead to an actual match", or 0 if none exists. | |
| void | consistencyCheck () const |
Friends | |
| class | MkTemplate::PartialMatch |
This may seem to make many operations inefficient, but this sort order is best for the central mktemplate loop.
| MkTemplate::PartialMatchQueue::PartialMatchQueue | ( | ) | [inline] |
References erase().
| bool MkTemplate::PartialMatchQueue::empty | ( | ) | const [inline] |
| bool MkTemplate::PartialMatchQueue::full | ( | ) | const [inline] |
| PartialMatch* MkTemplate::PartialMatchQueue::front | ( | ) | const [inline] |
| INLINE PartialMatch* MkTemplate::PartialMatchQueue::addFront | ( | ) |
Add a new entry to the front of the queue.
The queue must not be full. The new entry has all members set to 0, including its startOffset(). Use the setter methods to change this.
| INLINE PartialMatch* MkTemplate::PartialMatchQueue::lowestStartOffset | ( | ) | const |
Return pointer to element with the lowest startOff value, or null if queue empty.
| INLINE uint64 MkTemplate::PartialMatchQueue::nextEvent | ( | ) | const |
Return lowest nextEvent() of all queue entries, which is always the nextEvent() of the first queue entry.
Queue must not be empty.
| INLINE PartialMatch* MkTemplate::PartialMatchQueue::findStartOffset | ( | uint64 | off | ) | const |
Return first matching entry with startOffset()==off, or null if none found.
| INLINE PartialMatch* MkTemplate::PartialMatchQueue::findLowestStartOffset | ( | ) | const |
Return entry in list with lowest startOffset() value.
List must not be empty.
| void MkTemplate::PartialMatchQueue::erase | ( | ) | [inline] |
Remove all entries from list.
References consistencyCheck(), and data.
Referenced by PartialMatchQueue().
| INLINE void MkTemplate::PartialMatchQueue::eraseFront | ( | ) |
Remove first entry from list.
List must not be empty.
| INLINE void MkTemplate::PartialMatchQueue::eraseStartOffsetLess | ( | uint64 | off | ) |
Remove all entries whose startOffset is strictly less than off.
| INLINE PartialMatch* MkTemplate::PartialMatchQueue::findDropCandidate | ( | unsigned * | sectorLength, | |
| uint64 | newStartOffset | |||
| ) |
If the queue is full, use some heuristics to find a PartialMatch in the queue which is "unlikely to lead to an actual match", or 0 if none exists.
| sectorLength | assumed "sector size" | |
| newStartOffset | start offset of the new match which is to replace the object returned by this function. The heuristics favours offsets which are multiples of the assumed "sector size". |
| void MkTemplate::PartialMatchQueue::consistencyCheck | ( | ) | const [inline] |
Referenced by erase().
friend class MkTemplate::PartialMatch [friend] |
1.5.6