- Timestamp:
- Dec 27, 2007, 8:25:08 AM (16 years ago)
- Location:
- trunk/lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Directory.cc
r532 r538 129 129 } 130 130 131 const StatsCollection& Directory::parse( const bool verbose)131 const StatsCollection& Directory::parse(bool verbose, bool ignore) 132 132 { 133 133 stats_.reset(); … … 135 135 for (NodeIterator i=daughters_.begin(); i!=daughters_.end(); ++i) 136 136 if (!(*i)->ignore()) 137 stats_ += (*i)->parse(verbose );137 stats_ += (*i)->parse(verbose, ignore); 138 138 return stats_; 139 139 } -
trunk/lib/Directory.h
r532 r538 81 81 std::string output_path(void) const; 82 82 83 const StatsCollection& parse( const bool verbose=false);83 const StatsCollection& parse(bool verbose, bool ignore); 84 84 85 85 void print_copyright(std::map<std::string, Alias>&, bool verbose) const; -
trunk/lib/File.cc
r536 r538 189 189 190 190 191 const StatsCollection& File::parse( const bool verbose)191 const StatsCollection& File::parse(bool verbose, bool ignore) 192 192 { 193 193 if (verbose) … … 201 201 return stats_; 202 202 } 203 } 203 is.close(); 204 } 205 else 206 stats_.parse(path_); 204 207 if (!node_exist(cache_dir)) 205 208 mkdir(cache_dir); 206 209 std::ofstream os(cache_file.c_str()); 207 210 stats_.print(os); 211 os.close(); 208 212 return stats_; 209 213 } -
trunk/lib/File.h
r532 r538 64 64 /// @return Stats object of the file 65 65 /// 66 const StatsCollection& parse( const bool verbose=false);66 const StatsCollection& parse(bool verbose, bool ignore); 67 67 68 68 /** -
trunk/lib/Node.h
r532 r538 152 152 /// @brief parsing file using svn blame. 153 153 /// 154 virtual const StatsCollection& parse(const bool verbose=false)=0; 154 virtual const StatsCollection& parse(bool verbose, 155 bool ignore_cache)=0; 155 156 156 157 /// -
trunk/lib/StatsCollection.cc
r533 r538 77 77 78 78 79 const StatsCollection&StatsCollection::parse(const std::string& path)79 void StatsCollection::parse(const std::string& path) 80 80 { 81 81 for (map::iterator i(stats_.begin()); i!=stats_.end(); ++i) { 82 82 i->second->parse(path); 83 83 } 84 return *this;85 84 } 86 85 -
trunk/lib/StatsCollection.h
r532 r538 56 56 bool load_cache(std::istream&); 57 57 58 const std::map<std::string, Stats*>& stats(void) const; 59 58 /** 59 Do the parsing for different statistics 60 */ 61 void parse(const std::string& path); 60 62 61 63 /** … … 68 70 */ 69 71 void reset(void); 72 73 const std::map<std::string, Stats*>& stats(void) const; 70 74 71 75 /** … … 86 90 87 91 private: 88 /**89 Do the parsing for different statistics90 */91 const StatsCollection& parse(const std::string& path);92 93 92 const std::string path_; 94 93 typedef std::map<std::string, Stats*> map;
Note: See TracChangeset
for help on using the changeset viewer.