A Discrete-Event Network Simulator
API
traced-value.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006,2007 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 #ifndef TRACED_VALUE_H
21 #define TRACED_VALUE_H
22 
23 #include "traced-callback.h"
24 #include "integer.h"
25 #include "uinteger.h"
26 #include "boolean.h"
27 #include "double.h"
28 #include "enum.h"
29 
48 #define TRACED_VALUE_DEBUG(x)
49 
50 namespace ns3 {
51 
70 namespace TracedValueCallback {
71 
82 typedef void (* Bool) (bool oldValue, bool newValue);
83 typedef void (* Int8) (int8_t oldValue, int8_t newValue);
84 typedef void (* Uint8) (uint8_t oldValue, uint8_t newValue);
85 typedef void (* Int16) (int16_t oldValue, int16_t newValue);
86 typedef void (* Uint16)(uint16_t oldValue, uint16_t newValue);
87 typedef void (* Int32) (int32_t oldValue, int32_t newValue);
88 typedef void (* Uint32)(uint32_t oldValue, uint32_t newValue);
89 typedef void (* Int64) (int64_t oldValue, int64_t newValue);
90 typedef void (* Uint64)(uint64_t oldValue, uint64_t newValue);
91 typedef void (* Double)(double oldValue, double newValue);
94 typedef void (* Void) (void);
97 } // namespace TracedValueCallback
98 
99 
115 template <typename T>
117 {
118 public:
121  : m_v ()
122  {}
128  : m_v (o.m_v)
129  {}
134  TracedValue (const T &v)
135  : m_v (v)
136  {}
141  operator T () const {
142  return m_v;
143  }
150  {
151  TRACED_VALUE_DEBUG ("x=");
152  Set (o.m_v);
153  return *this;
154  }
160  template <typename U>
162  : m_v (other.Get ())
163  {}
169  template <typename U>
170  TracedValue (const U &other)
171  : m_v ((T)other)
172  {}
179  {
181  }
191  void Connect (const CallbackBase &cb, std::string path)
192  {
193  m_cb.Connect (cb, path);
194  }
201  {
203  }
210  void Disconnect (const CallbackBase &cb, std::string path)
211  {
212  m_cb.Disconnect (cb, path);
213  }
220  void Set (const T &v)
221  {
222  if (m_v != v)
223  {
224  m_cb (m_v, v);
225  m_v = v;
226  }
227  }
232  T Get (void) const
233  {
234  return m_v;
235  }
244  {
245  TRACED_VALUE_DEBUG ("++x");
246  T tmp = Get ();
247  ++tmp;
248  Set (tmp);
249  return *this;
250  }
252  {
253  TRACED_VALUE_DEBUG ("--x");
254  T tmp = Get ();
255  --tmp;
256  Set (tmp);
257  return *this;
258  }
260  {
261  TRACED_VALUE_DEBUG ("x++");
262  TracedValue old (*this);
263  T tmp = Get ();
264  tmp++;
265  Set (tmp);
266  return old;
267  }
269  {
270  TRACED_VALUE_DEBUG ("x--");
271  TracedValue old (*this);
272  T tmp = Get ();
273  tmp--;
274  Set (tmp);
275  return old;
276  }
279 private:
281  T m_v;
284 };
285 
286 
287 /********************************************************************
288  Operator implementations for TracedValue
289  ********************************************************************/
290 
305 template <typename T>
306 std::ostream& operator << (std::ostream& os, const TracedValue<T>& rhs)
307 {
308  return os << rhs.Get ();
309 }
310 
319 template <typename T, typename U>
320 bool operator == (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
321 {
322  TRACED_VALUE_DEBUG ("x==x");
323  return lhs.Get () == rhs.Get ();
324 }
326 template <typename T, typename U>
327 bool operator == (const TracedValue<T> &lhs, const U &rhs)
328 {
329  TRACED_VALUE_DEBUG ("x==");
330  return lhs.Get () == rhs;
331 }
333 template <typename T, typename U>
334 bool operator == (const U &lhs, const TracedValue<T> &rhs)
335 {
336  TRACED_VALUE_DEBUG ("==x");
337  return lhs == rhs.Get ();
338 }
339 
341 template <typename T, typename U>
342 bool operator != (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
343 {
344  TRACED_VALUE_DEBUG ("x!=x");
345  return lhs.Get () != rhs.Get ();
346 }
348 template <typename T, typename U>
349 bool operator != (const TracedValue<T> &lhs, const U &rhs)
350 {
351  TRACED_VALUE_DEBUG ("x!=");
352  return lhs.Get () != rhs;
353 }
355 template <typename T, typename U>
356 bool operator != (const U &lhs, const TracedValue<T> &rhs)
357 {
358  TRACED_VALUE_DEBUG ("!=x");
359  return lhs != rhs.Get ();
360 }
361 
363 template <typename T, typename U>
364 bool operator <= (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
365 {
366  TRACED_VALUE_DEBUG ("x<=x");
367  return lhs.Get () <= rhs.Get ();
368 }
370 template <typename T, typename U>
371 bool operator <= (const TracedValue<T> &lhs, const U &rhs)
372 {
373  TRACED_VALUE_DEBUG ("x<=");
374  return lhs.Get () <= rhs;
375 }
377 template <typename T, typename U>
378 bool operator <= (const U &lhs, const TracedValue<T> &rhs)
379 {
380  TRACED_VALUE_DEBUG ("<=x");
381  return lhs <= rhs.Get ();
382 }
384 template <typename T, typename U>
385 bool operator >= (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
386 {
387  TRACED_VALUE_DEBUG ("x>=x");
388  return lhs.Get () >= rhs.Get ();
389 }
391 template <typename T, typename U>
392 bool operator >= (const TracedValue<T> &lhs, const U &rhs)
393 {
394  TRACED_VALUE_DEBUG ("x>=");
395  return lhs.Get () >= rhs;
396 }
398 template <typename T, typename U>
399 bool operator >= (const U &lhs, const TracedValue<T> &rhs)
400 {
401  TRACED_VALUE_DEBUG (">=x");
402  return lhs >= rhs.Get ();
403 }
404 
406 template <typename T, typename U>
407 bool operator < (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
408 {
409  TRACED_VALUE_DEBUG ("x<x");
410  return lhs.Get () < rhs.Get ();
411 }
413 template <typename T, typename U>
414 bool operator < (const TracedValue<T> &lhs, const U &rhs)
415 {
416  TRACED_VALUE_DEBUG ("x<");
417  return lhs.Get () < rhs;
418 }
420 template <typename T, typename U>
421 bool operator < (const U &lhs, const TracedValue<T> &rhs)
422 {
423  TRACED_VALUE_DEBUG ("<x");
424  return lhs < rhs.Get ();
425 }
427 template <typename T, typename U>
428 bool operator > (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
429 {
430  TRACED_VALUE_DEBUG ("x>x");
431  return lhs.Get () > rhs.Get ();
432 }
434 template <typename T, typename U>
435 bool operator > (const TracedValue<T> &lhs, const U &rhs)
436 {
437  TRACED_VALUE_DEBUG ("x>");
438  return lhs.Get () > rhs;
439 }
441 template <typename T, typename U>
442 bool operator > (const U &lhs, const TracedValue<T> &rhs)
443 {
444  TRACED_VALUE_DEBUG (">x");
445  return lhs > rhs.Get ();
446 }
447 
448 
462 template <typename T, typename U>
463 auto operator + (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () + rhs.Get ())>
464 {
465  TRACED_VALUE_DEBUG ("x+x");
466  return TracedValue<decltype(lhs.Get () + rhs.Get ())> (lhs.Get () + rhs.Get ());
467 }
469 template <typename T, typename U>
470 auto operator + (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () + rhs)>
471 {
472  TRACED_VALUE_DEBUG ("x+");
473  return TracedValue<decltype(lhs.Get () + rhs)> (lhs.Get () + rhs);
474 }
476 template <typename T, typename U>
477 auto operator + (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs + rhs.Get ())>
478 {
479  TRACED_VALUE_DEBUG ("+x");
480  return TracedValue<decltype(lhs + rhs.Get ())> (lhs + rhs.Get ());
481 }
482 
484 template <typename T, typename U>
485 auto operator - (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () - rhs.Get ())>
486 {
487  TRACED_VALUE_DEBUG ("x-x");
488  return TracedValue<decltype(lhs.Get () - rhs.Get ())> (lhs.Get () - rhs.Get ());
489 }
491 template <typename T, typename U>
492 auto operator - (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () - rhs)>
493 {
494  TRACED_VALUE_DEBUG ("x-");
495  return TracedValue<decltype(lhs.Get () - rhs)> (lhs.Get () - rhs);
496 }
498 template <typename T, typename U>
499 auto operator - (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs - rhs.Get ())>
500 {
501  TRACED_VALUE_DEBUG ("-x");
502  return TracedValue<decltype(lhs - rhs.Get ())> (lhs - rhs.Get ());
503 }
504 
506 template <typename T, typename U>
507 auto operator * (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () * rhs.Get ())>
508 {
509  TRACED_VALUE_DEBUG ("x*x");
510  return TracedValue<decltype(lhs.Get () * rhs.Get ())> (lhs.Get () * rhs.Get ());
511 }
513 template <typename T, typename U>
514 auto operator * (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () * rhs)>
515 {
516  TRACED_VALUE_DEBUG ("x*");
517  return TracedValue<decltype(lhs.Get () * rhs)> (lhs.Get () * rhs);
518 }
520 template <typename T, typename U>
521 auto operator * (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs + rhs.Get ())>
522 {
523  TRACED_VALUE_DEBUG ("*x");
524  return TracedValue<decltype(lhs + rhs.Get ())> (lhs * rhs.Get ());
525 }
526 
528 template <typename T, typename U>
529 auto operator / (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () / rhs.Get ())>
530 {
531  TRACED_VALUE_DEBUG ("x/x");
532  return TracedValue<decltype(lhs.Get () / rhs.Get ())> (lhs.Get () / rhs.Get ());
533 }
535 template <typename T, typename U>
536 auto operator / (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () / rhs)>
537 {
538  TRACED_VALUE_DEBUG ("x/");
539  return TracedValue<decltype(lhs.Get () / rhs)> (lhs.Get () / rhs);
540 }
542 template <typename T, typename U>
543 auto operator / (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs / rhs.Get ())>
544 {
545  TRACED_VALUE_DEBUG ("/x");
546  return TracedValue<decltype(lhs / rhs.Get ())> (lhs / rhs.Get ());
547 }
548 
550 template <typename T, typename U>
551 auto operator % (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () % rhs.Get ())>
552 {
553  TRACED_VALUE_DEBUG ("x%x");
554  return TracedValue<decltype(lhs.Get () % rhs.Get ())> (lhs.Get () % rhs.Get ());
555 }
557 template <typename T, typename U>
558 auto operator % (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () % rhs)>
559 {
560  TRACED_VALUE_DEBUG ("x%");
561  return TracedValue<decltype(lhs.Get () % rhs)> (lhs.Get () % rhs);
562 }
564 template <typename T, typename U>
565 auto operator % (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs % rhs.Get ())>
566 {
567  TRACED_VALUE_DEBUG ("%x");
568  return TracedValue<decltype(lhs % rhs.Get ())> (lhs % rhs.Get ());
569 }
570 
572 template <typename T, typename U>
573 auto operator ^ (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () ^ rhs.Get ())>
574 {
575  TRACED_VALUE_DEBUG ("x^x");
576  return TracedValue<decltype(lhs.Get () ^ rhs.Get ())> (lhs.Get () ^ rhs.Get ());
577 }
579 template <typename T, typename U>
580 auto operator ^ (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () ^ rhs)>
581 {
582  TRACED_VALUE_DEBUG ("x^");
583  return TracedValue<decltype(lhs.Get () ^ rhs)> (lhs.Get () ^ rhs);
584 }
586 template <typename T, typename U>
587 auto operator ^ (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs ^ rhs.Get ())>
588 {
589  TRACED_VALUE_DEBUG ("^x");
590  return TracedValue<decltype(lhs ^ rhs.Get ())> (lhs ^ rhs.Get ());
591 }
592 
594 template <typename T, typename U>
595 auto operator | (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () | rhs.Get ())>
596 {
597  TRACED_VALUE_DEBUG ("x|x");
598  return TracedValue<decltype(lhs.Get () | rhs.Get ())> (lhs.Get () | rhs.Get ());
599 }
601 template <typename T, typename U>
602 auto operator | (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () | rhs)>
603 {
604  TRACED_VALUE_DEBUG ("x|");
605  return TracedValue<decltype(lhs.Get () | rhs)> (lhs.Get () | rhs);
606 }
608 template <typename T, typename U>
609 auto operator | (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs | rhs.Get ())>
610 {
611  TRACED_VALUE_DEBUG ("|x");
612  return TracedValue<decltype(lhs | rhs.Get ())> (lhs | rhs.Get ());
613 }
614 
616 template <typename T, typename U>
617 auto operator & (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () & rhs.Get ())>
618 {
619  TRACED_VALUE_DEBUG ("x&x");
620  return TracedValue<decltype(lhs.Get () & rhs.Get ())> (lhs.Get () & rhs.Get ());
621 }
623 template <typename T, typename U>
624 auto operator & (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () & rhs)>
625 {
626  TRACED_VALUE_DEBUG ("x&");
627  return TracedValue<decltype(lhs.Get () & rhs)> (lhs.Get () & rhs);
628 }
630 template <typename T, typename U>
631 auto operator & (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs & rhs.Get ())>
632 {
633  TRACED_VALUE_DEBUG ("&x");
634  return TracedValue<decltype(lhs & rhs.Get ())> (lhs & rhs.Get ());
635 }
636 
638 template <typename T, typename U>
639 auto operator << (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () << rhs.Get ())>
640 {
641  TRACED_VALUE_DEBUG ("x<<x");
642  return TracedValue<decltype(lhs.Get () << rhs.Get ())> (lhs.Get () << rhs.Get ());
643 }
645 template <typename T, typename U>
646 auto operator << (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () << rhs)>
647 {
648  TRACED_VALUE_DEBUG ("x<<");
649  return TracedValue<decltype(lhs.Get () << rhs)> (lhs.Get () << rhs);
650 }
652 template <typename T, typename U>
653 auto operator << (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs << rhs.Get ())>
654 {
655  TRACED_VALUE_DEBUG ("<<x");
656  return TracedValue<decltype(lhs << rhs.Get ())> (lhs << rhs.Get ());
657 }
658 
660 template <typename T, typename U>
661 auto operator >> (const TracedValue<T> &lhs, const TracedValue<U> &rhs)->TracedValue<decltype(lhs.Get () >> rhs.Get ())>
662 {
663  TRACED_VALUE_DEBUG ("x>>x");
664  return TracedValue<decltype(lhs.Get () >> rhs.Get ())> (lhs.Get () >> rhs.Get ());
665 }
667 template <typename T, typename U>
668 auto operator >> (const TracedValue<T> &lhs, const U &rhs)->TracedValue<decltype(lhs.Get () >> rhs)>
669 {
670  TRACED_VALUE_DEBUG ("x>>");
671  return TracedValue<decltype(lhs.Get () >> rhs)> (lhs.Get () >> rhs);
672 }
674 template <typename T, typename U>
675 auto operator >> (const U &lhs, const TracedValue<T> &rhs)->TracedValue<decltype(lhs >> rhs.Get ())>
676 {
677  TRACED_VALUE_DEBUG (">>x");
678  return TracedValue<decltype(lhs >> rhs.Get ())> (lhs >> rhs.Get ());
679 }
680 
695 template <typename T, typename U>
697 {
698  TRACED_VALUE_DEBUG ("x+=");
699  T tmp = lhs.Get ();
700  tmp += rhs;
701  lhs.Set (tmp);
702  return lhs;
703 }
705 template <typename T, typename U>
707 {
708  TRACED_VALUE_DEBUG ("x-=");
709  T tmp = lhs.Get ();
710  tmp -= rhs;
711  lhs.Set (tmp);
712  return lhs;
713 }
715 template <typename T, typename U>
717 {
718  TRACED_VALUE_DEBUG ("x*=");
719  T tmp = lhs.Get ();
720  tmp *= rhs;
721  lhs.Set (tmp);
722  return lhs;
723 }
725 template <typename T, typename U>
727 {
728  TRACED_VALUE_DEBUG ("x/=");
729  T tmp = lhs.Get ();
730  tmp /= rhs;
731  lhs.Set (tmp);
732  return lhs;
733 }
735 template <typename T, typename U>
737 {
738  TRACED_VALUE_DEBUG ("x%=");
739  T tmp = lhs.Get ();
740  tmp %= rhs;
741  lhs.Set (tmp);
742  return lhs;
743 }
745 template <typename T, typename U>
746 TracedValue<T> &operator <<= (TracedValue<T> &lhs, const U &rhs)
747 {
748  TRACED_VALUE_DEBUG ("x<<=");
749  T tmp = lhs.Get ();
750  tmp <<= rhs;
751  lhs.Set (tmp);
752  return lhs;
753 }
755 template <typename T, typename U>
757 {
758  TRACED_VALUE_DEBUG ("x>>=");
759  T tmp = lhs.Get ();
760  tmp >>= rhs;
761  lhs.Set (tmp);
762  return lhs;
763 }
765 template <typename T, typename U>
767 {
768  TRACED_VALUE_DEBUG ("x&=");
769  T tmp = lhs.Get ();
770  tmp &= rhs;
771  lhs.Set (tmp);
772  return lhs;
773 }
775 template <typename T, typename U>
777 {
778  TRACED_VALUE_DEBUG ("x|=");
779  T tmp = lhs.Get ();
780  tmp |= rhs;
781  lhs.Set (tmp);
782  return lhs;
783 }
785 template <typename T, typename U>
787 {
788  TRACED_VALUE_DEBUG ("x^=");
789  T tmp = lhs.Get ();
790  tmp ^= rhs;
791  lhs.Set (tmp);
792  return lhs;
793 }
794 
795 
804 template <typename T>
806 {
807  TRACED_VALUE_DEBUG ("(+x)");
808  return TracedValue<T> (+lhs.Get ());
809 }
811 template <typename T>
813 {
814  TRACED_VALUE_DEBUG ("(-x)");
815  return TracedValue<T> (-lhs.Get ());
816 }
818 template <typename T>
820 {
821  TRACED_VALUE_DEBUG ("(~x)");
822  return TracedValue<T> (~lhs.Get ());
823 }
825 template <typename T>
827 {
828  TRACED_VALUE_DEBUG ("(!x)");
829  return TracedValue<T> (!lhs.Get ());
830 }
831  // \ingroup tracing
833 
834 } // namespace ns3
835 
836 #endif /* TRACED_VALUE_H */
ns3::BooleanValue attribute value declarations.
Base class for Callback class.
Definition: callback.h:1196
void Disconnect(const CallbackBase &callback, std::string path)
Remove from the chain a Callback which was connected with a context.
void ConnectWithoutContext(const CallbackBase &callback)
Append a Callback to the chain (without a context).
void DisconnectWithoutContext(const CallbackBase &callback)
Remove from the chain a Callback which was connected without a context.
void Connect(const CallbackBase &callback, std::string path)
Append a Callback to the chain with a context.
Trace classes with value semantics.
Definition: traced-value.h:117
TracedValue(const T &v)
Construct from an explicit variable.
Definition: traced-value.h:134
TracedCallback< T, T > m_cb
The connected Callback.
Definition: traced-value.h:283
void DisconnectWithoutContext(const CallbackBase &cb)
Disconnect a Callback which was connected without context.
Definition: traced-value.h:200
T m_v
The underlying value.
Definition: traced-value.h:281
void Connect(const CallbackBase &cb, std::string path)
Connect a Callback with a context string.
Definition: traced-value.h:191
void Disconnect(const CallbackBase &cb, std::string path)
Disconnect a Callback which was connected with context.
Definition: traced-value.h:210
TracedValue & operator--()
Pre/post- increment/decrement operator.
Definition: traced-value.h:251
TracedValue(const TracedValue &o)
Copy constructor.
Definition: traced-value.h:127
void ConnectWithoutContext(const CallbackBase &cb)
Connect a Callback (without context.)
Definition: traced-value.h:178
TracedValue()
Default constructor.
Definition: traced-value.h:120
TracedValue & operator++()
Pre/post- increment/decrement operator.
Definition: traced-value.h:243
TracedValue(const U &other)
Copy from a variable type compatible with this underlying type.
Definition: traced-value.h:170
void Set(const T &v)
Set the value of the underlying variable.
Definition: traced-value.h:220
TracedValue(const TracedValue< U > &other)
Copy from a TracedValue of a compatible type.
Definition: traced-value.h:161
TracedValue & operator=(const TracedValue &o)
Assignment.
Definition: traced-value.h:149
T Get(void) const
Get the underlying value.
Definition: traced-value.h:232
ns3::DoubleValue attribute value declarations and template implementations.
ns3::EnumValue attribute value declarations.
int64x64_t operator/(const int64x64_t &lhs, const int64x64_t &rhs)
Division operator.
Definition: int64x64.h:131
bool operator>=(const int64x64_t &lhs, const int64x64_t &rhs)
Greater or equal operator.
Definition: int64x64.h:166
bool operator<=(const int64x64_t &lhs, const int64x64_t &rhs)
Less or equal operator.
Definition: int64x64.h:155
int64x64_t operator-(const int64x64_t &lhs, const int64x64_t &rhs)
Subtraction operator.
Definition: int64x64.h:103
int64x64_t operator+(const int64x64_t &lhs, const int64x64_t &rhs)
Addition operator.
Definition: int64x64.h:89
int64x64_t operator*(const int64x64_t &lhs, const int64x64_t &rhs)
Multiplication operator.
Definition: int64x64.h:117
bool operator>(const Length &left, const Length &right)
Check if left has a value greater than right.
Definition: length.cc:413
TracedValue< T > & operator|=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:776
TracedValue< T > & operator>>=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:756
TracedValue< T > & operator^=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:786
TracedValue< T > operator~(const TracedValue< T > &lhs)
Unary arithmetic operator for TracedValue.
Definition: traced-value.h:819
auto operator^(const TracedValue< T > &lhs, const TracedValue< U > &rhs) -> TracedValue< decltype(lhs.Get() ^ rhs.Get())>
Infix arithmetic operator for TracedValue.
Definition: traced-value.h:573
TracedValue< T > & operator%=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:736
auto operator|(const TracedValue< T > &lhs, const TracedValue< U > &rhs) -> TracedValue< decltype(lhs.Get()|rhs.Get())>
Infix arithmetic operator for TracedValue.
Definition: traced-value.h:595
TracedValue< T > & operator<<=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:746
TracedValue< T > operator!(const TracedValue< T > &lhs)
Unary arithmetic operator for TracedValue.
Definition: traced-value.h:826
TracedValue< T > & operator*=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:716
TracedValue< T > & operator&=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:766
TracedValue< T > & operator/=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:726
auto operator&(const TracedValue< T > &lhs, const TracedValue< U > &rhs) -> TracedValue< decltype(lhs.Get() &rhs.Get())>
Infix arithmetic operator for TracedValue.
Definition: traced-value.h:617
ns3::IntegerValue attribute value declarations and template implementations.
void(* Uint16)(uint16_t oldValue, uint16_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:86
void(* Bool)(bool oldValue, bool newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:82
void(* Int8)(int8_t oldValue, int8_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:83
void(* Int16)(int16_t oldValue, int16_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:85
void(* Void)(void)
TracedValue Callback signature for void.
Definition: traced-value.h:94
void(* Uint8)(uint8_t oldValue, uint8_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:84
void(* Int64)(int64_t oldValue, int64_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:89
void(* Uint32)(uint32_t oldValue, uint32_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:88
void(* Uint64)(uint64_t oldValue, uint64_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:90
void(* Int32)(int32_t oldValue, int32_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:87
void(* Double)(double oldValue, double newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:91
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Time operator%(const Time &lhs, const Time &rhs)
Remainder (modulus) from the quotient of two Times.
Definition: nstime.h:1073
bool operator==(const EventId &a, const EventId &b)
Definition: event-id.h:158
Time & operator+=(Time &lhs, const Time &rhs)
Compound addition assignment for Time.
Definition: nstime.h:1115
bool operator<(const EventId &a, const EventId &b)
Definition: event-id.h:176
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.
Definition: callback.h:1612
std::istream & operator>>(std::istream &is, Angles &a)
Definition: angles.cc:162
Time & operator-=(Time &lhs, const Time &rhs)
Compound subtraction assignment for Time.
Definition: nstime.h:1126
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:139
ns3::TracedCallback declaration and template implementation.
#define TRACED_VALUE_DEBUG(x)
Logging macro for TracedValue.
Definition: traced-value.h:48
ns3::UintegerValue attribute value declarations and template implementations.