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 (* Double)(double oldValue, double newValue);
90  typedef void (* Void) (void);
92 } // namespace TracedValueCallback
93 
94 
110 template <typename T>
112 {
113 public:
116  : m_v () {}
122  : m_v (o.m_v) {}
127  TracedValue (const T &v)
128  : m_v (v) {}
133  operator T () const {
134  return m_v;
135  }
141  TracedValue &operator = (const TracedValue &o) {
142  TRACED_VALUE_DEBUG ("x=");
143  Set (o.m_v);
144  return *this;
145  }
151  template <typename U>
153  : m_v (other.Get ())
154  {}
160  template <typename U>
161  TracedValue (const U &other)
162  : m_v ((T)other)
163  {}
170  m_cb.ConnectWithoutContext (cb);
171  }
181  void Connect (const CallbackBase &cb, std::string path) {
182  m_cb.Connect (cb, path);
183  }
190  m_cb.DisconnectWithoutContext (cb);
191  }
198  void Disconnect (const CallbackBase &cb, std::string path) {
199  m_cb.Disconnect (cb, path);
200  }
207  void Set (const T &v) {
208  if (m_v != v)
209  {
210  m_cb (m_v, v);
211  m_v = v;
212  }
213  }
218  T Get (void) const {
219  return m_v;
220  }
228  TracedValue &operator++ () {
229  TRACED_VALUE_DEBUG ("++x");
230  T tmp = Get ();
231  ++tmp;
232  Set (tmp);
233  return *this;
234  }
235  TracedValue &operator-- () {
236  TRACED_VALUE_DEBUG ("--x");
237  T tmp = Get ();
238  --tmp;
239  Set (tmp);
240  return *this;
241  }
242  TracedValue operator++ (int) {
243  TRACED_VALUE_DEBUG ("x++");
244  TracedValue old (*this);
245  T tmp = Get ();
246  tmp++;
247  Set (tmp);
248  return old;
249  }
250  TracedValue operator-- (int) {
251  TRACED_VALUE_DEBUG ("x--");
252  TracedValue old (*this);
253  T tmp = Get ();
254  tmp--;
255  Set (tmp);
256  return old;
257  }
260 private:
262  T m_v;
265 };
266 
267 
268 /********************************************************************
269  Operator implementations for TracedValue
270  ********************************************************************/
271 
286 template <typename T>
287 std::ostream& operator << (std::ostream& os, const TracedValue<T>& rhs)
288 {
289  return os<<rhs.Get ();
290 }
291 
300 template <typename T, typename U>
301 bool operator == (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
302 {
303  TRACED_VALUE_DEBUG ("x==x");
304  return lhs.Get () == rhs.Get ();
305 }
307 template <typename T, typename U>
308 bool operator == (const TracedValue<T> &lhs, const U &rhs)
309 {
310  TRACED_VALUE_DEBUG ("x==");
311  return lhs.Get () == rhs;
312 }
314 template <typename T, typename U>
315 bool operator == (const U &lhs, const TracedValue<T> &rhs)
316 {
317  TRACED_VALUE_DEBUG ("==x");
318  return lhs == rhs.Get ();
319 }
320 
322 template <typename T, typename U>
323 bool operator != (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
324 {
325  TRACED_VALUE_DEBUG ("x!=x");
326  return lhs.Get () != rhs.Get ();
327 }
329 template <typename T, typename U>
330 bool operator != (const TracedValue<T> &lhs, const U &rhs)
331 {
332  TRACED_VALUE_DEBUG ("x!=");
333  return lhs.Get () != rhs;
334 }
336 template <typename T, typename U>
337 bool operator != (const U &lhs, const TracedValue<T> &rhs)
338 {
339  TRACED_VALUE_DEBUG ("!=x");
340  return lhs != rhs.Get ();
341 }
342 
344 template <typename T, typename U>
345 bool operator <= (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
346 {
347  TRACED_VALUE_DEBUG ("x<=x");
348  return lhs.Get () <= rhs.Get ();
349 }
351 template <typename T, typename U>
352 bool operator <= (const TracedValue<T> &lhs, const U &rhs)
353 {
354  TRACED_VALUE_DEBUG ("x<=");
355  return lhs.Get () <= rhs;
356 }
358 template <typename T, typename U>
359 bool operator <= (const U &lhs, const TracedValue<T> &rhs)
360 {
361  TRACED_VALUE_DEBUG ("<=x");
362  return lhs <= rhs.Get ();
363 }
365 template <typename T, typename U>
366 bool operator >= (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
367 {
368  TRACED_VALUE_DEBUG ("x>=x");
369  return lhs.Get () >= rhs.Get ();
370 }
372 template <typename T, typename U>
373 bool operator >= (const TracedValue<T> &lhs, const U &rhs)
374 {
375  TRACED_VALUE_DEBUG ("x>=");
376  return lhs.Get () >= rhs;
377 }
379 template <typename T, typename U>
380 bool operator >= (const U &lhs, const TracedValue<T> &rhs)
381 {
382  TRACED_VALUE_DEBUG (">=x");
383  return lhs >= rhs.Get ();
384 }
385 
387 template <typename T, typename U>
388 bool operator < (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
389 {
390  TRACED_VALUE_DEBUG ("x<x");
391  return lhs.Get () < rhs.Get ();
392 }
394 template <typename T, typename U>
395 bool operator < (const TracedValue<T> &lhs, const U &rhs)
396 {
397  TRACED_VALUE_DEBUG ("x<");
398  return lhs.Get () < rhs;
399 }
401 template <typename T, typename U>
402 bool operator < (const U &lhs, const TracedValue<T> &rhs)
403 {
404  TRACED_VALUE_DEBUG ("<x");
405  return lhs < rhs.Get ();
406 }
408 template <typename T, typename U>
409 bool operator > (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
410 {
411  TRACED_VALUE_DEBUG ("x>x");
412  return lhs.Get () > rhs.Get ();
413 }
415 template <typename T, typename U>
416 bool operator > (const TracedValue<T> &lhs, const U &rhs)
417 {
418  TRACED_VALUE_DEBUG ("x>");
419  return lhs.Get () > rhs;
420 }
422 template <typename T, typename U>
423 bool operator > (const U &lhs, const TracedValue<T> &rhs)
424 {
425  TRACED_VALUE_DEBUG (">x");
426  return lhs > rhs.Get ();
427 }
428 
429 
443 template <typename T, typename U>
444 auto operator + (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() + rhs.Get())> {
445  TRACED_VALUE_DEBUG ("x+x");
446  return TracedValue<decltype(lhs.Get() + rhs.Get())>(lhs.Get () + rhs.Get ());
447 }
449 template <typename T, typename U>
450 auto operator + (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() + rhs)> {
451  TRACED_VALUE_DEBUG ("x+");
452  return TracedValue<decltype(lhs.Get() + rhs)>(lhs.Get () + rhs);
453 }
455 template <typename T, typename U>
456 auto operator + (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs + rhs.Get())> {
457  TRACED_VALUE_DEBUG ("+x");
458  return TracedValue<decltype(lhs + rhs.Get())>(lhs + rhs.Get ());
459 }
460 
462 template <typename T, typename U>
463 auto operator - (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() - rhs.Get())> {
464  TRACED_VALUE_DEBUG ("x-x");
465  return TracedValue<decltype(lhs.Get() - rhs.Get())>(lhs.Get () - rhs.Get ());
466 }
468 template <typename T, typename U>
469 auto operator - (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() - rhs)> {
470  TRACED_VALUE_DEBUG ("x-");
471  return TracedValue<decltype(lhs.Get() - rhs)>(lhs.Get () - rhs);
472 }
474 template <typename T, typename U>
475 auto operator - (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs - rhs.Get())> {
476  TRACED_VALUE_DEBUG ("-x");
477  return TracedValue<decltype(lhs - rhs.Get())>(lhs - rhs.Get ());
478 }
479 
481 template <typename T, typename U>
482 auto operator * (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() * rhs.Get())> {
483  TRACED_VALUE_DEBUG ("x*x");
484  return TracedValue<decltype(lhs.Get() * rhs.Get())>(lhs.Get () * rhs.Get ());
485 }
487 template <typename T, typename U>
488 auto operator * (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() * rhs)> {
489  TRACED_VALUE_DEBUG ("x*");
490  return TracedValue<decltype(lhs.Get() * rhs)>(lhs.Get () * rhs);
491 }
493 template <typename T, typename U>
494 auto operator * (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs + rhs.Get())> {
495  TRACED_VALUE_DEBUG ("*x");
496  return TracedValue<decltype(lhs + rhs.Get())>(lhs * rhs.Get ());
497 }
498 
500 template <typename T, typename U>
501 auto operator / (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() / rhs.Get())> {
502  TRACED_VALUE_DEBUG ("x/x");
503  return TracedValue<decltype(lhs.Get() / rhs.Get())>(lhs.Get () / rhs.Get ());
504 }
506 template <typename T, typename U>
507 auto operator / (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() / rhs)> {
508  TRACED_VALUE_DEBUG ("x/");
509  return TracedValue<decltype(lhs.Get() / rhs)>(lhs.Get () / rhs);
510 }
512 template <typename T, typename U>
513 auto operator / (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs / rhs.Get())> {
514  TRACED_VALUE_DEBUG ("/x");
515  return TracedValue<decltype(lhs / rhs.Get())>(lhs / rhs.Get ());
516 }
517 
519 template <typename T, typename U>
520 auto operator % (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() % rhs.Get())> {
521  TRACED_VALUE_DEBUG ("x%x");
522  return TracedValue<decltype(lhs.Get() % rhs.Get())>(lhs.Get () % rhs.Get ());
523 }
525 template <typename T, typename U>
526 auto operator % (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() % rhs)> {
527  TRACED_VALUE_DEBUG ("x%");
528  return TracedValue<decltype(lhs.Get() % rhs)>(lhs.Get () % rhs);
529 }
531 template <typename T, typename U>
532 auto operator % (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs % rhs.Get())> {
533  TRACED_VALUE_DEBUG ("%x");
534  return TracedValue<decltype(lhs % rhs.Get())>(lhs % rhs.Get ());
535 }
536 
538 template <typename T, typename U>
539 auto operator ^ (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() ^ rhs.Get())> {
540  TRACED_VALUE_DEBUG ("x^x");
541  return TracedValue<decltype(lhs.Get() ^ rhs.Get())>(lhs.Get () ^ rhs.Get ());
542 }
544 template <typename T, typename U>
545 auto operator ^ (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() ^ rhs)> {
546  TRACED_VALUE_DEBUG ("x^");
547  return TracedValue<decltype(lhs.Get() ^ rhs)>(lhs.Get () ^ rhs);
548 }
550 template <typename T, typename U>
551 auto operator ^ (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs ^ rhs.Get())> {
552  TRACED_VALUE_DEBUG ("^x");
553  return TracedValue<decltype(lhs ^ rhs.Get())>(lhs ^ rhs.Get ());
554 }
555 
557 template <typename T, typename U>
558 auto operator | (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() | rhs.Get())> {
559  TRACED_VALUE_DEBUG ("x|x");
560  return TracedValue<decltype(lhs.Get() | rhs.Get())>(lhs.Get () | rhs.Get ());
561 }
563 template <typename T, typename U>
564 auto operator | (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() | rhs)> {
565  TRACED_VALUE_DEBUG ("x|");
566  return TracedValue<decltype(lhs.Get() | rhs)>(lhs.Get () | rhs);
567 }
569 template <typename T, typename U>
570 auto operator | (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs | rhs.Get())> {
571  TRACED_VALUE_DEBUG ("|x");
572  return TracedValue<decltype(lhs | rhs.Get())>(lhs | rhs.Get ());
573 }
574 
576 template <typename T, typename U>
577 auto operator & (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() & rhs.Get())> {
578  TRACED_VALUE_DEBUG ("x&x");
579  return TracedValue<decltype(lhs.Get() & rhs.Get())>(lhs.Get () & rhs.Get ());
580 }
582 template <typename T, typename U>
583 auto operator & (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() & rhs)> {
584  TRACED_VALUE_DEBUG ("x&");
585  return TracedValue<decltype(lhs.Get() & rhs)>(lhs.Get () & rhs);
586 }
588 template <typename T, typename U>
589 auto operator & (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs & rhs.Get())> {
590  TRACED_VALUE_DEBUG ("&x");
591  return TracedValue<decltype(lhs & rhs.Get())>(lhs & rhs.Get ());
592 }
593 
595 template <typename T, typename U>
596 auto operator << (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() << rhs.Get())> {
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  TRACED_VALUE_DEBUG ("x<<");
604  return TracedValue<decltype(lhs.Get() << rhs)>(lhs.Get () << rhs);
605 }
607 template <typename T, typename U>
608 auto operator << (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs << rhs.Get())> {
609  TRACED_VALUE_DEBUG ("<<x");
610  return TracedValue<decltype(lhs << rhs.Get())>(lhs << rhs.Get ());
611 }
612 
614 template <typename T, typename U>
615 auto operator >> (const TracedValue<T> &lhs, const TracedValue<U> &rhs) -> TracedValue<decltype(lhs.Get() >> rhs.Get())> {
616  TRACED_VALUE_DEBUG ("x>>x");
617  return TracedValue<decltype(lhs.Get() >> rhs.Get())>(lhs.Get () >> rhs.Get ());
618 }
620 template <typename T, typename U>
621 auto operator >> (const TracedValue<T> &lhs, const U &rhs) -> TracedValue<decltype(lhs.Get() >> rhs)> {
622  TRACED_VALUE_DEBUG ("x>>");
623  return TracedValue<decltype(lhs.Get() >> rhs)>(lhs.Get () >> rhs);
624 }
626 template <typename T, typename U>
627 auto operator >> (const U &lhs, const TracedValue<T> &rhs) -> TracedValue<decltype(lhs >> rhs.Get())> {
628  TRACED_VALUE_DEBUG (">>x");
629  return TracedValue<decltype(lhs >> rhs.Get())>(lhs >> rhs.Get ());
630 }
631 
646 template <typename T, typename U>
648  TRACED_VALUE_DEBUG ("x+=");
649  T tmp = lhs.Get ();
650  tmp += rhs;
651  lhs.Set (tmp);
652  return lhs;
653 }
655 template <typename T, typename U>
657  TRACED_VALUE_DEBUG ("x-=");
658  T tmp = lhs.Get ();
659  tmp -= rhs;
660  lhs.Set (tmp);
661  return lhs;
662 }
664 template <typename T, typename U>
666  TRACED_VALUE_DEBUG ("x*=");
667  T tmp = lhs.Get ();
668  tmp *= rhs;
669  lhs.Set (tmp);
670  return lhs;
671 }
673 template <typename T, typename U>
675  TRACED_VALUE_DEBUG ("x/=");
676  T tmp = lhs.Get ();
677  tmp /= rhs;
678  lhs.Set (tmp);
679  return lhs;
680 }
682 template <typename T, typename U>
684  TRACED_VALUE_DEBUG ("x%=");
685  T tmp = lhs.Get ();
686  tmp %= rhs;
687  lhs.Set (tmp);
688  return lhs;
689 }
691 template <typename T, typename U>
692 TracedValue<T> &operator <<= (TracedValue<T> &lhs, const U &rhs) {
693  TRACED_VALUE_DEBUG ("x<<=");
694  T tmp = lhs.Get ();
695  tmp <<= rhs;
696  lhs.Set (tmp);
697  return lhs;
698 }
700 template <typename T, typename U>
702  TRACED_VALUE_DEBUG ("x>>=");
703  T tmp = lhs.Get ();
704  tmp >>= rhs;
705  lhs.Set (tmp);
706  return lhs;
707 }
709 template <typename T, typename U>
711  TRACED_VALUE_DEBUG ("x&=");
712  T tmp = lhs.Get ();
713  tmp &= rhs;
714  lhs.Set (tmp);
715  return lhs;
716 }
718 template <typename T, typename U>
720  TRACED_VALUE_DEBUG ("x|=");
721  T tmp = lhs.Get ();
722  tmp |= rhs;
723  lhs.Set (tmp);
724  return lhs;
725 }
727 template <typename T, typename U>
729  TRACED_VALUE_DEBUG ("x^=");
730  T tmp = lhs.Get ();
731  tmp ^= rhs;
732  lhs.Set (tmp);
733  return lhs;
734 }
735 
736 
745 template <typename T>
747  TRACED_VALUE_DEBUG ("(+x)");
748  return TracedValue<T> (+lhs.Get ());
749 }
751 template <typename T>
753  TRACED_VALUE_DEBUG ("(-x)");
754  return TracedValue<T> (-lhs.Get ());
755 }
757 template <typename T>
759  TRACED_VALUE_DEBUG ("(~x)");
760  return TracedValue<T> (~lhs.Get ());
761 }
763 template <typename T>
765  TRACED_VALUE_DEBUG ("(!x)");
766  return TracedValue<T> (!lhs.Get ());
767 }
768  // \ingroup tracing
770 
771 } // namespace ns3
772 
773 #endif /* TRACED_VALUE_H */
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:577
ns3::BooleanValue attribute value declarations.
int64x64_t & operator+=(int64x64_t &lhs, const int64x64_t &rhs)
Compound addition operator.
Definition: int64x64-128.h:373
ns3::DoubleValue attribute value declarations and template implementations.
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
Definition: angles.cc:48
TracedValue< T > & operator|=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:719
int64x64_t operator+(const int64x64_t &lhs)
Unary plus operator.
Definition: int64x64-128.h:410
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:777
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:520
T m_v
The underlying value.
Definition: traced-value.h:262
ns3::UintegerValue attribute value declarations and template implementations.
int64x64_t & operator*=(int64x64_t &lhs, const int64x64_t &rhs)
Compound multiplication operator.
Definition: int64x64-128.h:391
int64x64_t operator-(const int64x64_t &lhs)
Unary negation operator (change sign operator).
Definition: int64x64-128.h:418
Base class for Callback class.
Definition: callback.h:1104
void Disconnect(const CallbackBase &cb, std::string path)
Disconnect a Callback which was connected with context.
Definition: traced-value.h:198
void(* Uint8)(uint8_t oldValue, uint8_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:84
void Set(const T &v)
Set the value of the underlying variable.
Definition: traced-value.h:207
Trace classes with value semantics.
Definition: traced-value.h:111
T Get(void) const
Get the underlying value.
Definition: traced-value.h:218
bool operator>=(const int64x64_t &lhs, const int64x64_t &rhs)
Greater or equal operator.
Definition: int64x64.h:145
TracedValue(const TracedValue< U > &other)
Copy from a TracedValue of a compatible type.
Definition: traced-value.h:152
void(* Int16)(int16_t oldValue, int16_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:85
TracedValue< T > operator~(const TracedValue< T > &lhs)
Unary arithmetic operator for TracedValue.
Definition: traced-value.h:758
ns3::TracedCallback declaration and template implementation.
void ConnectWithoutContext(const CallbackBase &cb)
Connect a Callback (without context.)
Definition: traced-value.h:169
int64x64_t operator*(const int64x64_t &lhs, const int64x64_t &rhs)
Multiplication operator.
Definition: int64x64.h:108
void Connect(const CallbackBase &cb, std::string path)
Connect a Callback with a context string.
Definition: traced-value.h:181
TracedValue()
Default constructor.
Definition: traced-value.h:115
void(* Int8)(int8_t oldValue, int8_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:83
ns3::EnumValue attribute value declarations.
void(* Int32)(int32_t oldValue, int32_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:87
TracedValue(const U &other)
Copy from a variable type compatible with this underlying type.
Definition: traced-value.h:161
TracedValue< T > & operator%=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:683
int64x64_t operator/(const int64x64_t &lhs, const int64x64_t &rhs)
Division operator.
Definition: int64x64.h:119
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:1471
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TracedValue< T > & operator>>=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:701
TracedValue< T > & operator^=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:728
TracedValue(const T &v)
Construct from an explicit variable.
Definition: traced-value.h:127
TracedValue(const TracedValue &o)
Copy constructor.
Definition: traced-value.h:121
void(* Double)(double oldValue, double newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:89
TracedValue< T > & operator&=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:710
void(* Void)(void)
TracedValue Callback signature for POD.
Definition: traced-value.h:90
bool operator>(const int64x64_t &lhs, const int64x64_t &rhs)
Greater operator.
Definition: int64x64-128.h:364
bool operator==(const EventId &a, const EventId &b)
Definition: event-id.h:135
ns3::IntegerValue attribute value declarations and template implementations.
void DisconnectWithoutContext(const CallbackBase &cb)
Disconnect a Callback which was connected without context.
Definition: traced-value.h:189
int64x64_t & operator-=(int64x64_t &lhs, const int64x64_t &rhs)
Compound subtraction operator.
Definition: int64x64-128.h:382
#define TRACED_VALUE_DEBUG(x)
Logging macro for TracedValue.
Definition: traced-value.h:48
void(* Uint16)(uint16_t oldValue, uint16_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:86
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:558
int64x64_t & operator/=(int64x64_t &lhs, const int64x64_t &rhs)
Compound division operator.
Definition: int64x64-128.h:400
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:539
void(* Uint32)(uint32_t oldValue, uint32_t newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:88
TracedCallback< T, T > m_cb
The connected Callback.
Definition: traced-value.h:264
int64x64_t operator!(const int64x64_t &lhs)
Logical not operator.
Definition: int64x64-128.h:426
void(* Bool)(bool oldValue, bool newValue)
TracedValue Callback signature for POD.
Definition: traced-value.h:82