Changeset 425 for trunk/lib/File.h


Ignore:
Timestamp:
Jun 30, 2007, 1:19:45 AM (15 years ago)
Author:
Peter Johansson
Message:

fixes #232, also splitted print_copyright function into sub-functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/File.h

    r398 r425  
    6666    const Stats& parse(const bool verbose=false);
    6767
    68     void print_copyright(std::map<std::string, Alias>&) const;
     68    void print_copyright(std::map<std::string, Alias>&, bool verbose) const;
    6969
    7070  private:
     71    ///
     72    /// @brief Copy Constructor, not implemented
     73    ///
     74    File(const File&);
    7175
    7276    ///
     
    7781    bool blame(void) const;
    7882
    79     ///
    80     /// @brief Copy Constructor, not implemented
    81     ///
    82     File(const File&);
     83    /**
     84       \return copyright block
     85     */
     86    std::string copyright_block(const std::map<int, std::set<Alias> >& map,
     87                                const std::string& prefix) const;
     88
     89    /**
     90       Create a map from year to set of authors.
     91     */
     92    std::map<int, std::set<Alias> >
     93    copyright_map(std::map<std::string, Alias>& alias) const;
     94
     95    /**
     96       Create a map from year to set of authors.
     97
     98       \return true if Copyright block is found
     99     */
     100    bool detect_copyright(std::string& block, size_t& start_at_line,
     101                          size_t& end_at_line, std::string& prefix) const;
    83102
    84103    /**
     
    96115                    const SVNlog&) const;
    97116
     117    /**
     118       Doing the actual print of copyright statement
     119
     120       \param map containing info on who contributed which year
     121       \param start_at_line line number of first line in old block
     122       \param end_at_line line number of first line after old block
     123       \param prefix string preceeds the 'Copyright (C)...' block
     124     */
     125    void update_copyright(const std::string& block,
     126                          size_t start_at_line, size_t end_at_line) const;
    98127  };
    99128
Note: See TracChangeset for help on using the changeset viewer.