112
112
%include <openbabel/obconversion.h>
113
113
%include <openbabel/residue.h>
114
114
%include <openbabel/internalcoord.h>
116
%typemap(javacode) OpenBabel::OBAtom
118
private int currentDepth = 0;
119
public void SetCurrentDepth(int d) {currentDepth = d;}
120
public int GetCurrentDepth() {return currentDepth;}
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 &);
148
157
%ignore SpaceGroup::RegisterSpaceGroup;
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
168
public Iterator<RETURNS> iterator() {
172
public boolean hasNext() {
176
public RETURNS next() {
177
RETURNS atom = __ref__();
183
public void remove() {
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, );
150
201
%include <openbabel/obiter.h>