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 // required includes
\r
23 #include "VisibleGraphNode.h"
\r
26 * Contains a filtered copy of some \ref CFullGraph instance.
\r
28 * Acts as factory and container for all nodes and their sub-structres.
\r
35 CVisibleGraphNode::CFactory nodeFactory;
\r
37 /// the graph is actually a forest of trees
\r
39 std::vector<CVisibleGraphNode*> roots;
\r
43 /// construction / destruction
\r
45 CVisibleGraph(void);
\r
46 ~CVisibleGraph(void);
\r
51 CVisibleGraphNode* Add ( const CFullGraphNode* base
\r
52 , CVisibleGraphNode* source
\r
53 , bool preserveNode);
\r
55 void ReplaceRoot (CVisibleGraphNode* oldRoot, CVisibleGraphNode* newRoot);
\r
56 void RemoveRoot (CVisibleGraphNode* root);
\r
57 void AddRoot (CVisibleGraphNode* root);
\r
61 size_t GetRootCount() const;
\r
62 CVisibleGraphNode* GetRoot (size_t index);
\r
63 const CVisibleGraphNode* GetRoot (size_t index) const;
\r
65 size_t GetNodeCount() const;
\r
69 CVisibleGraphNode::CFactory& GetFactory();
\r
74 inline size_t CVisibleGraph::GetRootCount() const
\r
76 return roots.size();
\r
79 inline const CVisibleGraphNode* CVisibleGraph::GetRoot (size_t index) const
\r
81 return roots[index];
\r
84 inline CVisibleGraphNode* CVisibleGraph::GetRoot (size_t index)
\r
86 return roots[index];
\r
89 inline size_t CVisibleGraph::GetNodeCount() const
\r
91 return nodeFactory.GetNodeCount();
\r
94 inline CVisibleGraphNode::CFactory& CVisibleGraph::GetFactory()
\r