Opened 15 years ago
Closed 15 years ago
#249 closed task (fixed)
SVNlog::iterator
Reported by: | Peter Johansson | Owned by: | Peter Johansson |
---|---|---|---|
Priority: | major | Milestone: | svndigest 0.7 |
Component: | core | Version: | trunk |
Keywords: | Cc: |
Description
SVNlog's in internally containing vectors of authors, dates etc. This means that is trivial to get a these vectors (as const&). However, the design seems less optimal when iterating through the log. One has to keep all four vectors and iterating through every one of them. For this it seems tempting to change internal representation to a vector<Commitment>, i.e., transposing the representation to talk matrix language. The drawback is, of course that the functions such as date() author() that currently return const& have to be reimplemented introducing a lot of copying. If this was crucial the copying could be avoided using some kind of view-class just like one often has vector as a view into a matrix. That would be too much work here, I think. However, the present implementation is not good enough.
Therefore I propose that we either
1) Transpose the representation as discussed above or
2) Implement an iterator class that looks like a Commitment*, operator++ should iterate to next Commitment in log. Perhaps also have a reversed iterator.
Change History (2)
comment:1 Changed 15 years ago by
Milestone: | 0.8 → 0.7 |
---|---|
Owner: | changed from Jari Häkkinen to Peter Johansson |
Status: | new → assigned |
Summary: | redesign SVNlog → SVNlog::iterator |
Well, I guess I'll go for number 2...