source: branches/port5/SECEDIT/SEC_bonddef.hxx

Last change on this file was 5675, checked in by westram, 16 years ago
  • removed automatic timestamps (the best they were good for, were vc-conflicts)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1// ================================================================= //
2//                                                                   //
3//   File      : sec_bonddef.hxx                                     //
4//   Purpose   :                                                     //
5//                                                                   //
6//   Coded by Ralf Westram (coder@reallysoft.de) in September 2007   //
7//   Institute of Microbiology (Technical University Munich)         //
8//   http://www.arb-home.de/                                         //
9//                                                                   //
10// ================================================================= //
11
12#ifndef SEC_BONDDEF_HXX
13#define SEC_BONDDEF_HXX
14
15#ifndef ARBDB_H
16#include <arbdb.h>
17#endif
18
19#ifndef AW_POSITION_HXX
20#include <aw_position.hxx>
21#endif
22
23using namespace AW;
24
25#define SEC_BOND_BASE_CHARS 5
26#define SEC_BOND_BASE_CHAR  "ACGTU"
27#define SEC_BOND_PAIR_CHARS 8
28#define SEC_BOND_PAIR_CHAR  ".o~#=+- @" // order is important for IUPAC bonds
29
30class AW_device;
31class AW_root;
32
33class SEC_bond_def {
34    char              bond[SEC_BOND_BASE_CHARS][SEC_BOND_BASE_CHARS];
35    GB_alignment_type ali_type;
36
37    int       get_index(char c) const;
38    void      clear();
39    GB_ERROR  insert(const char *pairs, char character);
40    char      get_bond(char base1, char base2) const;
41    char     *get_pair_string(char pair_char);
42
43    void paint(AW_device *device, int gc, char bond, const Position& p1, const Position& p2, const Vector& toNextBase, const double& char_radius, AW_CL cd1, AW_CL cd2) const;
44
45public:
46
47    SEC_bond_def(GB_alignment_type aliType) : ali_type(aliType) { clear(); }
48
49    GB_ERROR update(AW_root *awr, const char *changed_awar_name);
50
51    void paint(AW_device *device, char base1, char base2, const Position& p1, const Position& p2, const Vector& toNextBase, const double& char_radius, AW_CL cd1, AW_CL cd2) const;
52};
53
54
55#else
56#error sec_bonddef.hxx included twice
57#endif // SEC_BONDDEF_HXX
Note: See TracBrowser for help on using the repository browser.