We believe that C/C++ is the best language for the development of DREAM Suite plugin modules because of the following reasons:
To simplify the development of this module, DREAM Suite can generate a skeleton of the plugin module and create a new Visual Studio project, which can be immediately recompiled and is automatically linked with DREAM Suite (see button "Generate plugin project" on the Model Definition page). The user should then implement project-specific functions into the existing C++ source code. The code contains many useful comments and one can also learn form the source code of many examples distributed with DREAM Suite.
Remark 1: Note that all DREAM Suite projects have been developed in Visual Studio 2013. If you are using Visual Studio 2015 (or a newer version), you will need to upgrade the projects, which can be done automatically when opening the project/solution in Visual Studio (see figure 6.1.2).
Remark 2: Although DREAM Solver is a COM server, writing custom plugin modules does not require any knowledge of COM technology.
Developing the plugin module
The automatically generated Visual Studio solution contains two projects: AppTest and the plugin project (see "MyPlugin" in Figure 5.3.1. "Plugin Test Application"). The AppTest project is a simple console application, which enables to develop and test the Plugin module independently of DREAM Suite. You can compile both projects and run AppTest, which connects to DREAM COM Server and subsequently calls functions from your evaluator (MyPlugin.dll). You can also place breakpoints to these functions if you wish to debug your code. However, please note that your plugin should define all input data needed for the given problem in DREAM Solver. AppTest does not offer any other way to define the input data and transfer them to the solver (unlike DREAM Suite, in which input data can be entered via GUI). This input data should be specified in functions CDreamEvaluator::GetEvaluationParams (always required) and GetMinMaxData, GetNormalData, GetPriorData, CalcCustomPriorData, GetMeasurementData and GetBayesCompData (optional). The next key function CDreamEvaluator::Evaluate implements the evaluation of samples - similarly as can be seen in demo examples.
Figure 5.3.1. Plugin Test Application.