MAK Data Logger API Documentation for DIS
List of all members | Classes | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions
MAKLogger::DtLgrPacketIndexer Class Reference

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.
DtPacketencodePacket () const
 Encode index into packet.
void decodePacket (const DtPacket *packet)
 Decode index packet.

Protected Types

typedef std::vector< IndexEntryCheckpointEntryList

Protected Attributes

CheckpointEntryList myCheckpointEntries

Private Member Functions

 DtLgrPacketIndexer (const DtLgrPacketIndexer &)
 Not Implemented.
DtLgrPacketIndexeroperator= (const DtLgrPacketIndexer &)
 Not Implemented.

Detailed Description

Indexes packets in a file.

Member Typedef Documentation

Constructor & Destructor Documentation

MAKLogger::DtLgrPacketIndexer::DtLgrPacketIndexer ( )

CTOR.

MAKLogger::DtLgrPacketIndexer::~DtLgrPacketIndexer ( )

DTOR.

MAKLogger::DtLgrPacketIndexer::DtLgrPacketIndexer ( const DtLgrPacketIndexer )
private

Not Implemented.

Member Function Documentation

int MAKLogger::DtLgrPacketIndexer::addEntry ( double  time,
DtFilePosition  position,
int  size 
)

Adds a index for a position, time and size.

Returns
the index of the entry.
void MAKLogger::DtLgrPacketIndexer::clearEntries ( )

Remove all entries.

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.

DtPacket* MAKLogger::DtLgrPacketIndexer::encodePacket ( ) const

Encode index into packet.

int MAKLogger::DtLgrPacketIndexer::firstIndex ( )

Get the first index or -1 if no indices.

Return values
-1no 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::indexCount ( ) const

Gets the number of indices currently in the indexer.

int MAKLogger::DtLgrPacketIndexer::lastIndex ( )

Get the last index or -1 if no indices.

Return values
-1no indices.
DtLgrPacketIndexer& MAKLogger::DtLgrPacketIndexer::operator= ( const DtLgrPacketIndexer )
private

Not Implemented.

void MAKLogger::DtLgrPacketIndexer::removeEntry ( int  index)

Remove an entry.

Warning
All indexes previously returned may be invalid after this call.

Member Data Documentation

CheckpointEntryList MAKLogger::DtLgrPacketIndexer::myCheckpointEntries
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)