8 #ifndef OPENDDS_DCPS_SEQUENCENUMBER_H 9 #define OPENDDS_DCPS_SEQUENCENUMBER_H 15 #if !defined (ACE_LACKS_PRAGMA_ONCE) 62 if ((this->low_ == 0) && (this->high_ == 0)) {
67 if (this->low_ == 0) {
77 if (value < MIN_VALUE) {
80 this->high_ = ACE_INT32(value / LOW_BASE);
81 this->low_ = ACE_UINT32(value % LOW_BASE);
84 void setValue(ACE_INT32 high, ACE_UINT32 low) {
87 if (this->getValue() < MIN_VALUE) {
88 this->setValue(MIN_VALUE);
93 return LOW_BASE * this->high_ + this->low_;
97 return (this->high_ < rvalue.
high_)
98 || (this->high_ == rvalue.
high_ && this->low_ < rvalue.
low_);
103 return (this->high_ == rvalue.
high_) &&
104 (this->low_ == rvalue.
low_);
107 return (this->high_ != rvalue.
high_) ||
108 (this->low_ != rvalue.
low_);
111 return !(*
this < rvalue);
114 return !(rvalue < *
this);
117 return (rvalue < *
this)
118 && (*
this != rvalue);
138 static const Value INITIAL_VALUE = 1;
139 static const Value MIN_VALUE = 0;
140 static const Value LOW_BASE = 0x0000000100000000LL;
149 : high_(high), low_(low) {
SequenceNumber operator++(int)
Post-increment.
bool operator<(const SequenceNumber &rvalue) const
const LogLevel::Value value
OpenDDS_Dcps_Export void primitive_serialized_size_ulong(const Encoding &encoding, size_t &size, size_t count=1)
SequenceNumber previous() const
SequenceNumber & operator++()
Pre-increment.
SequenceNumber(Value value=INITIAL_VALUE)
Construct with a value, default to one (starting point).
#define OpenDDS_Dcps_Export
bool operator>=(const SequenceNumber &rvalue) const
bool operator==(const SequenceNumber &rvalue) const
Derive a full suite of logical operations.
void serialized_size(const Encoding &encoding, size_t &size, const SequenceNumber &)
OpenDDS_Dcps_Export const SequenceRange unknown_sequence_range
SequenceNumber(ACE_INT32 high, ACE_UINT32 low)
Class to serialize and deserialize data for DDS.
ACE_CDR::Boolean operator<<(Serializer &serializer, CoherentChangeControl &value)
Marshal/Insertion into a buffer.
bool operator<=(const SequenceNumber &rvalue) const
SequenceNumber::Value FragmentNumber
ACE_UINT32 getLow() const
SequenceNumber operator+(const SequenceNumber &lhs, int rhs)
static SequenceNumber ZERO()
void setValue(ACE_INT32 high, ACE_UINT32 low)
std::pair< SequenceNumber, SequenceNumber > SequenceRange
static const FragmentNumber INVALID_FRAGMENT
bool operator>(const SequenceNumber &rvalue) const
Sequence number abstraction. Only allows positive 64 bit values.
static SequenceNumber SEQUENCENUMBER_UNKNOWN()
SequenceNumber operator+=(SequenceNumber &lhs, int rhs)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
ACE_CDR::Boolean operator>>(Serializer &serializer, CoherentChangeControl &value)
void setValue(Value value)
const DCPS::Encoding encoding(DCPS::Encoding::KIND_UNALIGNED_CDR, DCPS::ENDIAN_BIG)
ACE_INT32 getHigh() const
The Internal API and Implementation of OpenDDS.
bool operator!=(const SequenceNumber &rvalue) const