ARB
ali_pt.hxx
Go to the documentation of this file.
1 // =============================================================== //
2 // //
3 // File : ali_pt.hxx //
4 // Purpose : //
5 // //
6 // Institute of Microbiology (Technical University Munich) //
7 // http://www.arb-home.de/ //
8 // //
9 // =============================================================== //
10 
11 #ifndef ALI_PT_HXX
12 #define ALI_PT_HXX
13 
14 #ifndef ALI_OTHER_STUFF_HXX
15 #include "ali_other_stuff.hxx"
16 #endif
17 #ifndef ALI_TLIST_HXX
18 #include "ali_tlist.hxx"
19 #endif
20 #ifndef ALI_SEQUENCE_HXX
21 #include "ali_sequence.hxx"
22 #endif
23 #ifndef CLIENT_H
24 #include <client.h>
25 #endif
26 
28 
30  char *servername;
32 
34  float percent_min;
35  unsigned long fam_list_max;
36  unsigned long ext_list_max;
37 
39 };
40 
41 // class of family members
42 struct ali_pt_member : virtual Noncopyable {
43  char *name;
44  int matches;
45 
46  ali_pt_member(char *speciesname, int number_of_matches) {
47  name = speciesname;
48  matches = number_of_matches;
49  }
51  if (name)
52  free((char *) name);
53  }
54 };
55 
56 
57 // Class for accessing the PT server
58 class ALI_PT : virtual Noncopyable {
59 private:
60  ALI_PT_MODE mode;
61 
62  char *specified_family;
63  unsigned long fam_list_max;
64  unsigned long ext_list_max;
65  float percent_min;
66  int matches_min;
67 
68  aisc_com *link;
69  T_PT_LOCS locs;
70  T_PT_MAIN com;
71 
72  ALI_TLIST<ali_pt_member *> *family_list;
73  ALI_TLIST<ali_pt_member *> *extension_list;
74 
75 
76  int init_communication();
77  char *get_family_member(char *specified_family, unsigned long number);
78  char *get_extension_member(char *specified_family, unsigned long number);
79  int open(char *servername);
80  void close();
81 
82 public:
83  ALI_PT(ALI_PT_CONTEXT *context);
84  ~ALI_PT();
85 
86  int find_family(ALI_SEQUENCE *sequence, int find_type = 1);
87 
90 
91  int first_family_(char **seq_name, int *matches);
92  int next_family_(char **seq_name, int *matches);
93 };
94 
95 #else
96 #error ali_pt.hxx included twice
97 #endif // ALI_PT_HXX
~ali_pt_member()
Definition: ali_pt.hxx:50
int find_family(ALI_SEQUENCE *sequence, int find_type=1)
Definition: ali_pt.cxx:177
ALI_PT_MODE
Definition: ali_pt.hxx:27
float percent_min
Definition: ali_pt.hxx:34
ALI_PT(ALI_PT_CONTEXT *context)
Definition: ali_pt.cxx:132
char * name
Definition: ali_pt.hxx:43
ali_pt_member(char *speciesname, int number_of_matches)
Definition: ali_pt.hxx:46
ALI_TLIST< ali_pt_member * > * get_family_list()
Definition: ali_pt.cxx:302
char * servername
Definition: ali_pt.hxx:30
GBDATA * gb_main
Definition: ali_pt.hxx:31
ALI_TLIST< ali_pt_member * > * get_extension_list()
Definition: ali_pt.cxx:312
unsigned long ext_list_max
Definition: ali_pt.hxx:36
~ALI_PT()
Definition: ali_pt.cxx:159
char * use_specified_family
Definition: ali_pt.hxx:38
int next_family_(char **seq_name, int *matches)
int first_family_(char **seq_name, int *matches)
int matches_min
Definition: ali_pt.hxx:33
unsigned long fam_list_max
Definition: ali_pt.hxx:35