~ubuntu-branches/debian/stretch/openbabel/stretch

« back to all changes in this revision

Viewing changes to scripts/openbabel-java.i

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Leidert (dale)
  • Date: 2009-07-17 00:18:06 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090717001806-sy3mzs3e1d1adbs9
Tags: 2.2.2-2
* debian/control (Uploaders): Removed LI Daobing. Thanks for your work!
  (Standards-Version): Bumped to 3.8.2.
  (Vcs-Svn): Fixed vcs-field-uses-not-recommended-uri-format.
* debian/patches/537102_fix_tr1_memory_detection.patch: Added.
  - configure.in, configure, src/config.h.in: Fix detection of tr1/memory to
    prevent building the package with boost (closes: #537102).

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
%include <openbabel/obconversion.h>
113
113
%include <openbabel/residue.h>
114
114
%include <openbabel/internalcoord.h>
 
115
 
 
116
%typemap(javacode) OpenBabel::OBAtom
 
117
%{
 
118
    private int currentDepth = 0;
 
119
    public void SetCurrentDepth(int d) {currentDepth = d;}
 
120
    public int GetCurrentDepth() {return currentDepth;}
 
121
%}
115
122
%include <openbabel/atom.h>
116
123
%include <openbabel/bond.h>
117
124
%include <openbabel/mol.h>
136
143
%ignore OBAtomBondIter(OBAtom &);
137
144
%ignore OBMolAngleIter(OBMol &);
138
145
%ignore OBMolAtomIter(OBMol &);
 
146
%ignore OBMolAtomBFSIter(OBMol &, int);
139
147
%ignore OBMolAtomBFSIter(OBMol &);
 
148
%ignore OBMolAtomDFSIter(OBMol &, int);
140
149
%ignore OBMolAtomDFSIter(OBMol &);
141
150
%ignore OBMolBondIter(OBMol &);
142
151
%ignore OBMolPairIter(OBMol &);
147
156
 
148
157
%ignore SpaceGroup::RegisterSpaceGroup;
149
158
 
 
159
%define WRAPITERATOR(NAME, RETURNS, OPTIONAL)
 
160
 %rename(_next) OpenBabel::NAME::next;
 
161
 %rename(inc) OpenBabel::NAME::operator++;
 
162
 %rename(HasMore) OpenBabel::NAME::operator bool;
 
163
 %typemap(javainterfaces) OpenBabel::NAME "Iterable<RETURNS>, Iterator<RETURNS>";
 
164
 %typemap(javaimports) OpenBabel::NAME "  import org.openbabel.RETURNS;
 
165
  import java.util.Iterator;"
 
166
 %typemap(javacode) OpenBabel::NAME
 
167
 %{
 
168
        public Iterator<RETURNS> iterator() {
 
169
                return this;
 
170
        }
 
171
 
 
172
        public boolean hasNext() {
 
173
                return HasMore();
 
174
        }
 
175
 
 
176
        public RETURNS next() {
 
177
                RETURNS atom = __ref__();
 
178
                OPTIONAL
 
179
                inc();
 
180
                return atom;
 
181
        }
 
182
        
 
183
        public void remove() {
 
184
        }       
 
185
 %}
 
186
%enddef
 
187
 
 
188
WRAPITERATOR(OBMolAtomIter, OBAtom, );
 
189
WRAPITERATOR(OBMolAtomDFSIter, OBAtom, );
 
190
WRAPITERATOR(OBMolAtomBFSIter, OBAtom, atom.SetCurrentDepth(CurrentDepth()););
 
191
WRAPITERATOR(OBMolBondIter, OBBond, );
 
192
WRAPITERATOR(OBMolAngleIter, vectorUnsignedInt, );
 
193
WRAPITERATOR(OBAtomAtomIter, OBAtom, )
 
194
WRAPITERATOR(OBAtomBondIter, OBBond, );
 
195
WRAPITERATOR(OBMolRingIter, OBRing, );
 
196
WRAPITERATOR(OBMolTorsionIter, vectorUnsignedInt, );
 
197
WRAPITERATOR(OBResidueIter, OBResidue, );
 
198
WRAPITERATOR(OBResidueAtomIter, OBAtom, );
 
199
WRAPITERATOR(OBMolPairIter, vectorUnsignedInt, );
 
200
 
150
201
%include <openbabel/obiter.h>
 
202