Indexes packets in a file. More...
Collaboration diagram for MAKLogger::DtLgrPacketIndexer:Classes | |
| struct | IndexEntry |
| struct | NetIndexEntry |
| The entries stored in the packet. More... | |
| struct | NetIndexTable |
| The table stored at the beginning of the packet followed by the net entries. More... | |
Public Member Functions | |
| DtLgrPacketIndexer () | |
| CTOR. | |
| ~DtLgrPacketIndexer () | |
| DTOR. | |
| int | addEntry (double time, DtFilePosition position, int size) |
| Adds a index for a position, time and size. | |
| void | removeEntry (int index) |
| Remove an entry. | |
| void | clearEntries () |
| Remove all entries. | |
| int | firstIndex () |
| Get the first index or -1 if no indices. | |
| int | lastIndex () |
| Get the last index or -1 if no indices. | |
| int | indexCount () const |
| Gets the number of indices currently in the indexer. | |
| int | getIndexAtOrBeforeTime (double time) |
| Gets the first position before time. | |
| int | getIndexAtOrAfterTime (double time) |
| Gets the first position after the time. | |
| DtFilePosition | getPositionOfIndex (int index) |
| Gets the position at the index. | |
| double | getTimeOfIndex (int index) |
| Gets the time of the index. | |
| int | getSizeOfIndex (int index) |
| Gets the size of the entry at the index. | |
| DtPacket * | encodePacket () const |
| Encode index into packet. | |
| void | decodePacket (const DtPacket *packet) |
| Decode index packet. | |
Protected Types | |
| typedef std::vector< IndexEntry > | CheckpointEntryList |
Protected Attributes | |
| CheckpointEntryList | myCheckpointEntries |
Private Member Functions | |
| DtLgrPacketIndexer (const DtLgrPacketIndexer &) | |
| Not Implemented. | |
| DtLgrPacketIndexer & | operator= (const DtLgrPacketIndexer &) |
| Not Implemented. | |
Indexes packets in a file.
| int MAKLogger::DtLgrPacketIndexer::addEntry | ( | double | time, |
| DtFilePosition | position, | ||
| int | size | ||
| ) |
Adds a index for a position, time and size.
| void MAKLogger::DtLgrPacketIndexer::decodePacket | ( | const DtPacket * | packet | ) |
Decode index packet.
The existing entries will be cleared and replaced with the entries stored in the packet. throw DtInvalidInput if the packet is not an index table packet.
| int MAKLogger::DtLgrPacketIndexer::firstIndex | ( | ) |
Get the first index or -1 if no indices.
| -1 | no indices. |
| int MAKLogger::DtLgrPacketIndexer::getIndexAtOrAfterTime | ( | double | time | ) |
Gets the first position after the time.
throw DtInvalidInput if the time is after the last time.
| int MAKLogger::DtLgrPacketIndexer::getIndexAtOrBeforeTime | ( | double | time | ) |
Gets the first position before time.
throw DtInvalidInput if the time is before the first time.
| DtFilePosition MAKLogger::DtLgrPacketIndexer::getPositionOfIndex | ( | int | index | ) |
Gets the position at the index.
throw DtInvalidInput if the index is invalid.
| int MAKLogger::DtLgrPacketIndexer::getSizeOfIndex | ( | int | index | ) |
Gets the size of the entry at the index.
throw DtInvalidInput if the index is invalid.
| double MAKLogger::DtLgrPacketIndexer::getTimeOfIndex | ( | int | index | ) |
Gets the time of the index.
throw DtInvalidInput if the index is invalid.
| int MAKLogger::DtLgrPacketIndexer::lastIndex | ( | ) |
Get the last index or -1 if no indices.
| -1 | no indices. |
| void MAKLogger::DtLgrPacketIndexer::removeEntry | ( | int | index | ) |
Remove an entry.