[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/jacereda/daScript/master/examples/tutorial/tutorial02module.cpp [Back]  [Original]

#include "daScript/daScript.h"

#include "tutorial02aot.h"

using namespace das;

// making custom builtin module
class Module_Tutorial02 : public Module {
public:
    Module_Tutorial02() : Module("tutorial_02") {   // module name, when used from das file
        ModuleLibrary lib(this);
        lib.addBuiltInModule();
        // adding constant to the module
        addConstant(*this,"SQRT2",sqrtf(2.0));
        // adding function to the module
        addExtern(*this, lib, "xmadd",SideEffects::none, "xmadd");
        // and verify
        verifyAotReady();
    }
    virtual ModuleAotType aotRequire ( TextWriter & tw ) const override {
        // specifying which include files are required for this module
        tw 

Web Proxy Viewer  |  New URL  |  Original Page