source: branches/alilink/UNIT_TESTER/run/xsub/ptype.header

Last change on this file was 9727, checked in by westram, 12 years ago
  • arb_proto_2_xsub
    • fix SEGV (when input header contained a struct)
    • allow some amount of non-prototype code in headers used as xsub input (see examples)
      • forward decls
      • typedefs
      • structs/classes/inline functions (opening brace needs to be on 1st line!)
File size: 3.6 KB
Line 
1/* ARB database interface.
2 *
3 * This file is generated by aisc_mkpt.
4 * Any changes you make here will be overwritten later!
5 */
6
7#ifndef AD_PROT_H
8#define AD_PROT_H
9
10/* define ARB attributes: */
11#ifndef ATTRIBUTES_H
12# include <attributes.h>
13#endif
14
15
16/* adExperiment.cxx */
17GBDATA *EXP_get_experiment_data(GBDATA *gb_species);
18GBDATA *EXP_find_experiment_rel_exp_data(GBDATA *gb_experiment_data, const char *name);
19
20/* adGene.cxx */
21bool GEN_is_genome_db(GBDATA *gb_main, int default_value);
22GEN_position *GEN_new_position(int parts, bool joinable);
23const char *GEN_origin_organism(GBDATA *gb_pseudo);
24long GEN_get_organism_count(GBDATA *gb_main);
25char *GEN_global_gene_identifier(GBDATA *gb_gene, GBDATA *gb_organism);
26
27/* adTest.cxx */
28const char *GB_get_type_name(GBDATA *gbd);
29void GB_dump_db_path(GBDATA *gbd);
30NOT4PERL void GB_dump(GBDATA *gbd);
31GB_ERROR GB_fix_database(GBDATA *gb_main);
32
33/* ad_load.cxx */
34void GB_set_verbose(void);
35void GB_set_next_main_idx(long idx);
36GBDATA *GB_open(const char *path, const char *opent);
37GB_ERROR GBT_check_arb_file(const char *name) __ATTR__USERESULT;
38
39/* ad_save_load.cxx */
40GB_ERROR GB_delete_database(GB_CSTR filename);
41
42/* adcache.cxx */
43char *GB_set_cache_size(GBDATA *gbd, size_t size);
44
45class forwardDeclared;
46struct declForward;
47
48/* adcomm.cxx */
49GB_ERROR GBCMS_open(const char *path, long timeout, GBDATA *gb_main);
50void GBCMS_shutdown(GBDATA *gbd);
51
52struct realDecl {
53    long member; // comment
54
55    int GB_member_function(GBDATA *gbd); // no xsub for member funs
56    bool GB_inline_member_function(GBDATA *gbd) {
57        return gbd!=0;
58    }
59};
60
61/* adindex.cxx */
62GB_ERROR GB_create_index(GBDATA *gbd, const char *key, GB_CASE case_sens, long estimated_size) __ATTR__USERESULT;
63NOT4PERL void GB_dump_indices(GBDATA *gbd);
64GB_ERROR GB_request_undo_type(GBDATA *gb_main, GB_UNDO_TYPE type) __ATTR__USERESULT_TODO;
65GB_UNDO_TYPE GB_get_requested_undo_type(GBDATA *gb_main);
66GB_ERROR GB_undo(GBDATA *gb_main, GB_UNDO_TYPE type) __ATTR__USERESULT;
67
68inline bool inlined_function(char *bla) {
69    return bla;
70}
71
72/* adquery.cxx */
73GBDATA *GB_find_sub_by_quark(GBDATA *father, GBQUARK key_quark, GBDATA *after, size_t skip_over);
74GBDATA *GB_find(GBDATA *gbd, const char *key, GB_SEARCH_TYPE gbs);
75GBDATA *GB_find_string(GBDATA *gbd, const char *key, const char *str, GB_CASE case_sens, GB_SEARCH_TYPE gbs);
76char *GB_command_interpreter(GBDATA *gb_main, const char *str, const char *commands, GBDATA *gbd, const char *default_tree_name);
77
78// comment with { (comments are ignored)
79
80/* adsocket.cxx */
81char *GB_read_fp(FILE *in);
82GB_ULONG GB_time_of_day(void);
83void GB_split_full_path(const char *fullpath, char **res_dir, char **res_fullname, char **res_name_only, char **res_suffix);
84
85// comment with }
86
87#ifdef UNIT_TESTS
88#define TEST_SERVER_ID (-666)
89#define TEST_GENESERVER_ID (-667)
90#endif
91
92typedef int something;
93
94/* arbdb.cxx */
95double GB_atof(const char *str);
96GB_BUFFER GB_give_buffer(size_t size);
97void GB_atexit(void (*exitfun)());
98GB_TYPES GB_read_type(GBDATA *gbd);
99GBQUARK GB_find_existing_quark(GBDATA *gbd, const char *key);
100GBDATA *GB_create(GBDATA *father, const char *key, GB_TYPES type);
101
102#else
103#error ad_prot.h included twice
104#endif /* AD_PROT_H */
105/* ARB toolkit.
106 *
107 * This file is generated by aisc_mkpt.
108 * Any changes you make here will be overwritten later!
109 */
110
111#ifndef AD_T_PROT_H
112#define AD_T_PROT_H
113
114/* define ARB attributes: */
115#ifndef ATTRIBUTES_H
116# include <attributes.h>
117#endif
118
119GB_TYPES GBT_get_type_of_changekey(GBDATA *gb_main, const char *field_name, const char *change_key_path);
120GB_ERROR GBT_write_sequence(GBDATA *gb_data, const char *ali_name, long ali_len, const char *sequence);
121
122#else
123#error ad_t_prot.h included twice
124#endif /* AD_T_PROT_H */
Note: See TracBrowser for help on using the repository browser.