Last change
on this file since 44 was
29,
checked in by Peter Johansson, 16 years ago
|
modified output file names
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.2 KB
|
Rev | Line | |
---|
[7] | 1 | // $Id: Directory.h 29 2006-01-09 09:35:50Z peter $ |
---|
| 2 | |
---|
[4] | 3 | #ifndef _theplu_svnstat_directory_ |
---|
| 4 | #define _theplu_svnstat_directory_ |
---|
| 5 | |
---|
| 6 | #include "Node.h" |
---|
| 7 | |
---|
[18] | 8 | #include <list> |
---|
| 9 | #include <string> |
---|
[4] | 10 | |
---|
| 11 | namespace theplu{ |
---|
| 12 | namespace svnstat{ |
---|
| 13 | |
---|
[9] | 14 | /// |
---|
| 15 | /// Class taking care of directories. |
---|
| 16 | /// |
---|
| 17 | class Directory : public Node |
---|
| 18 | { |
---|
| 19 | public: |
---|
| 20 | /// |
---|
| 21 | /// @brief Constructor |
---|
| 22 | /// |
---|
[22] | 23 | /// Recursively create a directory tree starting from \a path. All |
---|
| 24 | /// entries except explicit directories are treated as File nodes, |
---|
| 25 | /// i.e. symbolic links to directories are treated as File |
---|
| 26 | /// nodes. This will ensure that the directory structure is a tree |
---|
| 27 | /// and double counting of branches is avoided. |
---|
| 28 | /// |
---|
| 29 | /// @note Nodes named '.', '..', and '.svn' are ignored and not |
---|
[18] | 30 | /// traversed. |
---|
| 31 | /// |
---|
[29] | 32 | Directory(const std::string& path, const std::string& output=""); |
---|
[4] | 33 | |
---|
[9] | 34 | /// |
---|
| 35 | /// @brief Destructor |
---|
| 36 | /// |
---|
[10] | 37 | ~Directory(void); |
---|
[4] | 38 | |
---|
[14] | 39 | const Stats& parse(void); |
---|
[9] | 40 | |
---|
[23] | 41 | void print(const std::string&) const; |
---|
[10] | 42 | |
---|
[18] | 43 | void purge(void); |
---|
| 44 | |
---|
[9] | 45 | private: |
---|
| 46 | /// |
---|
| 47 | /// @brief Copy Constructor, not implemented |
---|
| 48 | /// |
---|
| 49 | Directory(const Directory&); |
---|
| 50 | |
---|
[22] | 51 | typedef std::list<Node*>::iterator NodeIterator; |
---|
[23] | 52 | typedef std::list<Node*>::const_iterator NodeConstIter_; |
---|
[18] | 53 | std::list<Node*> daughters_; |
---|
[9] | 54 | }; |
---|
| 55 | |
---|
[7] | 56 | }} // end of namespace svnstat and namespace theplu |
---|
| 57 | |
---|
| 58 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.