Changeset 703 for trunk/lib/Stats.h


Ignore:
Timestamp:
Nov 24, 2008, 4:58:58 AM (13 years ago)
Author:
Peter Johansson
Message:

fixed some issues that addresses #338. Want to add some tests before allowing --ignore-cache and closing ticket:338.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Stats.h

    r701 r703  
    9999
    100100    /**
    101        Do the parsing for \a path. The function will only parse out
    102        stats for revisions larger than \a rev.
     101       Do the parsing for \a path. Revisions from \a rv will be parsed.
    103102    */
    104103    void parse(const std::string& path, svn_revnum_t rev=0);
     
    148147    typedef Author2Vector::const_iterator A2VConstIter;
    149148
    150     void accumulate_stats(svn_revnum_t rev=0);
     149    /**
     150       Calculate accumalated statistics for fundamental statistics,
     151       i.e., code, comment, empty, and copyright for each author.
     152       \see accumulate
     153     */
     154    void accumulate_stats(svn_revnum_t rev=1);
    151155    void add_author(std::string);
    152156    void add_authors(std::set<std::string>::const_iterator,
     
    198202                                         std::string user) const;
    199203  private:
     204    /**
     205       \a vec is resized to revision().
     206       vec is accumulated such that
     207       vec[rev] = vec[rev-1] + vec[rev]
     208       vec[rev+1] = vec[rev] + vec[rev+1]
     209       et cetera
     210     */
    200211    void accumulate(std::vector<unsigned int>& vec,
    201                     svn_revnum_t rev=0) const;
     212                    svn_revnum_t rev=1) const;
    202213    void add(std::vector<unsigned int>& vec, unsigned int rev, bool x,
    203214             unsigned int n);
    204215
    205     virtual void do_parse(const std::string&, svn_revnum_t)=0;
     216    /**
     217       Parse statistics for fundamental categories, i.e., code,
     218       comment, empty, and copyright for each author. Ignore revisions
     219       earlier than \a first_rev.
     220     */
     221    virtual void do_parse(const std::string&, svn_revnum_t first_rev)=0;
    206222   
    207223    // Change this string if cache format is changed in such a way
Note: See TracChangeset for help on using the changeset viewer.