[ create a new paste ] login | about

Link: http://codepad.org/mUFZfBJQ    [ raw code | fork ]

C++, pasted on Jan 7:
#define FLUXCAP_DLL_IMPL
#include "FluxCapacitor.h"

#include <string>

DLL FluxCapacitor* DLLCALL get_flux_capacitor(double flux_intensity)
{
    try {
        return new FluxCapacitor(flux_intensity);
    } catch (...) {
        return 0;
    }
}

DLL int DLLCALL flux_capacitor_capacitate(FluxCapacitor* fc,
        double jigawatts, const char* name)
{
    try {
        return fc->capacitate(jigawatts, std::string(name));
    } catch (...) {
        return -1;
    }
}

DLL void DLLCALL release_flux_capacitor(FluxCapacitor* fc)
{
    delete fc;
}


Create a new paste based on this one


Comments: