3 Development of C++ codes4.2.1 Changes
CHEAT SHEET |
ITM | IMAS |
---|
#include "UALClasses.h" | #include "UALClasses.h" |
ItmNs::Itm::<cpo> cpo; | IdsNs::IDS::<ids> ids; |
ItmNs::Itm::<cpo>Array cpoArray; <= Array! | IdsNs::IDS::<ids> <ids> ids; <= Single obj ! |
ItmNs::codeparam_t & codeparam | IdsNs::codeparam_t & codeparam |
eval-pkg-config | pkg-config |
eval-pkg-config --cflags --libs ual-cpp-gnu | pkg-config --cflags --libs imas-cpp |
| |
4.2.2 Examples
Examples of interface between wrapper and user code |
---|
Code Block |
---|
language | cpp |
---|
title | ITM |
---|
linenumbers | true |
---|
| /**** Simple types ***/
void simple(double &x, double &y)
/**** Single slice ***/
void slice( ItmNs::Itm::equilibrium &eq)
/**** Array of slices ***/
void slice_array( ItmNs::Itm::equilibriumArray &eq)
/**** Code XML parameters ***/
void code_params(...., ItmNs::codeparam_t& codeparamparam)
/**** Arbitrary diagnostic info ***/
void diag_info(...., int* output_flagoutFlag, char** diagnostic_infodiagInfo) |
| Code Block |
---|
language | cpp |
---|
title | IMAS |
---|
linenumbers | true |
---|
| /**** Simple types ***/
void simple(double &x, double &y)
/**** Single slice ***/
void slice(IdsNs::IDS::equilibrium &eq)
/**** Array of slices ***/
void slice_array
( IdsNs::IDS:equilibrium &eq)
/**** Code XML parameters ***/
void code_params(...., IdsNs::codeparam_t& codeparamparam)
/**** Arbitrary diagnostic info ***/
void diag_info(...., int* output_flagoutFlag, char** diagnostic_infodiagInfo) |
|
4.2.3 Delivery of the user code
The user code should be delivered as a static library.
Please find examples of the simple "Makefile" below:
...