52 template<
typename NUMERIC_TYPE,
typename SIGNED_TYPE>
100 operator NUMERIC_TYPE ()
const 221 if (diff < halfMaxValue)
223 return static_cast<SIGNED_TYPE
> (diff);
231 return -(
static_cast<SIGNED_TYPE
> (maxValue -
m_value + 1 + other.
m_value));
237 if (diff < halfMaxValue)
243 return -(
static_cast<SIGNED_TYPE
> (diff));
251 return static_cast<SIGNED_TYPE
> (maxValue - other.
m_value + 1 +
m_value);
301 bool operator <= (const SequenceNumber<NUMERIC_TYPE, SIGNED_TYPE> &other)
const 303 return (!this->
operator> (other));
313 return (this->
operator> (other) || this->
operator== (other));
321 bool operator < (const SequenceNumber<NUMERIC_TYPE, SIGNED_TYPE> &other)
const 332 template<
typename NUMERIC_TYPE2,
typename SIGNED_TYPE2>
333 friend std::ostream & operator<< (std::ostream& os, const SequenceNumber<NUMERIC_TYPE2, SIGNED_TYPE2> &val);
341 template<
typename NUMERIC_TYPE2,
typename SIGNED_TYPE2>
446 template<
typename NUMERIC_TYPE,
typename SIGNED_TYPE>
448 operator<< (std::ostream& os, const SequenceNumber<NUMERIC_TYPE, SIGNED_TYPE> &val)
462 template<
typename NUMERIC_TYPE,
typename SIGNED_TYPE>
485 namespace TracedValueCallback {
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
bool operator!() const
Logical NOT operator - unimplemented.
bool operator==(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &other) const
Equality operator for comparing sequence number.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator%(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &b) const
Modulo operator - unimplemented.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator^(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &b) const
Bitwise XOR operator - unimplemented.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator-(SIGNED_TYPE delta) const
Subtraction operator for subtracting numeric value from sequence number.
bool operator>(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &other) const
Here is the critical part, how the comparison is made taking into account wrap-around.
bool operator||(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &b) const
Logical OR operator - unimplemented.
SequenceNumber< uint16_t, int16_t > SequenceNumber16
16 bit Sequence number.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator+(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &other) const
Operator defining addition of two sequence numbers.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > & operator=(NUMERIC_TYPE value)
Constructs a SequenceNumber from an assignment of given value.
SequenceNumber(SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > const &value)
Constructs a SequenceNumber from a copy.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Generic "sequence number" class.
int operator*()
Indirection operator - unimplemented.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator~() const
Bitwise NOT operator - unimplemented.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator/(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &b) const
Division operator - unimplemented.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > & operator+=(SIGNED_TYPE value)
Plus equals operator.
bool operator!=(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &other) const
Inequality operator for comparing sequence numbers.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator++()
Prefix increment operator.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator &(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &b) const
Bitwise AND operator - unimplemented.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator|(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &b) const
Bitwise OR operator - unimplemented.
friend std::istream & operator>>(std::istream &is, const SequenceNumber< NUMERIC_TYPE2, SIGNED_TYPE2 > &val)
For loading sequence number from input streams.
SequenceNumber< uint8_t, int8_t > SequenceNumber8
8 bit Sequence number.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > operator--()
Prefix decrement operator.
SequenceNumber(NUMERIC_TYPE value)
Constructs a SequenceNumber with the given value.
bool operator>=(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &other) const
Greater than or equal operator for comparing sequence numbers.
NUMERIC_TYPE m_value
Sequence number value.
NUMERIC_TYPE GetValue() const
Extracts the numeric value of the sequence number.
SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > & operator-=(SIGNED_TYPE value)
Minus equals operator.
bool operator&&(const SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE > &b) const
Logical AND operator - unimplemented.
SequenceNumber< uint32_t, int32_t > SequenceNumber32
32 bit Sequence number.