1 | // ==================================================================== // |
---|
2 | // // |
---|
3 | // File : db_scanner.hxx // |
---|
4 | // Purpose : ARB database scanner // |
---|
5 | // // |
---|
6 | // // |
---|
7 | // Coded by Ralf Westram (coder@reallysoft.de) in May 2005 // |
---|
8 | // Copyright Department of Microbiology (Technical University Munich) // |
---|
9 | // // |
---|
10 | // Visit our web site at: http://www.arb-home.de/ // |
---|
11 | // // |
---|
12 | // ==================================================================== // |
---|
13 | #ifndef DB_SCANNER_HXX |
---|
14 | #define DB_SCANNER_HXX |
---|
15 | |
---|
16 | #ifndef AW_BASE_HXX |
---|
17 | #include <aw_base.hxx> |
---|
18 | #endif |
---|
19 | #ifndef ITEMS_H |
---|
20 | #include <items.h> |
---|
21 | #endif |
---|
22 | |
---|
23 | |
---|
24 | /* Database scanner boxes |
---|
25 | * |
---|
26 | * A scanner show all (recursive) information of a database entry. |
---|
27 | * |
---|
28 | * This information can be organized in two different ways: |
---|
29 | * 1. DB_SCANNER: Show exact all (filtered) information stored in the DB |
---|
30 | * 2. DB_VIEWER: Create a list of all database fields (see FIELD INFORMATION) |
---|
31 | * and if any information is stored under a field append it. |
---|
32 | * |
---|
33 | * example: |
---|
34 | * fields: |
---|
35 | * name, full_name, acc, author |
---|
36 | * |
---|
37 | * DB entries: |
---|
38 | * name:e.coli |
---|
39 | * full_name:esc.coli |
---|
40 | * flag:test |
---|
41 | * |
---|
42 | * -> |
---|
43 | * name: e.coli |
---|
44 | * full_name: esc.coli |
---|
45 | * acc: |
---|
46 | * author: |
---|
47 | */ |
---|
48 | |
---|
49 | enum DB_SCANNERMODE { |
---|
50 | DB_SCANNER, |
---|
51 | DB_VIEWER |
---|
52 | }; |
---|
53 | |
---|
54 | struct DbScanner; // @@@ should publish class DbScanner here. functions below shall become member functions |
---|
55 | |
---|
56 | DbScanner *create_db_scanner(GBDATA *gb_main, |
---|
57 | AW_window *aws, |
---|
58 | const char *box_pos_fig, // the position for the box in the xfig file |
---|
59 | const char *delete_pos_fig, |
---|
60 | const char *edit_pos_fig, |
---|
61 | const char *edit_enable_pos_fig, |
---|
62 | DB_SCANNERMODE scannermode, |
---|
63 | const char *rescan_pos_fig, // DB_VIEWER |
---|
64 | const char *mark_pos_fig, |
---|
65 | long type_filter, |
---|
66 | ItemSelector& selector); |
---|
67 | |
---|
68 | void map_db_scanner(DbScanner *scanner, GBDATA *gb_pntr, const char *key_path); |
---|
69 | |
---|
70 | |
---|
71 | GBDATA *get_db_scanner_main(const DbScanner *scanner); |
---|
72 | char *get_id_of_item_mapped_in(const DbScanner *scanner); |
---|
73 | const ItemSelector& get_itemSelector_of(const DbScanner *scanner); |
---|
74 | |
---|
75 | #else |
---|
76 | #error db_scanner.hxx included twice |
---|
77 | #endif // DB_SCANNER_HXX |
---|
78 | |
---|