Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Statistic.h

Go to the documentation of this file.
00001 // Statistic.h
00002 
00003 #ifndef STATISTIC_H
00004 #define STATISTIC_H
00005 
00006 #include "Analyze.h"
00007 
00008 #include "analysis/smplstat.h"
00009 
00010 class Statistic : public Analyze {
00011         // basic Analyze class that makes a simple table of statistics
00012 public:
00013     Statistic(const Tuple& t, const std::string& item_name, std::string title)
00014         : Analyze(t, item_name, title){}
00015         
00016     Statistic(const Tuple&t, std::string::const_iterator& it, std::string::iterator end);
00017 
00018     virtual void    report(std::ostream& out);
00019     void clear() { m_stat.reset(); }
00020     const SampleStatistic& stat() const {return m_stat;}
00021 private:
00022     virtual bool    apply ()
00023     {
00024         m_stat += item();
00025         return true;
00026     }
00027     SampleStatistic m_stat;
00028 };
00029 
00030 #endif

Generated at Wed Nov 21 12:20:39 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000