MRDOCS_PLUGIN_MAIN

Define the entry point of a plugin.

Synopsis

Declared in <mrdocs/Plugin.hpp>

#define MRDOCS_PLUGIN_MAIN(context)

Description

Name the mrdocs::PluginContext parameter and write a body that returns what came of the work:

MRDOCS_PLUGIN_MAIN(ctx)
{
    return ctx.installGenerator(std::make_unique<MyGenerator>());
}

Along with the entry point, which passes the error the body returned back to MrDocs, the macro defines the functions reporting the interface version and the toolchain the plugin was built with, so that none of the three can disagree with each other.

Parameters

Name

Description

context

The name the body uses for the context it receives.

Created with MrDocs