mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-04 21:54:27 +08:00
* swig csharp wrappers now build * fix this in a way that does not break the java wrappers
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 2015, Novartis Institutes for BioMedical Research Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
||||
* nor the names of its contributors may be used to endorse or promote
|
||||
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
||||
* nor the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <GraphMol/FilterCatalog/FilterMatcherBase.h>
|
||||
#include <GraphMol/FilterCatalog/FilterCatalogEntry.h>
|
||||
#include <GraphMol/FilterCatalog/FilterCatalog.h>
|
||||
|
||||
|
||||
// bug fix for swig, it removes these from their namespaces
|
||||
typedef RDCatalog::Catalog<RDKit::FilterCatalogEntry, RDKit::FilterCatalogParams>::paramType_t paramType_t;
|
||||
typedef RDCatalog::Catalog<RDKit::FilterCatalogEntry, RDKit::FilterCatalogParams>::entryType_t entryType_t;
|
||||
@@ -97,7 +97,7 @@
|
||||
std::string str(data.begin(), data.end());
|
||||
return new RDKit::FilterCatalog(str);
|
||||
}
|
||||
|
||||
|
||||
bool canSerialize() const {
|
||||
return RDKit::FilterCatalogCanSerialize();
|
||||
}
|
||||
@@ -110,7 +110,7 @@
|
||||
RDKit::FilterCatalog::CONST_SENTRY res = self->getFirstMatch(mol);
|
||||
return boost::const_pointer_cast<RDKit::FilterCatalogEntry>(res);
|
||||
}
|
||||
|
||||
|
||||
std::vector<boost::shared_ptr<RDKit::FilterCatalogEntry> > getMatches(const ROMol &mol) {
|
||||
std::vector<RDKit::FilterCatalog::CONST_SENTRY> matches = self->getMatches(mol);
|
||||
std::vector<RDKit::FilterCatalog::SENTRY> res;
|
||||
@@ -125,7 +125,7 @@
|
||||
unsigned int addEntry(boost::shared_ptr<RDKit::FilterCatalogEntry> entry) {
|
||||
return self->addEntry(entry);
|
||||
}
|
||||
|
||||
|
||||
bool removeEntry(boost::shared_ptr<RDKit::FilterCatalogEntry> entry) {
|
||||
return self->removeEntry(entry);
|
||||
}
|
||||
@@ -133,7 +133,7 @@
|
||||
// swig const-ptr shenanigans again
|
||||
boost::shared_ptr<RDKit::FilterCatalogEntry> getEntry(unsigned int idx) const {
|
||||
return boost::const_pointer_cast<RDKit::FilterCatalogEntry>(
|
||||
self->getEntry(idx));
|
||||
self->getEntry(idx));
|
||||
}
|
||||
|
||||
unsigned int getIdxForEntry(const boost::shared_ptr<FilterCatalogEntry> &entry) const {
|
||||
@@ -157,6 +157,7 @@
|
||||
%ignore RDKit::Dict::getPropList;
|
||||
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(jni) std::string RDKit::FilterCatalog::Serialize "jbyteArray"
|
||||
%typemap(jtype) std::string RDKit::FilterCatalog::Serialize "byte[]"
|
||||
%typemap(jstype) std::string RDKit::FilterCatalog::Serialize "byte[]"
|
||||
@@ -167,7 +168,7 @@
|
||||
$result = JCALL1(NewByteArray, jenv, $1.size());
|
||||
JCALL4(SetByteArrayRegion, jenv, $result, 0, $1.size(), (const jbyte*)$1.c_str());
|
||||
}
|
||||
|
||||
#endif
|
||||
%include <GraphMol/FilterCatalog/FilterMatcherBase.h>
|
||||
%include <GraphMol/FilterCatalog/FilterCatalogEntry.h>
|
||||
%include <GraphMol/FilterCatalog/FilterCatalog.h>
|
||||
|
||||
@@ -199,6 +199,7 @@ typedef unsigned long long int uintmax_t;
|
||||
%include "../types.i"
|
||||
// Conformer seems to need to come before ROMol
|
||||
%include "../Conformer.i"
|
||||
%include "../Dict.i"
|
||||
%include "../RDProps.i"
|
||||
%include "../ROMol.i"
|
||||
%include "../RWMol.i"
|
||||
@@ -212,6 +213,7 @@ typedef unsigned long long int uintmax_t;
|
||||
%include "../QueryAtom.i"
|
||||
%include "../QueryBond.i"
|
||||
%include "../QueryOps.i"
|
||||
%include "../MonomerInfo.i"
|
||||
%include "../PeriodicTable.i"
|
||||
%include "../SanitException.i"
|
||||
%include "../SmilesParse.i"
|
||||
|
||||
Reference in New Issue
Block a user