Message buffer class responsible for storing a list of messages and iterating through that list. More...
Collaboration diagram for MAKLogger::DtMessageBuffer:Public Types | |
| typedef std::list< DtPacket * > | PacketList |
Public Member Functions | |
| DtMessageBuffer () | |
| CTOR creates an empty buffer. | |
| ~DtMessageBuffer () | |
| DTOR clears the buffer before destructing. | |
| const DtPacket * | first () const |
| Get the first packet in the buffer. | |
| const DtPacket * | last () const |
| Get the last packet in the buffer. | |
| void | setTime (DtAbsoluteTime) |
| Sets the time of all messages in the buffer to the given time. | |
| void | sortByTime () |
| Sorts all messages by their time. | |
| void | offsetTime (DtRelativeTime offset) |
| Adds the offset time to all messages in the buffer. | |
| void | add (DtPacket *) |
| Packet is added to list and ownership is maintained. | |
| void | clear () |
| Clears the buffer and deletes all packets. | |
| void | merge (DtMessageBuffer &secondary) |
| Merge two message buffers together, the secondary message buffer is cleared. | |
| void | merge (DtMessageBuffer &secondary, const DtAbsoluteTime &time, bool inclusive) |
| Merge two message buffers together up to a specific time. | |
| void | merge (DtMessageBuffer &secondary, int count) |
| Move a number of packets from the secondary head to the this buffer's tail. | |
| size_t | size () const |
| Get the size of the buffer in packets. | |
| size_t | sizeOfPackets () const |
| Get the size of the packets in the buffer in bytes. | |
| void | unfilterAll () const |
| unfilter each packet in buffer. | |
| void | addAttribute (DtPacketAttributeSP attr) |
| Add the attribute to each packet. | |
| PacketList::iterator | begin () |
| Get the iterator pointing to the first packet. | |
| PacketList::const_iterator | begin () const |
| Get the iterator pointing to the first packet. | |
| PacketList::iterator | end () |
| Get the iterator pointing beyond the last packet. | |
| PacketList::const_iterator | end () const |
| Get the iterator pointing beyond the last packet. | |
Protected Attributes | |
| PacketList | myMessages |
Message buffer class responsible for storing a list of messages and iterating through that list.
| void MAKLogger::DtMessageBuffer::merge | ( | DtMessageBuffer & | secondary | ) |
Merge two message buffers together, the secondary message buffer is cleared.
| void MAKLogger::DtMessageBuffer::merge | ( | DtMessageBuffer & | secondary, |
| const DtAbsoluteTime & | time, | ||
| bool | inclusive | ||
| ) |
Merge two message buffers together up to a specific time.
All messages before that time are moved from the secondary buffer into this buffer. The time boundary can be inclusive.
| void MAKLogger::DtMessageBuffer::merge | ( | DtMessageBuffer & | secondary, |
| int | count | ||
| ) |
Move a number of packets from the secondary head to the this buffer's tail.
| void MAKLogger::DtMessageBuffer::offsetTime | ( | DtRelativeTime | offset | ) |
Adds the offset time to all messages in the buffer.
If the resulting time of any of the packets is less than zero the timestamp will be set to zero.