Changeset 1224
- Timestamp:
- Oct 17, 2010, 6:23:14 PM (12 years ago)
- Location:
- branches/visitor/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/visitor/lib/Directory.cc
r1186 r1224 27 27 #include "html_utility.h" 28 28 #include "Node.h" 29 #include "NodeVisitor.h" 29 30 #include "SVN.h" 30 31 #include "SVNlog.h" … … 278 279 } 279 280 281 282 void Directory::traverse(NodeVisitor& visitor) 283 { 284 visitor.enter(*this); 285 for (NodeIterator first=daughters_.begin(), end=daughters_.end(); 286 first!=end; ++first) 287 (*first)->traverse(visitor); 288 visitor.leave(*this); 289 } 290 291 280 292 }} // end of namespace svndigest and namespace theplu -
branches/visitor/lib/Directory.h
r978 r1224 32 32 namespace theplu{ 33 33 namespace svndigest{ 34 35 class NodeVisitor; 34 36 35 37 /// … … 96 98 const std::map<int, svn_revnum_t>&) const; 97 99 100 /** 101 Calls visitor.enter(*this), traverses daughter nodes, and calls 102 visitor.leave(*this). 103 */ 104 void traverse(NodeVisitor& visitor); 105 98 106 private: 99 107 /** -
branches/visitor/lib/File.cc
r1222 r1224 30 30 #include "html_utility.h" 31 31 #include "HtmlStream.h" 32 #include "NodeVisitor.h" 32 33 #include "Stats.h" 33 34 #include "SVNblame.h" … … 398 399 } 399 400 401 402 void File::traverse(NodeVisitor& visitor) 403 { 404 visitor.visit(*this); 405 } 406 407 400 408 void File::update_copyright(const std::string& new_block, 401 409 size_t start_at_line, size_t end_at_line) const -
branches/visitor/lib/File.h
r978 r1224 31 31 namespace theplu{ 32 32 namespace svndigest{ 33 34 class NodeVisitor; 33 35 34 36 class File : public Node … … 77 79 void print_copyright(std::map<std::string, Alias>&, bool verbose, 78 80 const std::map<int, svn_revnum_t>&) const; 81 82 /** 83 Let the visitor perform its mission via visitor(*this) 84 */ 85 void traverse(NodeVisitor& visitor); 79 86 80 87 private: -
branches/visitor/lib/Node.h
r1137 r1224 40 40 41 41 class Alias; 42 class NodeVisitor; 42 43 43 44 /// … … 193 194 */ 194 195 inline bool svndigest_ignore(void) const { return svndigest_ignore_; } 196 197 /** 198 Access point for a NodeVisitor to start traversing Node and its 199 daughter nodes. 200 */ 201 virtual void traverse(NodeVisitor& visitor)=0; 195 202 196 203 /**
Note: See TracChangeset
for help on using the changeset viewer.