20 #ifndef TRACED_VALUE_H
21 #define TRACED_VALUE_H
48 #define TRACED_VALUE_DEBUG(x)
101 operator T ()
const {
119 template <
typename U>
128 template <
typename U>
235 typedef void (*
BoolCallback) (
const bool oldValue,
const bool newValue);
236 typedef void (*
Int8Callback) (
const int8_t oldValue,
const int8_t newValue);
237 typedef void (*
Uint8Callback) (
const uint8_t oldValue,
const uint8_t newValue);
238 typedef void (*
Int16Callback) (
const int16_t oldValue,
const int16_t newValue);
239 typedef void (*
Uint16Callback)(
const uint16_t oldValue,
const uint16_t newValue);
240 typedef void (*
Int32Callback) (
const int32_t oldValue,
const int32_t newValue);
241 typedef void (*
Uint32Callback)(
const uint32_t oldValue,
const uint32_t newValue);
271 template <
typename T>
272 std::ostream& operator << (std::ostream& os, const TracedValue<T>& rhs)
274 return os<<rhs.Get ();
285 template <
typename T,
typename U>
289 return lhs.
Get () == rhs.
Get ();
292 template <
typename T,
typename U>
296 return lhs.
Get () == rhs;
299 template <
typename T,
typename U>
303 return lhs == rhs.
Get ();
307 template <
typename T,
typename U>
311 return lhs.
Get () != rhs.
Get ();
314 template <
typename T,
typename U>
318 return lhs.
Get () != rhs;
321 template <
typename T,
typename U>
325 return lhs != rhs.
Get ();
329 template <
typename T,
typename U>
333 return lhs.Get () <= rhs.Get ();
336 template <
typename T,
typename U>
337 bool operator <= (const TracedValue<T> &lhs,
const U &rhs)
340 return lhs.Get () <= rhs;
343 template <
typename T,
typename U>
344 bool operator <= (const U &lhs, const TracedValue<T> &rhs)
347 return lhs <= rhs.Get ();
350 template <
typename T,
typename U>
354 return lhs.
Get () >= rhs.
Get ();
357 template <
typename T,
typename U>
361 return lhs.
Get () >= rhs;
364 template <
typename T,
typename U>
368 return lhs >= rhs.
Get ();
372 template <
typename T,
typename U>
376 return lhs.Get () < rhs.Get ();
379 template <
typename T,
typename U>
380 bool operator < (const TracedValue<T> &lhs,
const U &rhs)
383 return lhs.Get () < rhs;
386 template <
typename T,
typename U>
387 bool operator < (const U &lhs, const TracedValue<T> &rhs)
390 return lhs < rhs.Get ();
393 template <
typename T,
typename U>
397 return lhs.
Get () > rhs.
Get ();
400 template <
typename T,
typename U>
404 return lhs.
Get () > rhs;
407 template <
typename T,
typename U>
411 return lhs > rhs.
Get ();
428 template <
typename T,
typename U>
434 template <
typename T,
typename U>
440 template <
typename T,
typename U>
447 template <
typename T,
typename U>
453 template <
typename T,
typename U>
459 template <
typename T,
typename U>
466 template <
typename T,
typename U>
472 template <
typename T,
typename U>
478 template <
typename T,
typename U>
485 template <
typename T,
typename U>
491 template <
typename T,
typename U>
497 template <
typename T,
typename U>
504 template <
typename T,
typename U>
510 template <
typename T,
typename U>
516 template <
typename T,
typename U>
523 template <
typename T,
typename U>
529 template <
typename T,
typename U>
535 template <
typename T,
typename U>
542 template <
typename T,
typename U>
548 template <
typename T,
typename U>
554 template <
typename T,
typename U>
561 template <
typename T,
typename U>
567 template <
typename T,
typename U>
573 template <
typename T,
typename U>
580 template <
typename T,
typename U>
586 template <
typename T,
typename U>
592 template <
typename T,
typename U>
599 template <
typename T,
typename U>
605 template <
typename T,
typename U>
611 template <
typename T,
typename U>
631 template <
typename T,
typename U>
640 template <
typename T,
typename U>
649 template <
typename T,
typename U>
658 template <
typename T,
typename U>
667 template <
typename T,
typename U>
676 template <
typename T,
typename U>
685 template <
typename T,
typename U>
694 template <
typename T,
typename U>
703 template <
typename T,
typename U>
712 template <
typename T,
typename U>
730 template <
typename T>
736 template <
typename T>
742 template <
typename T>
748 template <
typename T>
Boolean attribute value declarations.
Double attribute value declarations and template implementations.
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
TracedValue< T > & operator|=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
int64x64_t operator+(const int64x64_t &lhs)
Unary plus operator.
int64x64_t & operator/=(int64x64_t &lhs, const int64x64_t &rhs)
Compound division operator.
T m_v
The underlying value.
Unsigned integer attribute value declarations and template implementations.
void(* Uint32Callback)(const uint32_t oldValue, const uint32_t newValue)
TracedValue Callback signature for POD.
TracedValue & operator=(const TracedValue &o)
Assignment.
int64x64_t operator-(const int64x64_t &lhs)
Unary negation operator (change sign operator).
TracedValue< T > operator&(const TracedValue< T > &lhs, const TracedValue< U > &rhs)
Infix arithmetic operator for TracedValue.
Base class for Callback class.
void Disconnect(const CallbackBase &cb, std::string path)
Disconnect a Callback which was connected with context.
int64x64_t & operator+=(int64x64_t &lhs, const int64x64_t &rhs)
Compound addition operator.
void Set(const T &v)
Set the value of the underlying variable.
Trace classes with value semantics.
T Get(void) const
Get the underlying value.
bool operator>=(const int64x64_t &lhs, const int64x64_t &rhs)
Greater or equal operator.
TracedValue(const TracedValue< U > &other)
Copy from a TracedValue of a compatable type.
void(* Int16Callback)(const int16_t oldValue, const int16_t newValue)
TracedValue Callback signature for POD.
TracedValue< T > operator~(const TracedValue< T > &lhs)
Unary arithmetic operator for TracedValue.
ns3::TracedCallback declaration and template implementation.
void ConnectWithoutContext(const CallbackBase &cb)
Connect a Callback (without context.)
int64x64_t operator*(const int64x64_t &lhs, const int64x64_t &rhs)
Multiplication operator.
void Connect(const CallbackBase &cb, std::string path)
Connect a Callback with a context string.
TracedValue< T > operator^(const TracedValue< T > &lhs, const TracedValue< U > &rhs)
Infix arithmetic operator for TracedValue.
TracedValue()
Default constructor.
void(* DoubleCallback)(const double oldValue, const double newValue)
TracedValue Callback signature for POD.
void(* Uint16Callback)(const uint16_t oldValue, const uint16_t newValue)
TracedValue Callback signature for POD.
void DisconnectWithoutContext(const CallbackBase &callback)
Remove from the chain a Callback which was connected without a context.
Enum attribute value declarations.
void(* BoolCallback)(const bool oldValue, const bool newValue)
TracedValue Callback signature for POD.
TracedValue & operator--()
Pre/post- increment/decrement operator.
void Disconnect(const CallbackBase &callback, std::string path)
Remove from the chain a Callback which was connected with a context.
void(* Int8Callback)(const int8_t oldValue, const int8_t newValue)
TracedValue Callback signature for POD.
TracedValue(const U &other)
Copy from a variable type compatible with this underlying type.
TracedValue< T > & operator%=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
int64x64_t operator/(const int64x64_t &lhs, const int64x64_t &rhs)
Division operator.
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
int64x64_t & operator*=(int64x64_t &lhs, const int64x64_t &rhs)
Compound multiplication operator.
TracedValue< T > & operator>>=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
void(* Int32Callback)(const int32_t oldValue, const int32_t newValue)
TracedValue Callback signature for POD.
TracedValue< T > operator%(const TracedValue< T > &lhs, const TracedValue< U > &rhs)
Infix arithmetic operator for TracedValue.
TracedValue< T > & operator^=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
TracedValue(const T &v)
Construct from an explicit variable.
void Connect(const CallbackBase &callback, std::string path)
Append a Callback to the chain with a context.
TracedValue(const TracedValue &o)
Copy constructor.
void ConnectWithoutContext(const CallbackBase &callback)
Append a Callback to the chain (without a context).
void(* Uint8Callback)(const uint8_t oldValue, const uint8_t newValue)
TracedValue Callback signature for POD.
TracedValue< T > & operator&=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
bool operator>(const int64x64_t &lhs, const int64x64_t &rhs)
Greater operator.
bool operator==(const EventId &a, const EventId &b)
Integer attribute value declarations and template implementations.
void DisconnectWithoutContext(const CallbackBase &cb)
Disconnect a Callback which was connected without context.
#define TRACED_VALUE_DEBUG(x)
Logging macro for TracedValue.
TracedValue< T > operator|(const TracedValue< T > &lhs, const TracedValue< U > &rhs)
Infix arithmetic operator for TracedValue.
TracedValue & operator++()
Pre/post- increment/decrement operator.
TracedCallback< T, T > m_cb
The connected Callback.
int64x64_t operator!(const int64x64_t &lhs)
Logical not operator.
int64x64_t & operator-=(int64x64_t &lhs, const int64x64_t &rhs)
Compound subtraction operator.