Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

3 Development of C++ codes

4.2.1 Changes

 

CHEAT SHEET
ITMIMAS
#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 & codeparamIdsNs::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
languagepycpp
titleITM
linenumberstrue
/**** 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
languagepycpp
titleIMAS
linenumberstrue
/**** 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:

...