1 /*******************************************************************************
2 ********************************************************************************
4 Copyright (c) 2008 Ahmed S. Badran
6 Licensed under the FreeBSD License (see LICENSE)
9 Description: Implementation.
10 Created: 09/17/2008 11:01:30 PM PDT
11 Author: Ahmed S. Badran (Ahmed B.), ahmed.badran@gmail.com
13 ********************************************************************************
14 *******************************************************************************/
15 #include "cscope_db.h"
16 #include "tree_builder.h"
19 cscope_db::cscope_db (const string
& prj_
, const string
& prj_path_
, const
20 string
& prj_index_
, const string
& prj_flist_
, const
21 string
& prj_cscope_db_
, const vector
<string
>&
23 prj(prj_
), prj_path(prj_path_
), prj_index(prj_index_
),
24 prj_flist(prj_flist_
), prj_cscope_db(prj_cscope_db_
),
25 extension_list(extensions_
)
32 tree_builder
* builder
= tree_builder::get_instance();
33 const fs_item
* tree
= builder
->build(prj_path
, extension_list
,
36 if ((tmp
= fopen(prj_flist
.c_str(), "w")) == 0) {
40 for (i
= 0; i
< file_list
.size(); ++i
) {
41 fprintf("%s\n", file_list
[i
].c_str());
47 cscope_db::add_file (const string
& new_file
)
56 cscope_db::~cscope_db ()