root/trunk/ARBDB/arbdb_base.h

Revision 8499, 2.1 KB (checked in by westram, 2 months ago)
  • several changes to quark-functions
    • split GB_key_2_quark into GB_find_existing_quark + GB_find_or_create_quark
    • replaced weird gb_key_2_quark
      • by gb_find_or_create_NULL_quark (one occurrance)
      • by gb_find_or_create_quark
    • several functions unnecessarily created new quarks
      • gb_find_internal (when searching for non-existing keys)
      • GB_first_marked/GB_following_marked (when iterating over non-existant keys)
      • GB_has_key (when checking for non-existant key)
  • updated some binary test-databases (patch slighty changed order of system keys)
Line 
1// ================================================================ //
2//                                                                  //
3//   File      : arbdb_base.h                                       //
4//   Purpose   : most minimal ARBDB interface                       //
5//               provide functions/types needed for arb_assert.h    //
6//                                                                  //
7//   Coded by Ralf Westram (coder@reallysoft.de) in December 2008   //
8//   Institute of Microbiology (Technical University Munich)        //
9//   http://www.arb-home.de/                                        //
10//                                                                  //
11// ================================================================ //
12
13#ifndef ARBDB_BASE_H
14#define ARBDB_BASE_H
15
16#ifndef _GLIBCXX_CSTDIO
17#include <cstdio>
18#endif
19#ifndef ARB_CORE_H
20#include <arb_core.h>
21#endif
22
23#define NOT4PERL                                    // function definitions starting with NOT4PERL are not included into the ARB-perl-interface
24
25typedef const char *GB_CSTR;                        // read-only
26typedef char       *GB_BUFFER;                      // points to a piece of mem (writeable, but don't free!)*/
27typedef const char *GB_CBUFFER;                     // points to a piece of mem (readable only)*/
28
29struct GBDATA;
30struct GB_HASH;
31
32typedef int GBQUARK; // -1 = any quark, 0 = no quark, >0 explicit quark
33
34typedef float GBT_LEN;
35struct        GBT_TREE;
36
37typedef unsigned int       GB_UINT4;                // 4 byte! @@@ use uint32_t ?
38typedef const unsigned int GB_CUINT4;
39
40typedef unsigned long GB_ULONG;
41typedef const float   GB_CFLOAT;
42
43
44enum GB_CB_TYPE {
45    GB_CB_NONE        = 0,
46    GB_CB_DELETE      = 1,
47    GB_CB_CHANGED     = 2, // element or son of element changed
48    GB_CB_SON_CREATED = 4, // new son created
49    GB_CB_ALL         = 7
50};
51
52enum GB_alignment_type {
53    GB_AT_UNKNOWN,
54    GB_AT_RNA,      // Nucleotide sequence (U)
55    GB_AT_DNA,      // Nucleotide sequence (T)
56    GB_AT_AA,       // AminoAcid
57};
58
59#else
60#error arbdb_base.h included twice
61#endif // ARBDB_BASE_H
Note: See TracBrowser for help on using the browser.