#include <basic-data-calculators.h>
Public Member Functions | |
CounterCalculator () | |
virtual | ~CounterCalculator () |
void | Update () |
void | Update (const T i) |
T | GetCount () const |
virtual void | Output (DataOutputCallback &callback) const |
Protected Member Functions | |
virtual void | DoDispose (void) |
Protected Attributes | |
T | m_count |
Definition at line 108 of file basic-data-calculators.h.
ns3::CounterCalculator< T >::CounterCalculator | ( | ) | [inline] |
Definition at line 131 of file basic-data-calculators.h.
ns3::CounterCalculator< T >::~CounterCalculator | ( | ) | [inline, virtual] |
Definition at line 137 of file basic-data-calculators.h.
void ns3::CounterCalculator< T >::DoDispose | ( | void | ) | [inline, protected, virtual] |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
Reimplemented from ns3::DataCalculator.
Reimplemented in ns3::PacketCounterCalculator.
Definition at line 142 of file basic-data-calculators.h.
T ns3::CounterCalculator< T >::GetCount | ( | ) | const [inline] |
Definition at line 170 of file basic-data-calculators.h.
References ns3::CounterCalculator< T >::m_count.
void ns3::CounterCalculator< T >::Output | ( | DataOutputCallback & | callback | ) | const [inline, virtual] |
Implements ns3::DataCalculator.
Definition at line 178 of file basic-data-calculators.h.
References ns3::CounterCalculator< T >::m_count, ns3::DataCalculator::m_key, and ns3::DataOutputCallback::OutputSingleton().
void ns3::CounterCalculator< T >::Update | ( | const T | i | ) | [inline] |
Definition at line 160 of file basic-data-calculators.h.
References ns3::CounterCalculator< T >::m_count, and ns3::DataCalculator::m_enabled.
void ns3::CounterCalculator< T >::Update | ( | ) | [inline] |
Definition at line 150 of file basic-data-calculators.h.
References ns3::CounterCalculator< T >::m_count, and ns3::DataCalculator::m_enabled.
T ns3::CounterCalculator< T >::m_count [protected] |
The reference count for this object. Each aggregate has an individual reference count. When the global reference count (the sum of all reference counts) reaches zero, the object and all its aggregates is deleted.
Reimplemented from ns3::Object.
Definition at line 123 of file basic-data-calculators.h.
Referenced by ns3::CounterCalculator< T >::GetCount(), ns3::CounterCalculator< T >::Output(), and ns3::CounterCalculator< T >::Update().