Changeset 529 for trunk/lib/Stats.h


Ignore:
Timestamp:
Dec 25, 2007, 2:10:25 PM (14 years ago)
Author:
Peter Johansson
Message:

moving stuff to base class, Stats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Stats.h

    r528 r529  
    133133
    134134  protected:
    135     inline std::string code_cache(void) const {return "CACHE CODE";}
    136     inline std::string comments_cache(void) const {return "CACHE COMMENTS";}
    137     inline std::string other_cache(void) const {return "CACHE EMPTY";}
    138     inline std::string total_cache(void) const {return "CACHE TOTAL";}
    139 
    140135    typedef std::map<std::string, std::vector<u_int> > Author2Vector;
    141136    typedef Author2Vector::iterator A2VIter;
     
    169164    void accumulate(std::vector<u_int>& vec) const;
    170165    void accumulate_stats(void);
    171     virtual bool do_load_cache(std::istream&)=0;
    172166    virtual void do_parse(const std::string&)=0;
    173     virtual std::string do_plot(const std::string&, const std::string&) const=0;
    174     virtual void do_print(std::ostream& ) const=0;
    175167   
     168    // Change this string if cache format is changed in such a way
     169    // that all old cache files are obsolete.
     170    inline std::string end_of_cache(void) const
     171    {return "END OF OK CACHE FILE VERSION 2";}
     172    inline std::string code_cache(void) const {return "CACHE CODE";}
     173    inline std::string comments_cache(void) const {return "CACHE COMMENTS";}
     174    inline std::string other_cache(void) const {return "CACHE EMPTY";}
     175    inline std::string total_cache(void) const {return "CACHE TOTAL";}
     176
     177   
     178
    176179    u_int get_back(const Author2Vector&, std::string user) const;
     180    void load(std::istream& is, Author2Vector& m);
     181    void print(std::ostream& os, const Author2Vector& m) const;
    177182
    178183    svn_revnum_t revision_; // Should be the latest revision for whole project
Note: See TracChangeset for help on using the changeset viewer.