Table of Contents
In this chapter we introduce how modules are declared for extending a Wolframe application with our own functions and objects.
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.
#include "appDevel.hpp" WF_MODULE_BEGIN( "empty", "an example module not exporting anything") WF_MODULE_END
The macro WF_MODULE_BEGIN has two parameters
Table 3.1. Parameters of WF_MODULE_BEGIN
NAME | DESCRIPTION |
---|---|
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.
Copyright © 2014 - Project Wolframe - All Rights Reserved