#include <pydtn/Sequencer.h>

Public Member Functions | |
| Sequencer () | |
| Default constructor. | |
| Sequencer (const Sequencer &seq) | |
| Copy constructor; takes ownership of the stragglers. | |
| ~Sequencer () | |
| Destructor. | |
| bool | add (uint32_t s) |
| Try to add a new sequence number. | |
This is a recursive object. It stores a contiguous range of sequence numbers, as well as a pointer to the next contiguous range. The beginning and end of a range might be the same, which makes this an inefficient way to store single values. As the ranges meet, objects will be merged. If everything is well-behaved, there will only be one Sequencer in the chain. In a realistic scenario, however, this will not be the case. I'm not sure how the worst case compares with an STL list of all the sequence numbers. They might, in fact, be comparable.
Definition at line 53 of file Sequencer.h.
| bool Sequencer::add | ( | uint32_t | s | ) |
Try to add a new sequence number.
| s | The sequence number being considered |
| true | This sequence number has not been seen before | |
| false | This is a duplicate |
Definition at line 56 of file Sequencer.cc.
References add(), m_first, m_stragglers, m_through, and Sequencer().
Referenced by add().
1.5.4