diff options
| author | Gordon Sim <gsim@apache.org> | 2007-08-10 14:51:08 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-08-10 14:51:08 +0000 |
| commit | 6577b14632d81c15482cb0793e01166cdb28eaff (patch) | |
| tree | 8b8dc5e4db5690e9c024b862a1d725764687d6fc /cpp/src/qpid/framing/SequenceNumber.cpp | |
| parent | c00a668cbf27d90edf18cc935cc982cab6581cae (diff) | |
| download | qpid-python-6577b14632d81c15482cb0793e01166cdb28eaff.tar.gz | |
Broker management of message acknowledgements now runs entirely off execution layer.
Flow control support.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@564611 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/SequenceNumber.cpp')
| -rw-r--r-- | cpp/src/qpid/framing/SequenceNumber.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/qpid/framing/SequenceNumber.cpp b/cpp/src/qpid/framing/SequenceNumber.cpp index ea1a34b1cf..24867130a2 100644 --- a/cpp/src/qpid/framing/SequenceNumber.cpp +++ b/cpp/src/qpid/framing/SequenceNumber.cpp @@ -51,6 +51,11 @@ const SequenceNumber SequenceNumber::operator++(int) return old; } +SequenceNumber SequenceNumber::operator+(uint32_t i) const +{ + return SequenceNumber(value + i); +} + bool SequenceNumber::operator<(const SequenceNumber& other) const { return (value - other.value) < 0; @@ -61,6 +66,16 @@ bool SequenceNumber::operator>(const SequenceNumber& other) const return other < *this; } +bool SequenceNumber::operator<=(const SequenceNumber& other) const +{ + return *this == other || *this < other; +} + +bool SequenceNumber::operator>=(const SequenceNumber& other) const +{ + return *this == other || *this > other; +} + namespace qpid { namespace framing { |
