ARB
fast_aligner.hxx
Go to the documentation of this file.
1 // =========================================================== //
2 // //
3 // File : fast_aligner.hxx //
4 // Purpose : //
5 // //
6 // Coded by Ralf Westram (coder@reallysoft.de) in 1998 //
7 // Institute of Microbiology (Technical University Munich) //
8 // http://www.arb-home.de/ //
9 // //
10 // =========================================================== //
11 
12 #ifndef FAST_ALIGNER_HXX
13 #define FAST_ALIGNER_HXX
14 
15 #ifndef AW_BASE_HXX
16 #include <aw_base.hxx>
17 #endif
18 #ifndef ARB_ERROR_H
19 #include <arb_error.h>
20 #endif
21 #ifndef POS_RANGE_H
22 #include <pos_range.h>
23 #endif
24 #ifndef _GLIBCXX_STRING
25 #include <string>
26 #endif
27 
28 #define INTEGRATED_ALIGNERS_TITLE "Integrated Aligners"
29 
30 typedef char* (*Aligner_get_consensus_func)(const char *species_name, PosRange range);
31 typedef bool (*Aligner_get_selected_range)(PosRange& range);
32 typedef GBDATA* (*Aligner_get_first_selected_species)(int *total_no_of_selected_species);
33 typedef GBDATA* (*Aligner_get_next_selected_species)(void);
34 typedef char* (*Aligner_get_helix_string)(GBDATA *gb_main, const char *alignment_name); // returns heap-copy!
35 
38 
40 
41  bool do_refresh; // if do_refresh == true then FastAligner_start() does a refresh
42  void (*refresh_display)(); // via calling refresh_display()
43 
44  Aligner_get_consensus_func get_group_consensus; // changed behavior in [8165]: returns only given range
49 
50  char *getHelixString() const { return get_helix_string(gb_main, alignment_name.c_str()); }
51 
53  const char *alignment_name_,
54  bool do_refresh_,
55  void (*refresh_display_)(),
56  Aligner_get_consensus_func get_group_consensus_,
57  Aligner_get_selected_range get_selected_range_,
58  Aligner_get_first_selected_species get_first_selected_species_,
59  Aligner_get_next_selected_species get_next_selected_species_,
60  Aligner_get_helix_string get_helix_string_)
61  : gb_main(gb_main_),
62  alignment_name(alignment_name_),
63  do_refresh(do_refresh_),
64  refresh_display(refresh_display_),
65  get_group_consensus(get_group_consensus_),
66  get_selected_range(get_selected_range_),
67  get_first_selected_species(get_first_selected_species_),
68  get_next_selected_species(get_next_selected_species_),
69  get_helix_string(get_helix_string_)
70  {}
71 
73  : gb_main(other.gb_main),
74  alignment_name(other.alignment_name),
75  do_refresh(other.do_refresh),
77  get_group_consensus(other.get_group_consensus),
78  get_selected_range(other.get_selected_range),
79  get_first_selected_species(other.get_first_selected_species),
80  get_next_selected_species(other.get_next_selected_species),
81  get_helix_string(other.get_helix_string)
82  {}
83 
85 };
86 
87 // --------------------------------------------------------------------------------
88 
90 
94 
95 void FastAligner_start(AW_window *aw, const AlignDataAccess *data_access);
96 ARB_ERROR FastAligner_delete_temp_entries(GBDATA *gb_main, const char *alignment);
97 
98 // --------------------------------------------------------------------------------
99 
100 #else
101 #error fast_aligner.hxx included twice
102 #endif // FAST_ALIGNER_HXX
return string(buffer, length)
void FastAligner_create_variables(AW_root *root, AW_default db1)
AW_window * FastAligner_create_window(AW_root *awr, const AlignDataAccess *data_access)
void FastAligner_start(AW_window *aw, const AlignDataAccess *data_access)
Aligner_get_first_selected_species get_first_selected_species
ARB_ERROR FastAligner_delete_temp_entries(GBDATA *gb_main, const char *alignment)
bool(* Aligner_get_selected_range)(PosRange &range)
void FastAligner_set_align_current(AW_root *root, AW_default db1)
static char * alignment_name
std::string alignment_name
AlignDataAccess(const AlignDataAccess &other)
Aligner_get_next_selected_species get_next_selected_species
char *(* Aligner_get_consensus_func)(const char *species_name, PosRange range)
DECLARE_ASSIGNMENT_OPERATOR(AlignDataAccess)
AlignDataAccess(GBDATA *gb_main_, const char *alignment_name_, bool do_refresh_, void(*refresh_display_)(), Aligner_get_consensus_func get_group_consensus_, Aligner_get_selected_range get_selected_range_, Aligner_get_first_selected_species get_first_selected_species_, Aligner_get_next_selected_species get_next_selected_species_, Aligner_get_helix_string get_helix_string_)
void FastAligner_set_reference_species(AW_root *root)
void(* refresh_display)()
GBDATA *(* Aligner_get_first_selected_species)(int *total_no_of_selected_species)
char * getHelixString() const
char *(* Aligner_get_helix_string)(GBDATA *gb_main, const char *alignment_name)
Aligner_get_selected_range get_selected_range
GBDATA *(* Aligner_get_next_selected_species)(void)
Aligner_get_consensus_func get_group_consensus
Aligner_get_helix_string get_helix_string
GBDATA * gb_main
Definition: adname.cxx:32