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 "DictionaryBasedTempPath.h"
\r
23 class CNodeClassification
\r
27 /// classification for a revision graph tree node.
\r
28 /// Only the first section will be used by the CPathClassificator.
\r
29 /// All others are added by the revision graph.
\r
33 IS_TRUNK = 0x00000001,
\r
34 IS_BRANCH = 0x00000002,
\r
35 IS_TAG = 0x00000004,
\r
36 IS_OTHER = 0x00000008,
\r
38 IS_ADDED = 0x00000010,
\r
39 IS_MODIFIED = 0x00000020,
\r
40 IS_DELETED = 0x00000040,
\r
41 IS_RENAMED = 0x00000080,
\r
43 COPIES_TO_TRUNK = 0x00000100,
\r
44 COPIES_TO_BRANCH = 0x00000200,
\r
45 COPIES_TO_TAG = 0x00000400,
\r
46 COPIES_TO_OTHER = 0x00000800,
\r
48 COPIES_TO_ADDED = 0x00001000,
\r
49 COPIES_TO_MODIFIED = 0x00002000,
\r
50 COPIES_TO_DELETED = 0x00004000,
\r
51 COPIES_TO_RENAMED = 0x00008000,
\r
53 ALL_COPIES_ADDED = 0x00010000,
\r
54 ALL_COPIES_MODIFIED= 0x00020000,
\r
55 ALL_COPIES_DELETED = 0x00040000,
\r
56 ALL_COPIES_RENAMED = 0x00080000,
\r
58 PATH_ONLY_ADDED = 0x00100000,
\r
59 PATH_ONLY_MODIFIED = 0x00200000,
\r
60 PATH_ONLY_DELETED = 0x00400000,
\r
61 PATH_ONLY_RENAMED = 0x00800000,
\r
63 IS_COPY_SOURCE = 0x01000000,
\r
64 IS_COPY_TARGET = 0x02000000,
\r
65 IS_FIRST = 0x04000000,
\r
66 IS_LAST = 0x08000000,
\r
68 IS_WORKINGCOPY = 0x10000000,
\r
70 // if set, the node should not be removed
\r
71 // (only valid in visible graph)
\r
73 MUST_BE_PRESERVED = 0x80000000
\r
78 IS_MASK = 0x000000ff,
\r
79 IS_OPERATION_MASK = 0x000000f0,
\r
80 COPIES_TO_MASK = 0x0000ff00,
\r
81 ALL_COPIES_MASK = 0x000f0000,
\r
82 PATH_ONLY_MASK = 0x00f00000,
\r
83 SPECIAL_PROPS_MASK = 0xff000000,
\r
85 COPIES_TO_SHIFT = 0x00000100,
\r
86 ALL_COPIES_SHIFT = 0x00001000,
\r
87 PATH_ONLY_SHIFT = 0x00010000,
\r
89 SUBTREE_DELETED = IS_DELETED | ALL_COPIES_DELETED
\r
94 /// actually, this whole class is just a fancy DWORD
\r
100 /// empty construction
\r
102 CNodeClassification();
\r
103 CNodeClassification (DWORD flags);
\r
107 void Add (DWORD value);
\r
108 void Remove (DWORD value);
\r
110 /// specific data access
\r
112 bool Matches (DWORD required, DWORD forbidden) const;
\r
113 bool Is (DWORD value) const;
\r
114 bool IsAnyOf (DWORD value) const;
\r
116 DWORD GetFlags() const;
\r
120 /// empty construction
\r
122 inline CNodeClassification::CNodeClassification()
\r
127 inline CNodeClassification::CNodeClassification (DWORD flags)
\r
134 inline void CNodeClassification::Add (DWORD value)
\r
139 inline void CNodeClassification::Remove (DWORD value)
\r
144 /// specific data access
\r
146 inline bool CNodeClassification::Matches (DWORD required, DWORD forbidden) const
\r
148 return (flags & (required | forbidden)) == required;
\r
151 inline bool CNodeClassification::Is (DWORD value) const
\r
153 return Matches (value, 0);
\r
156 inline bool CNodeClassification::IsAnyOf (DWORD value) const
\r
158 return (flags & value) != 0;
\r
161 inline DWORD CNodeClassification::GetFlags() const
\r