Chapter 3. Module Declaration

In this chapter we introduce how modules are declared for extending a Wolframe application with our own functions and objects.

3.1. Module Declaration Frame

A module has to include "appdevel/moduleFrameMacros.hpp" or simply "appDevel.hpp" and declare a module header and a module trailer with the macros WF_MODULE_BEGIN and WF_MODULE_END. A single module source file built as Wolframe application extension module must contain only one WF_MODULE_BEGIN .... WF_MODULE_END declaration. But a module declaration can contain an arbitrary number of objects that not conflicting in anything they define (names, etc.) The following example shows an empty module without any exported objects, thus the simplest module we can declare.

3.1.1. Empty Module Declaration Example

    #include "appDevel.hpp"
    WF_MODULE_BEGIN( "empty", "an example module not exporting anything")


3.1.2. Module Declaration Macros

The macro WF_MODULE_BEGIN has two parameters

Table 3.1. Parameters of WF_MODULE_BEGIN

Identifier of the module (*)Description sentence of the module for user info when inspecting a module.

(*) Currently not used but will be when a namespace concept will be implemented.

The end declaration WF_MODULE_END closes the module object and defines the module entry point structure.