| 1 | /* -------------------------------------------------------------------------------- |
|---|
| 2 | * File : ARB.xs.default |
|---|
| 3 | * Purpose : Skeleton and predefined functions for ARB perl interface |
|---|
| 4 | * Copyright : Lehrstuhl fuer Mikrobiologie, TU Muenchen |
|---|
| 5 | * -------------------------------------------------------------------------------- */ |
|---|
| 6 | |
|---|
| 7 | #ifdef __cplusplus |
|---|
| 8 | extern "C" { |
|---|
| 9 | #endif |
|---|
| 10 | #include "EXTERN.h" |
|---|
| 11 | #include "perl.h" |
|---|
| 12 | #include "XSUB.h" |
|---|
| 13 | #include "debug.h" |
|---|
| 14 | #include "arbdb.h" |
|---|
| 15 | #include "arbdbt.h" |
|---|
| 16 | #include "adGene.h" |
|---|
| 17 | #include "ARB_ext.c" |
|---|
| 18 | #ifdef __cplusplus |
|---|
| 19 | } |
|---|
| 20 | #endif |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | MODULE = ARB PACKAGE = ARB PREFIX = P2A_ |
|---|
| 24 | |
|---|
| 25 | PROTOTYPES: ENABLE |
|---|
| 26 | |
|---|
| 27 | # -------------------------------------------------------------------------------- |
|---|
| 28 | # the following functions are hand-coded in ARB.xs.default: |
|---|
| 29 | |
|---|
| 30 | GBDATA * |
|---|
| 31 | P2A_search(gbd,str,type_of_entry) |
|---|
| 32 | GBDATA *gbd |
|---|
| 33 | char *str |
|---|
| 34 | char *type_of_entry |
|---|
| 35 | |
|---|
| 36 | CODE: |
|---|
| 37 | if (str[0] == 0) str = 0; |
|---|
| 38 | RETVAL = GB_search(gbd,str,GBP_gb_types(type_of_entry)); |
|---|
| 39 | OUTPUT: |
|---|
| 40 | RETVAL |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | GBDATA* |
|---|
| 44 | P2A_find(gbd,key,gbs) |
|---|
| 45 | GBDATA *gbd |
|---|
| 46 | char *key |
|---|
| 47 | char *gbs |
|---|
| 48 | |
|---|
| 49 | CODE: |
|---|
| 50 | RETVAL = GB_find(gbd,key,GBP_search_mode(gbs)); |
|---|
| 51 | OUTPUT: |
|---|
| 52 | RETVAL |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | GBDATA * |
|---|
| 56 | P2A_create(father,key,type) |
|---|
| 57 | GBDATA *father |
|---|
| 58 | char *key |
|---|
| 59 | char *type |
|---|
| 60 | |
|---|
| 61 | CODE: |
|---|
| 62 | RETVAL = GB_create(father,key,GBP_gb_types(type)); |
|---|
| 63 | OUTPUT: |
|---|
| 64 | RETVAL |
|---|
| 65 | |
|---|
| 66 | char * |
|---|
| 67 | P2A_request_undo_type(gb_main,type) |
|---|
| 68 | GBDATA *gb_main |
|---|
| 69 | char *type |
|---|
| 70 | |
|---|
| 71 | CODE: |
|---|
| 72 | RETVAL = (char *)GB_request_undo_type(gb_main,GBP_undo_types(type)); |
|---|
| 73 | OUTPUT: |
|---|
| 74 | RETVAL |
|---|
| 75 | |
|---|
| 76 | char * |
|---|
| 77 | P2A_undo(gb_main,type) |
|---|
| 78 | GBDATA *gb_main |
|---|
| 79 | char *type |
|---|
| 80 | |
|---|
| 81 | CODE: |
|---|
| 82 | RETVAL = (char *)GB_undo(gb_main,GBP_undo_types(type)); |
|---|
| 83 | OUTPUT: |
|---|
| 84 | RETVAL |
|---|
| 85 | |
|---|
| 86 | char * |
|---|
| 87 | P2A_undo_info(gb_main,type) |
|---|
| 88 | GBDATA *gb_main |
|---|
| 89 | char *type |
|---|
| 90 | |
|---|
| 91 | CODE: |
|---|
| 92 | if (static_pntr) free(static_pntr); |
|---|
| 93 | static_pntr = GB_undo_info(gb_main,GBP_undo_types(type)); |
|---|
| 94 | RETVAL = static_pntr; |
|---|
| 95 | OUTPUT: |
|---|
| 96 | RETVAL |
|---|
| 97 | |
|---|
| 98 | GBDATA * |
|---|
| 99 | P2AT_open_table_field(gb_table,key,type) |
|---|
| 100 | GBDATA *gb_table |
|---|
| 101 | char *key |
|---|
| 102 | char *type |
|---|
| 103 | |
|---|
| 104 | CODE: |
|---|
| 105 | RETVAL = GBT_open_table_field(gb_table,key,GBP_gb_types(type)); |
|---|
| 106 | OUTPUT: |
|---|
| 107 | RETVAL |
|---|
| 108 | |
|---|
| 109 | |
|---|
| 110 | char |
|---|
| 111 | P2AT_complementNucleotide(c,T_or_U) |
|---|
| 112 | char c |
|---|
| 113 | char T_or_U |
|---|
| 114 | |
|---|
| 115 | CODE: |
|---|
| 116 | RETVAL = GBT_complementNucleotide(c,T_or_U); |
|---|
| 117 | OUTPUT: |
|---|
| 118 | RETVAL |
|---|
| 119 | |
|---|
| 120 | long |
|---|
| 121 | P2AT_read_int(gb_container,fieldpath) |
|---|
| 122 | GBDATA *gb_container |
|---|
| 123 | char *fieldpath |
|---|
| 124 | CODE: |
|---|
| 125 | { |
|---|
| 126 | long *lp = GBT_read_int(gb_container,fieldpath); |
|---|
| 127 | RETVAL = lp ? *lp : 0; |
|---|
| 128 | } |
|---|
| 129 | OUTPUT: |
|---|
| 130 | RETVAL |
|---|
| 131 | |
|---|
| 132 | double |
|---|
| 133 | P2AT_read_float(gb_container,fieldpath) |
|---|
| 134 | GBDATA *gb_container |
|---|
| 135 | char *fieldpath |
|---|
| 136 | CODE: |
|---|
| 137 | { |
|---|
| 138 | double *dp = GBT_read_float(gb_container,fieldpath); |
|---|
| 139 | RETVAL = dp ? *dp : 0; |
|---|
| 140 | } |
|---|
| 141 | OUTPUT: |
|---|
| 142 | RETVAL |
|---|
| 143 | |
|---|
| 144 | # -------------------------------------------------------------------------------- |
|---|
| 145 | # functions below are auto-generated by ../TOOLS/arb_proto_2_xsub.cxx |
|---|
| 146 | # using prototypes from the following files: |
|---|
| 147 | # |
|---|
| 148 | # ../ARBDB/ad_prot.h |
|---|
| 149 | # ../ARBDB/ad_t_prot.h |
|---|
| 150 | # ../ARBDB/adGene.h |
|---|
| 151 | # -------------------------------------------------------------------------------- |
|---|
| 152 | |
|---|