Lesson 13: Defining structure containing pointers (TODO)

This lesson is a bit different from the other ones. It aims at explaining several features of the automatic datadesc parsing. Since it would be a bit long otherwise, the lesson is organized as a FAQ, with little examples of how to do things.

Table of Contents


How to have constants in parsed structures?

You can use gras_datadesc_set_const() to explain GRAS about the value of your #define'd constants.

#define SIZE 12
GRAS_DEFINE_TYPE(array,struct array {
  int data[SIZE];
};);

void declare_ddt() {
  gras_datadesc_type_t ddt;
  
  gras_datadesc_set_const("SIZE",SIZE); /* Set it before */
  gras_datadesc_by_symbol(array); 
}


Back to the main Simgrid Documentation page Generated for SimGridAPI by doxygen