Changeset 1225
- Timestamp:
- Oct 17, 2010, 10:36:40 PM (13 years ago)
- Location:
- branches/visitor/lib
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/visitor/lib/Directory.h
r1224 r1225 99 99 100 100 /** 101 Calls visitor.enter(*this) , traverses daughter nodes, and calls102 visitor.leave(*this).101 Calls visitor.enter(*this). If enter returns true, daughter 102 nodes are traverses. Finally visitor visitor.leave(*this) i called. 103 103 */ 104 104 void traverse(NodeVisitor& visitor); -
branches/visitor/lib/Makefile.am
r1223 r1225 31 31 32 32 noinst_HEADERS = AddStats.h Alias.h BlameStats.h ClassicStats.h \ 33 Colors.h Commitment.h Configuration.h css.h \33 Colors.h Commitment.h Configuration.h CopyrightVisitor.h css.h \ 34 34 Date.h Directory.h File.h first_page.h Functor.h \ 35 35 Graph.h \ … … 42 42 libsvndigest_a_SOURCES = AddStats.cc Alias.cc BlameStats.cc \ 43 43 ClassicStats.cc Colors.cc \ 44 Commitment.cc Configuration.cc \44 Commitment.cc Configuration.cc CopyrightVisitor.cc \ 45 45 css.cc Date.cc Directory.cc File.cc first_page.cc\ 46 46 Functor.cc Graph.cc HtmlBuf.cc HtmlStream.cc \ -
branches/visitor/lib/Node.h
r1224 r1225 184 184 185 185 /** 186 \return true if svncopyright::ignore property was set 187 */ 188 bool svncopyright_ignore(void) const; 189 190 /** 186 191 @brief Check if item used to create this object has been 187 192 assigned property svndigest:ignore. … … 207 212 208 213 protected: 209 /**210 \return true if svncopyright::ignore property was set211 */212 bool svncopyright_ignore(void) const;213 214 214 /// 215 215 /// print path in html format (with anchors) to @a os -
branches/visitor/lib/NodeVisitor.h
r1223 r1225 39 39 \brief Destructor 40 40 */ 41 virtual ~NodeVisitor(void) ;41 virtual ~NodeVisitor(void) {}; 42 42 43 43 /** … … 46 46 This is a chance for the visitor to do some action before 47 47 traversing daughter nodes. 48 49 \return true if we should traverse daughter nodes 48 50 */ 49 virtual voidenter(Directory& dir)=0;51 virtual bool enter(Directory& dir)=0; 50 52 51 53 /** -
branches/visitor/lib/main_utility.cc
r1102 r1225 23 23 24 24 #include "Configuration.h" 25 #include "CopyrightVisitor.h" 25 26 #include "Node.h" 26 27 #include "utility.h" … … 58 59 59 60 60 void update_copyright( constNode& tree, bool verbose)61 void update_copyright(Node& tree, bool verbose) 61 62 { 62 63 if (verbose) … … 64 65 const Configuration& config = Configuration::instance(); 65 66 std::map<std::string, Alias> alias(config.copyright_alias()); 66 tree.print_copyright(alias, verbose); 67 68 // map with last rev for every year 69 std::map<int, svn_revnum_t> year2rev; 70 // get log for entire project 71 SVNlog log(SVNinfo(tree.path()).repos_root_url()); 72 typedef SVNlog::container::const_iterator LogIterator; 73 for (LogIterator i=log.commits().begin(); i!=log.commits().end(); ++i){ 74 time_t sec = str2time(i->date()); 75 tm* timeinfo = gmtime(&sec); 76 // ignore commits in repository not present in wc 77 year2rev[timeinfo->tm_year] = std::min(i->revision(), 78 tree.last_changed_rev()); 79 } 80 81 CopyrightVisitor visitor(alias, verbose, year2rev); 82 tree.traverse(visitor); 67 83 } 68 84 -
branches/visitor/lib/main_utility.h
r1102 r1225 46 46 \brief update copyright statements in \a node 47 47 */ 48 void update_copyright( constNode& node, bool verbose);48 void update_copyright(Node& node, bool verbose); 49 49 50 50 }} // end of namespace svndigest end of namespace theplu
Note: See TracChangeset
for help on using the changeset viewer.