Added more login to cscope_db
[vimicxx.git] / src / fs / tree_builder.h
blob1a54663ae42659d061abff3a432fb7fb0bcd587f
1 /*******************************************************************************
2 ********************************************************************************
4 Copyright (c) 2008 Ahmed S. Badran
6 Licensed under the FreeBSD License (see LICENSE)
8 Filename: tree_builder.h
9 Description: A tree builder, returns a tree filtered by patterns.
10 Created: 08/23/2008 07:22:19 PM PDT
11 Author: Ahmed S. Badran (Ahmed B.), ahmed.badran@gmail.com
13 ********************************************************************************
14 *******************************************************************************/
15 #ifndef TREE_BUILDER_INC
16 #define TREE_BUILDER_INC
17 #include <string>
18 #include <vector>
19 class fs_item;
20 class tree_builder
22 public:
23 static tree_builder* get_instance();
24 fs_item* build(const std::string& path, const
25 std::vector<std::string>& patterns,
26 std::vector<std::string>* file_list) const;
27 ~tree_builder();
28 private:
29 tree_builder();
30 static tree_builder* instance;
31 void build_dir_tree(const std::string& path, fs_item* dir_item, const
32 std::vector<std::string>& patterns,
33 std::vector<std::string>* file_list) const;
34 bool matches(const char*, const std::vector<std::string>& patterns)
35 const;
37 #endif // ----- #ifndef TREE_BUILDER_INC -----