1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // Copyright (C) 2003-2008 - TortoiseSVN
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
21 // include base classes
\r
23 #include "RevisionGraphOptions.h"
\r
26 * Extends the base interface with a method that has full
\r
27 * modifying access to a given visible graph.
\r
30 class IModificationOption : public IOrderedTraversalOption
\r
34 virtual void Apply (CVisibleGraph* graph, CVisibleGraphNode* node) = 0;
\r
38 * Filtered sub-set of \ref CAllRevisionGraphOptions.
\r
39 * It applies all options in the order defined by their \ref priority.
\r
40 * The option instances may transform the graph any way they consider fit.
\r
42 * Contains only \ref IModificationOption instances.
\r
45 class CModificationOptions : public CRevisionGraphOptionList
\r
49 std::vector<IModificationOption*> options;
\r
51 /// apply a filter using differnt traversal orders
\r
53 void TraverseFromRootCopiesFirst ( IModificationOption* option
\r
54 , CVisibleGraph* graph
\r
55 , CVisibleGraphNode* node);
\r
56 void TraverseToRootCopiesFirst ( IModificationOption* option
\r
57 , CVisibleGraph* graph
\r
58 , CVisibleGraphNode* node);
\r
59 void TraverseFromRootCopiesLast ( IModificationOption* option
\r
60 , CVisibleGraph* graph
\r
61 , CVisibleGraphNode* node);
\r
62 void TraverseToRootCopiesLast ( IModificationOption* option
\r
63 , CVisibleGraph* graph
\r
64 , CVisibleGraphNode* node);
\r
68 /// construction / destruction
\r
70 CModificationOptions (const std::vector<IModificationOption*>& options);
\r
71 virtual ~CModificationOptions() {}
\r
73 /// apply all filters
\r
75 void Apply (CVisibleGraph* graph);
\r