diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:05:30 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:05:30 +0200 |
commit | c0fce877c478ddbf71a1b651c789e5ea00a00144 (patch) | |
tree | de01b0ae8fd296bd24fbca54a80f2f0ba071d461 /shared/fileTraverser.h | |
parent | 3.3 (diff) | |
download | FreeFileSync-c0fce877c478ddbf71a1b651c789e5ea00a00144.tar.gz FreeFileSync-c0fce877c478ddbf71a1b651c789e5ea00a00144.tar.bz2 FreeFileSync-c0fce877c478ddbf71a1b651c789e5ea00a00144.zip |
3.4
Diffstat (limited to 'shared/fileTraverser.h')
-rw-r--r-- | shared/fileTraverser.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/shared/fileTraverser.h b/shared/fileTraverser.h index c1277d87..dc5d75e0 100644 --- a/shared/fileTraverser.h +++ b/shared/fileTraverser.h @@ -1,3 +1,9 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * +// ************************************************************************** +// #ifndef FILETRAVERSER_H_INCLUDED #define FILETRAVERSER_H_INCLUDED @@ -5,6 +11,7 @@ #include <set> #include <memory> #include <wx/longlong.h> +#include "loki/TypeManip.h" //advanced file traverser returning metadata and hierarchical information on files and directories @@ -30,23 +37,18 @@ public: class ReturnValDir { public: - //some proxy classes - class Stop {}; - class Ignore {}; - class Continue {}; - - ReturnValDir(const Stop&) : returnCode(TRAVERSING_STOP), subDirCb(NULL) {} - ReturnValDir(const Ignore&) : returnCode(TRAVERSING_IGNORE_DIR), subDirCb(NULL) {} - ReturnValDir(const Continue&, TraverseCallback* subDirCallback) : returnCode(TRAVERSING_CONTINUE), subDirCb(subDirCallback) {} - - enum ReturnValueEnh { - TRAVERSING_STOP, - TRAVERSING_IGNORE_DIR, - TRAVERSING_CONTINUE + TRAVERSING_DIR_STOP, + TRAVERSING_DIR_IGNORE, + TRAVERSING_DIR_CONTINUE }; + ReturnValDir(Loki::Int2Type<TRAVERSING_DIR_STOP>) : returnCode(TRAVERSING_DIR_STOP), subDirCb(NULL) {} + ReturnValDir(Loki::Int2Type<TRAVERSING_DIR_IGNORE>) : returnCode(TRAVERSING_DIR_IGNORE), subDirCb(NULL) {} + ReturnValDir(Loki::Int2Type<TRAVERSING_DIR_CONTINUE>, TraverseCallback* subDirCallback) : returnCode(TRAVERSING_DIR_CONTINUE), subDirCb(subDirCallback) {} + + const ReturnValueEnh returnCode; TraverseCallback* const subDirCb; }; |