Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Template comment:
- /*
- LFunction @ {
- "addBondsDeleteAtoms",
- {{Integer, 2}, {Integer, 1}},
- "Void",
- {bonds, atoms}
- }
- */
- auto-generated C-code:
- extern "C" DLLEXPORT int RDMol_addBondsDeleteAtoms(WolframLibraryData libData, mint Argc, MArgument * Args, MArgument Res) {
- mma::detail::MOutFlushGuard flushguard;
- const mint id = MArgument_getInteger(Args[0]);
- if(RDMol_collection.find(id) == RDMol_collection.end()) {
- libData->Message("noinst");
- return LIBRARY_FUNCTION_ERROR;
- }
- try {
- mma::IntTensorRef bonds = mma::detail::getTensor<mint>(Args[1]);
- mma::IntTensorRef atoms = mma::detail::getTensor<mint>(Args[2]);
- (RDMol_collection[id])->addBondsDeleteAtoms(bonds, atoms);
- } catch(const mma::LibraryError & libErr) {
- libErr.report();
- return libErr.error_code();
- } catch(const Invar::Invariant & exc) {
- mma::detail::handleUnknownException(exc.getMessage(), "RDMol::addBondsDeleteAtoms()");
- return LIBRARY_FUNCTION_ERROR;
- } catch(const std::exception & exc) {
- mma::detail::handleUnknownException(exc.what(), "RDMol::addBondsDeleteAtoms()");
- return LIBRARY_FUNCTION_ERROR;
- } catch(...) {
- mma::detail::handleUnknownException(NULL, "RDMol::addBondsDeleteAtoms()");
- return LIBRARY_FUNCTION_ERROR;
- }
- return LIBRARY_NO_ERROR;
- }
- auto-generated WL code:
- With[
- {
- fun = LibraryFunctionLoad[
- $RDKitLink, "RDMol_addBondsDeleteAtoms", {Integer, {Integer, 2}, {Integer, 1}},
- "Void"
- ]
- },
- RDMol[libraryID_]["addBondsDeleteAtoms", bonds_, atoms_] := fun[libraryID, bonds, atoms];
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement