Changeset 201 for trunk/lib/Directory.cc
- Timestamp:
- Sep 9, 2006, 7:36:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Directory.cc
r199 r201 72 72 if (S_ISDIR(nodestat.st_mode)) // C api from sys/stat.h 73 73 daughters_.push_back(new Directory(level_+1,fullpath, 74 output_name()+"/"));74 local_path()+"/")); 75 75 else 76 daughters_.push_back(new File(level_,fullpath, output_name()+"/"));76 daughters_.push_back(new File(level_,fullpath,local_path()+"/")); 77 77 break; 78 78 case SVN::unresolved: … … 118 118 119 119 120 void Directory::print(const bool verbose) const120 void Directory::print(const std::string& out_path, const bool verbose) const 121 121 { 122 mkdir(out put_name());123 std::string output(out put_name()+ "/index.html");122 mkdir(out_path); 123 std::string output(out_path + "/index.html"); 124 124 if (verbose) 125 125 std::cout << "Printing output for " << path_ << std::endl; 126 126 std::ofstream os(output.c_str()); 127 print_header(os, name(), level_ );127 print_header(os, name(), level_+2); 128 128 path_anchor(os); 129 129 os << "<p align=center>\n<img src='" 130 << file_name(stats_.plot(out put_name()+"/index.png", output_name()))130 << file_name(stats_.plot(out_path+"/index.png", local_path())) 131 131 << "' alt='[plot]' border=0><br>\n"; 132 132 os << "<table class=\"listings\">\n"; … … 176 176 177 177 // print daughter nodes, i.e, this function is recursive 178 std::for_each(daughters_.begin(), daughters_.end(),179 std::bind2nd(std::mem_fun(&Node::print),verbose));178 for (NodeConstIterator i=daughters_.begin(); i!=daughters_.end(); ++i) 179 (*i)->print(out_path+"/"+(*i)->name(), verbose); 180 180 } 181 181
Note: See TracChangeset
for help on using the changeset viewer.