NCBI C++ ToolKit
vdbalias.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef ALGO_BLAST_VDB___VDBSRC_VDBALIAS_HPP
2 #define ALGO_BLAST_VDB___VDBSRC_VDBALIAS_HPP
3 
4 /// @file vdbalias.hpp
5 /// Defines database alias file access classes.
6 ///
7 /// Defines classes:
8 /// CVDBAliasNode
9 /// CVDBAliasFile
10 ///
11 
12 //#include <iostream>
13 #include <corelib/ncbistd.hpp>
14 #include <corelib/ncbiobj.hpp>
15 #include <common/ncbi_export.h>
16 
17 
18 
20 
22 
23 class CVDBAliasNode;
24 
25 /// CVDBAliasFile class
26 ///
27 /// This class is an interface to the alias node tree. It provides
28 /// functionality to classes like CSeqDBImpl (and others) that do not
29 /// need to understand alias walkers, nodes, and tree traversal.
30 
32 
33 public:
34 
35  /// Get the list of vdb names
36  ///
37  /// The alias node tree is iterated to produce a list of all
38  /// db names. This list will be sorted and unique. Note that
39  /// only vdbs are returned (blast dbs are ignored)
40  ///
41  /// @param dbname
42  /// Can be a mix of blast db and vdb names
43  /// @param paths
44  /// If recurisve, it will transverse down the alias tree
45  /// and reolsve all the paths for vdbs found (Note: no alias file returned)
46  /// In the non-recurisve case, function will return any dbs and alias files
47  /// found from the top-level node
48  /// @param db_alias_list
49  /// The returned set of blast alias names
50  /// If recursive, will return all blast db alias files found
51  /// Otherwise only the top level blast db alias files are returned
52  /// @param vdb_alias_list
53  /// The returned set of blast alias names (same recursive behaviour as db_alias_list)
54  /// @param recursive
55  /// If true will descend the alias tree to the volume nodes
56  /// @param expand_link
57  /// If ture, links are expanded in the resolved paths
58 
59  static void FindVDBPaths(const string & dbname,
60  bool isProtein,
61  vector<string> & paths,
62  vector<string> * db_alias_list = NULL,
63  vector<string> * vdb_alias_list = NULL,
64  bool recursive = true,
65  bool expand_links = true,
66  bool verify_dbs = true);
67 
68  /// Process a list with mixed blast dbs and vdbs
69  /// Expand all alais file to find and return vdbs with full path
70  /// Return a modified input_list where top level
71  /// vdbs and vdb alias files are filtered out (safe for CSeqDB)
72  /// @param input_list input list with mixed vdbs and blast dbs
73  /// @param isProtein is protein db ?
74  /// @param vdb_list expanded vdb list with full path delimited by " "
75  /// @param blastdb_list top level blast db list delimited by " "
76  /// @param expand and check vdb list
77  static void ProcessMixedDBsList(const string & input_list,
78  bool isProtein,
79  vector<string> & vdb_list,
80  string & blastdb_list,
81  bool verify_vdbs);
82 
83 };
84 
85 
87 
88 #endif /* ALGO_BLAST_VDB___VDBSRC_VDBALIAS_HPP */
89 
90 
CVDBAliasNode class.
Definition: vdbalias.cpp:55
CVDBAliasFile class.
Definition: vdbalias.hpp:31
static void FindVDBPaths(const string &dbname, bool isProtein, vector< string > &paths, vector< string > *db_alias_list=NULL, vector< string > *vdb_alias_list=NULL, bool recursive=true, bool expand_links=true, bool verify_dbs=true)
Get the list of vdb names.
Definition: vdbalias.cpp:620
static void ProcessMixedDBsList(const string &input_list, bool isProtein, vector< string > &vdb_list, string &blastdb_list, bool verify_vdbs)
Process a list with mixed blast dbs and vdbs Expand all alais file to find and return vdbs with full ...
Definition: vdbalias.cpp:658
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define NULL
Definition: ncbistd.hpp:225
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
char * dbname(DBPROCESS *dbproc)
Get name of current database.
Definition: dblib.c:6929
Defines to provide correct exporting from DLLs in some configurations.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
USING_SCOPE(ncbi::objects)
Modified on Tue Apr 16 20:11:05 2024 by modify_doxy.py rev. 669887