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
50namespace ns3 {
51
70namespace TracedValueCallback {
71
82typedef void (* Bool) (bool oldValue, bool newValue);
83typedef void (* Int8) (int8_t oldValue, int8_t newValue);
84typedef void (* Uint8) (uint8_t oldValue, uint8_t newValue);
85typedef void (* Int16) (int16_t oldValue, int16_t newValue);
86typedef void (* Uint16)(uint16_t oldValue, uint16_t newValue);
87typedef void (* Int32) (int32_t oldValue, int32_t newValue);
88typedef void (* Uint32)(uint32_t oldValue, uint32_t newValue);
89typedef void (* Int64) (int64_t oldValue, int64_t newValue);
90typedef void (* Uint64)(uint64_t oldValue, uint64_t newValue);
91typedef void (* Double)(double oldValue, double newValue);
94typedef void (* Void) (void);
97} // namespace TracedValueCallback
98
99
115template <typename T>
117{
118public:
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 }
279private:
284};
285
286
287/********************************************************************
288 Operator implementations for TracedValue
289 ********************************************************************/
290
305template <typename T>
306std::ostream& operator << (std::ostream& os, const TracedValue<T>& rhs)
307{
308 return os << rhs.Get ();
309}
310
319template <typename T, typename U>
320bool operator == (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
321{
322 TRACED_VALUE_DEBUG ("x==x");
323 return lhs.Get () == rhs.Get ();
324}
326template <typename T, typename U>
327bool operator == (const TracedValue<T> &lhs, const U &rhs)
328{
329 TRACED_VALUE_DEBUG ("x==");
330 return lhs.Get () == rhs;
331}
333template <typename T, typename U>
334bool operator == (const U &lhs, const TracedValue<T> &rhs)
335{
336 TRACED_VALUE_DEBUG ("==x");
337 return lhs == rhs.Get ();
338}
339
341template <typename T, typename U>
342bool operator != (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
343{
344 TRACED_VALUE_DEBUG ("x!=x");
345 return lhs.Get () != rhs.Get ();
346}
348template <typename T, typename U>
349bool operator != (const TracedValue<T> &lhs, const U &rhs)
350{
351 TRACED_VALUE_DEBUG ("x!=");
352 return lhs.Get () != rhs;
353}
355template <typename T, typename U>
356bool operator != (const U &lhs, const TracedValue<T> &rhs)
357{
358 TRACED_VALUE_DEBUG ("!=x");
359 return lhs != rhs.Get ();
360}
361
363template <typename T, typename U>
364bool operator <= (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
365{
366 TRACED_VALUE_DEBUG ("x<=x");
367 return lhs.Get () <= rhs.Get ();
368}
370template <typename T, typename U>
371bool operator <= (const TracedValue<T> &lhs, const U &rhs)
372{
373 TRACED_VALUE_DEBUG ("x<=");
374 return lhs.Get () <= rhs;
375}
377template <typename T, typename U>
378bool operator <= (const U &lhs, const TracedValue<T> &rhs)
379{
380 TRACED_VALUE_DEBUG ("<=x");
381 return lhs <= rhs.Get ();
382}
384template <typename T, typename U>
385bool operator >= (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
386{
387 TRACED_VALUE_DEBUG ("x>=x");
388 return lhs.Get () >= rhs.Get ();
389}
391template <typename T, typename U>
392bool operator >= (const TracedValue<T> &lhs, const U &rhs)
393{
394 TRACED_VALUE_DEBUG ("x>=");
395 return lhs.Get () >= rhs;
396}
398template <typename T, typename U>
399bool operator >= (const U &lhs, const TracedValue<T> &rhs)
400{
401 TRACED_VALUE_DEBUG (">=x");
402 return lhs >= rhs.Get ();
403}
404
406template <typename T, typename U>
407bool operator < (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
408{
409 TRACED_VALUE_DEBUG ("x<x");
410 return lhs.Get () < rhs.Get ();
411}
413template <typename T, typename U>
414bool operator < (const TracedValue<T> &lhs, const U &rhs)
415{
416 TRACED_VALUE_DEBUG ("x<");
417 return lhs.Get () < rhs;
418}
420template <typename T, typename U>
421bool operator < (const U &lhs, const TracedValue<T> &rhs)
422{
423 TRACED_VALUE_DEBUG ("<x");
424 return lhs < rhs.Get ();
425}
427template <typename T, typename U>
428bool operator > (const TracedValue<T> &lhs, const TracedValue<U> &rhs)
429{
430 TRACED_VALUE_DEBUG ("x>x");
431 return lhs.Get () > rhs.Get ();
432}
434template <typename T, typename U>
435bool operator > (const TracedValue<T> &lhs, const U &rhs)
436{
437 TRACED_VALUE_DEBUG ("x>");
438 return lhs.Get () > rhs;
439}
441template <typename T, typename U>
442bool operator > (const U &lhs, const TracedValue<T> &rhs)
443{
444 TRACED_VALUE_DEBUG (">x");
445 return lhs > rhs.Get ();
446}
447
448
462template <typename T, typename U>
463auto 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}
469template <typename T, typename U>
470auto 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}
476template <typename T, typename U>
477auto 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
484template <typename T, typename U>
485auto 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}
491template <typename T, typename U>
492auto 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}
498template <typename T, typename U>
499auto 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
506template <typename T, typename U>
507auto 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}
513template <typename T, typename U>
514auto 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}
520template <typename T, typename U>
521auto 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
528template <typename T, typename U>
529auto 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}
535template <typename T, typename U>
536auto 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}
542template <typename T, typename U>
543auto 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
550template <typename T, typename U>
551auto 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}
557template <typename T, typename U>
558auto 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}
564template <typename T, typename U>
565auto 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
572template <typename T, typename U>
573auto 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}
579template <typename T, typename U>
580auto 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}
586template <typename T, typename U>
587auto 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
594template <typename T, typename U>
595auto 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}
601template <typename T, typename U>
602auto 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}
608template <typename T, typename U>
609auto 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
616template <typename T, typename U>
617auto 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}
623template <typename T, typename U>
624auto 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}
630template <typename T, typename U>
631auto 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
638template <typename T, typename U>
639auto 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}
645template <typename T, typename U>
646auto 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}
652template <typename T, typename U>
653auto 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
660template <typename T, typename U>
661auto 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}
667template <typename T, typename U>
668auto 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}
674template <typename T, typename U>
675auto 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
695template <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}
705template <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}
715template <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}
725template <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}
735template <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}
745template <typename T, typename U>
746TracedValue<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}
755template <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}
765template <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}
775template <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}
785template <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
804template <typename T>
806{
807 TRACED_VALUE_DEBUG ("(+x)");
808 return TracedValue<T> (+lhs.Get ());
809}
811template <typename T>
813{
814 TRACED_VALUE_DEBUG ("(-x)");
815 return TracedValue<T> (-lhs.Get ());
816}
818template <typename T>
820{
821 TRACED_VALUE_DEBUG ("(~x)");
822 return TracedValue<T> (~lhs.Get ());
823}
825template <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
TracedValue & operator++()
Pre/post- increment/decrement operator.
Definition: traced-value.h:243
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
TracedValue & operator--()
Pre/post- increment/decrement operator.
Definition: traced-value.h:251
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=(const TracedValue &o)
Assignment.
Definition: traced-value.h:149
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(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
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:726
TracedValue< T > & operator|=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
Definition: traced-value.h:776
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: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:573
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:786
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:746
TracedValue< T > operator~(const TracedValue< T > &lhs)
Unary arithmetic operator for TracedValue.
Definition: traced-value.h:819
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:766
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
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:139
Time & operator+=(Time &lhs, const Time &rhs)
Compound addition assignment for Time.
Definition: nstime.h:1115
std::istream & operator>>(std::istream &is, Angles &a)
Definition: angles.cc:162
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
Time & operator-=(Time &lhs, const Time &rhs)
Compound subtraction assignment for Time.
Definition: nstime.h:1126
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.