Page Tools


    Plugin Creation

    ADAGE requires two extern C functions per plugin to be implemented:

    The create_plugin() function

    A plugin must provide a specific function to create an instance of the given plugin. For example, for TEST:

    extern "C"
    plugin* create_plugin(docs::dpl_info* info)
    {
            return new test_plugin(info);
    }

    The get_type() function

    It is used to tell ADAGE what type of specific application this plugin can handle, ADAGE will associate the given type to the plugin shared object, and know that it has to call create_plugin() on this object for an application of this type. For example, TEST application is registered this way:

    extern "C"
    std::string get_type()
    {
            return "TEST_application";
    }

    Index, Previous page, Next page


    Powered by Heliovista - Création site internet