source: tags/arb-6.0/BINDINGS/PERL/ARB.pm

Last change on this file was 8848, checked in by epruesse, 12 years ago

Added Python bindings using SWIG

Build and clean targets are "bindings" and "bindings_clean"; they
are not added to all and clean yet. The "test.py" shows a bit of
the python usage of the interface. You need to have swig installed,
of course.

The bindings are not build from arb_prot.h like the perl bindings.
Rather, ARB.i defines the exported functions. This is to make the
interface smaller and have an avenue of keeping it stable in case
the library interface needs to be changed. It also cuts down on
compile time a lot.

The idea is to eventually build the perl bindings with SWIG as well.
I haven't figured out how to provide the BIO:: module with the
ARB module yet, though, which would be required for backwards
compatability with pre-existing amc scripts.

File size: 1.9 KB
Line 
1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 1.3.40
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
6
7package ARB;
8use base qw(Exporter);
9use base qw(DynaLoader);
10package ARBc;
11bootstrap ARB;
12package ARB;
13@EXPORT = qw();
14
15# ---------- BASE METHODS -------------
16
17package ARB;
18
19sub TIEHASH {
20    my ($classname,$obj) = @_;
21    return bless $obj, $classname;
22}
23
24sub CLEAR { }
25
26sub FIRSTKEY { }
27
28sub NEXTKEY { }
29
30sub FETCH {
31    my ($self,$field) = @_;
32    my $member_func = "swig_${field}_get";
33    $self->$member_func();
34}
35
36sub STORE {
37    my ($self,$field,$newval) = @_;
38    my $member_func = "swig_${field}_set";
39    $self->$member_func($newval);
40}
41
42sub this {
43    my $ptr = shift;
44    return tied(%$ptr);
45}
46
47
48# ------- FUNCTION WRAPPERS --------
49
50package ARB;
51
52*open = *ARBc::open;
53*save = *ARBc::save;
54*save_as = *ARBc::save_as;
55*close = *ARBc::close;
56*get_db_path = *ARBc::get_db_path;
57*abort_transaction = *ARBc::abort_transaction;
58*begin_transaction = *ARBc::begin_transaction;
59*commit_transaction = *ARBc::commit_transaction;
60*write_flag = *ARBc::write_flag;
61*read_flag = *ARBc::read_flag;
62*check_key = *ARBc::check_key;
63*search = *ARBc::search;
64*await_error = *ARBc::await_error;
65*checksum = *ARBc::checksum;
66*read_string = *ARBc::read_string;
67*read_as_string = *ARBc::read_as_string;
68*read_name = *ARBc::read_name;
69*write_int = *ARBc::write_int;
70*write_string = *ARBc::write_string;
71*remote_action = *ARBc::remote_action;
72*remote_awar = *ARBc::remote_awar;
73*remote_read_awar = *ARBc::remote_read_awar;
74*first_species = *ARBc::first_species;
75*next_species = *ARBc::next_species;
76*first_marked_species = *ARBc::first_marked_species;
77*next_marked_species = *ARBc::next_marked_species;
78*GBT_get_default_alignment = *ARBc::GBT_get_default_alignment;
79*message = *ARBc::message;
80
81# ------- VARIABLE STUBS --------
82
83package ARB;
84
851;
Note: See TracBrowser for help on using the repository browser.