1 | // =============================================================== // |
---|
2 | // // |
---|
3 | // File : ap_main.hxx // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // Institute of Microbiology (Technical University Munich) // |
---|
7 | // http://www.arb-home.de/ // |
---|
8 | // // |
---|
9 | // =============================================================== // |
---|
10 | |
---|
11 | #ifndef AP_MAIN_HXX |
---|
12 | #define AP_MAIN_HXX |
---|
13 | |
---|
14 | #ifndef AP_BUFFER_HXX |
---|
15 | #include "AP_buffer.hxx" |
---|
16 | #endif |
---|
17 | #ifndef TREEDISPLAY_HXX |
---|
18 | #include <TreeDisplay.hxx> |
---|
19 | #endif |
---|
20 | |
---|
21 | #define AWAR_ALIGNMENT "tmp/pars/alignment" |
---|
22 | #define AWAR_FILTER_NAME "tmp/pars/filter/name" |
---|
23 | #define AWAR_FILTER_FILTER "tmp/pars/filter/filter" |
---|
24 | #define AWAR_FILTER_ALIGNMENT "tmp/pars/filter/alignment" |
---|
25 | #define AWAR_PARSIMONY "tmp/pars/parsimony" |
---|
26 | #define AWAR_BEST_PARSIMONY "tmp/pars/best_parsimony" |
---|
27 | #define AWAR_STACKPOINTER "tmp/pars/stackpointer" |
---|
28 | |
---|
29 | #define AWAR_PARS_TYPE "pars/pars_type" |
---|
30 | |
---|
31 | enum PARS_pars_type { |
---|
32 | PARS_WAGNER, |
---|
33 | PARS_TRANSVERSION |
---|
34 | }; |
---|
35 | |
---|
36 | struct PARS_commands { |
---|
37 | bool add_marked; |
---|
38 | bool add_selected; |
---|
39 | bool calc_branch_lengths; |
---|
40 | bool calc_bootstrap; |
---|
41 | bool quit; |
---|
42 | |
---|
43 | PARS_commands() |
---|
44 | : add_marked(false) |
---|
45 | , add_selected(false) |
---|
46 | , calc_branch_lengths(false) |
---|
47 | , calc_bootstrap(false) |
---|
48 | , quit(false) |
---|
49 | { |
---|
50 | } |
---|
51 | }; |
---|
52 | |
---|
53 | class AP_tree_nlen; |
---|
54 | class AWT_graphic_tree; |
---|
55 | |
---|
56 | class AP_main : virtual Noncopyable { |
---|
57 | AP_main_stack *stack; |
---|
58 | AP_main_list list; |
---|
59 | unsigned long stack_level; |
---|
60 | AWT_graphic_tree *agt; // provides access to tree! |
---|
61 | unsigned long user_push_counter; |
---|
62 | |
---|
63 | public: |
---|
64 | AP_main() |
---|
65 | : stack(NULL), |
---|
66 | stack_level(0), |
---|
67 | agt(NULL), |
---|
68 | user_push_counter(0) |
---|
69 | {} |
---|
70 | ~AP_main() { |
---|
71 | delete stack; |
---|
72 | } |
---|
73 | |
---|
74 | void set_tree_root(AWT_graphic_tree *agt_); |
---|
75 | AWT_graphic_tree *get_tree_root() { return agt; } |
---|
76 | |
---|
77 | DEFINE_DOWNCAST_ACCESSORS(AP_tree_nlen, get_root_node, agt->get_root_node()); |
---|
78 | |
---|
79 | const char *get_aliname() const; |
---|
80 | unsigned long get_user_push_counter() const { return user_push_counter; } |
---|
81 | |
---|
82 | GB_ERROR open(const char *db_server); |
---|
83 | |
---|
84 | void user_push(); |
---|
85 | void user_pop(); |
---|
86 | void push(); |
---|
87 | void pop(); |
---|
88 | void push_node(AP_tree_nlen *node, AP_STACK_MODE); |
---|
89 | void clear(); // clears all buffers |
---|
90 | }; |
---|
91 | |
---|
92 | extern AP_main *ap_main; |
---|
93 | extern GBDATA *GLOBAL_gb_main; |
---|
94 | |
---|
95 | #else |
---|
96 | #error ap_main.hxx included twice |
---|
97 | #endif // AP_MAIN_HXX |
---|