34a35
> #include "base/callback.hh"
56a58
>
71d72
< // virtual void dumpStats(std::ostream & out) = 0;
72a74,75
> virtual void regStats() = 0;
>
88a92,97
> //! Function for collating statistics from all the controllers of this
> //! particular type. This function should only be called from the
> //! version 0 of this controller type.
> virtual void collateStats()
> {fatal("collateStats() should be overridden!");}
>
156a166,183
>
> //! Callback class used for collating statistics from all the
> //! controller of this type.
> class StatsCallback : public Callback
> {
> private:
> AbstractController *ctr;
>
> public:
> virtual ~StatsCallback() {}
>
> StatsCallback(AbstractController *_ctr)
> : ctr(_ctr)
> {
> }
>
> void process() {ctr->collateStats();}
> };