Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add some info on this topic, even if it's veeery far from being sufficient. It's...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 12 Feb 2007 22:01:13 +0000 (22:01 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 12 Feb 2007 22:01:13 +0000 (22:01 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3134 48e7efb5-ca39-0410-a469-dd3cf9ba447f

doc/gtut-tour-13-pointers.doc

index 98c8c99..f75d574 100644 (file)
@@ -1,26 +1,35 @@
 /**
 @page GRAS_tut_tour_pointers 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.
+
 \section GRAS_tut_tour_pointers_toc Table of Contents
- - \ref GRAS_tut_tour_pointers_intro
- - \ref GRAS_tut_tour_pointers_use
- - \ref GRAS_tut_tour_pointers_recap
+ - \ref GRAS_tut_tour_pointers_cste
    
 <hr>
 
-\section GRAS_tut_tour_pointers_intro Introduction
-
-
-\section GRAS_tut_tour_pointers_use Defining structure containing pointers
 
+\section GRAS_tut_tour_pointers_cste How to have constants in parsed structures?
 
-\section GRAS_tut_tour_pointers_recap Recapping everything together
+You can use gras_datadesc_set_const() to explain GRAS about the value of
+your \#define'd constants.
 
-The program now reads:
-include 12-pointers.c
+\verbatim
+#define SIZE 12
+GRAS_DEFINE_TYPE(array,struct array {
+  int data[SIZE];
+};);
 
-Which produces the expected output:
-include 12-pointers.output
+void declare_ddt() {
+  gras_datadesc_type_t ddt;
+  
+  gras_datadesc_set_const("SIZE",SIZE); /* Set it before */
+  gras_datadesc_by_symbol(array); 
+}
+\endverbatim
 
 
 */