%module openbabel %{ // used to set import/export for Cygwin DLLs #ifdef WIN32 #define USING_OBDLL #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include %} %include "std_map.i" %include "std_vector.i" %include "std_string.i" namespace std { %template (vectorInt) vector; %template (vectorUnsignedInt) vector; %template (vvInt) vector< vector >; %template (vectorDouble) vector; %template (vVector3) vector; %template (vectorMol) vector; %template (vectorBond) vector; %template (vectorResidue) vector; %template (vectorRing) vector; %template (vectorData) vector; } // These methods are renamed to valid Python method names, as otherwise // they cannot be used from Python %rename(inc) *::operator++; %rename(good) *::operator bool; %rename(deref) *::operator->; %import %apply std::string &OUTPUT { std::string &to }; %include %include %include %include %include %include %import %import %import %include %template (pluginiterFingerprint) OpenBabel::PluginIter; %include %include %include %include %include %include %include %include %include # The following %ignores avoid warning messages due to shadowed classes. # This does not imply a loss of functionality as (in this case) # the shadowed class is identical (from the point of view of SWIG) to # the shadowing class. # This is because C++ references (&) are transformed by SWIG back into # pointers, so that OBAtomIter(OBMol &) would be treated the same as # OBAtomIter(OBMol *). %ignore OBAtomAtomIter(OBAtom &); %ignore OBAtomBondIter(OBAtom &); %ignore OBMolAngleIter(OBMol &); %ignore OBMolAtomIter(OBMol &); %ignore OBMolAtomBFSIter(OBMol &); %ignore OBMolAtomDFSIter(OBMol &); %ignore OBMolBondIter(OBMol &); %ignore OBMolPairIter(OBMol &); %ignore OBMolRingIter(OBMol &); %ignore OBMolTorsionIter(OBMol &); %ignore OBResidueIter(OBMol &); %ignore OBResidueAtomIter(OBResidue &); %ignore *::operator=; %include