Changeset 1239 for trunk/lib/CopyrightVisitor.h
- Timestamp:
- Oct 24, 2010, 1:57:56 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/CopyrightVisitor.h
r1237 r1239 29 29 30 30 #include <map> 31 #include <set> 31 32 #include <string> 32 33 … … 53 54 54 55 /** 56 Doing nothing 55 57 */ 56 58 void leave(Directory& dir); 57 59 58 60 /** 61 Updating copyright in \a file 59 62 */ 60 void visit(File& dir);63 void visit(File& file); 61 64 62 65 private: … … 65 68 const std::map<int, svn_revnum_t>& year2rev_; 66 69 bool ignore_cache_; 70 71 /** 72 \return copyright block 73 74 Create a Copyright block from \a year2auth and prefix each line 75 with \a prefix. 76 */ 77 std::string copyright_block(const std::map<int, std::set<Alias> >& year2auth, 78 const std::string& prefix) const; 79 80 /** 81 Create a map from year to set of authors. 82 */ 83 void create_year2alias(std::map<int, std::set<Alias> >&, const File& file); 84 85 /** 86 Look from copyright block in file \a path. 87 88 \param path file to look for copyright 89 \param block found copyright block 90 \param start_at_line line number of first line in found block 91 \param end_at_line line number of first line after found block 92 93 \return true if Copyright block is found 94 */ 95 bool detect_copyright(const std::string& path, std::string& block, 96 size_t& start_at_line, size_t& end_at_line, 97 std::string& prefix) const; 98 99 100 /** 101 Update the copyright in \a file. 102 */ 103 void update_copyright(const File& file); 104 105 /** 106 Doing the actual print of copyright statement 107 108 \param path to file 109 \param block new copyright block 110 \param start_at_line line number of first line in old block 111 \param end_at_line line number of first line after old block 112 */ 113 void update_copyright(const std::string& path, const std::string& block, 114 size_t start_at_line, size_t end_at_line) const; 67 115 }; 68 116 }} // end of namespace svndigest and namespace theplu
Note: See TracChangeset
for help on using the changeset viewer.