Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Cython / tests / run / cpp_function_lib.pxd
Size: Mime:
from libcpp.functional cimport function

cdef extern from "cpp_function_lib.cpp":
    # CPP is include here so that it doesn't need to be compiled externally
    pass

cdef extern from "cpp_function_lib.h":
    double add_one(double, int)
    double add_two(double a, int b)

    cdef cppclass AddAnotherFunctor:
        AddAnotherFunctor(double to_add)
        double call "operator()"(double a, int b)

    cdef cppclass FunctionKeeper:
        FunctionKeeper(function[double(double, int)] user_function)
        void set_function(function[double(double, int)] user_function)
        function[double(double, int)] get_function()
        double call_function(double a, int b) except +