File: AWT_attributes.cxx

package info (click to toggle)
arb 6.0.6-8
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 66,204 kB
  • sloc: ansic: 394,911; cpp: 250,290; makefile: 19,644; sh: 15,879; perl: 10,473; fortran: 6,019; ruby: 683; xml: 503; python: 53; awk: 32
file content (38 lines) | stat: -rw-r--r-- 1,572 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//  ==================================================================== //
//                                                                       //
//    File      : AWT_attributes.cxx                                     //
//    Purpose   : get attribute colors for species/genes                 //
//                                                                       //
//                                                                       //
//  Coded by Ralf Westram (coder@reallysoft.de) in July 2004             //
//  Copyright Department of Microbiology (Technical University Munich)   //
//                                                                       //
//  Visit our web site at: http://www.arb-home.de/                       //
//                                                                       //
//  ==================================================================== //

#include "awt_attributes.hxx"

#include <arbdb.h>
#include <aw_color_groups.hxx>

using namespace std;

// faked attribute-interface (currently uses deprecated color groups)

int AWT_gene_get_dominant_color(GBDATA *gb_gene) {
    return AW_find_color_group(gb_gene, false);
}

int AWT_species_get_dominant_color(GBDATA *gb_species) {
    return AW_find_color_group(gb_species, false);
}

bool AWT_gene_has_attribute(GBDATA *gb_gene, int attribute_nr) {
    return AW_find_color_group(gb_gene, true) == attribute_nr;
}
bool AWT_species_has_attribute(GBDATA *gb_species, int attribute_nr) {
    return AW_find_color_group(gb_species, true) == attribute_nr;
}