*
* There is several possible interfaces for this, ranging from the really completely automatic parsing to
* completely manual. Let's study each of them from the simplest to the more advanced.
+ *
+ * \warning At least, I would like to present those sections in the right order, but doxygen prevents me
+ * from doing so. There is a weird bug I fail to circumvent here. The right order is naturally:
+ * - a) basic operations
+ * - b) Automatic parsing
+ * - c) Simple manual definitions
+ * - d) Callback Persistant State: Simple push/pop mecanism
+ * - e) Callback Persistant State: Full featured mecanism
*/
/** @name a) basic operations
gras_datadesc_type_t uc = gras_datadesc_by_name("unsigned char");
gras_datadesc_type_t str = gras_datadesc_by_name("string");\endverbatim
*/
-/** @{ */
+/* @{ */
/** @brief Opaque type describing a type description. */
typedef struct s_gras_datadesc_type *gras_datadesc_type_t;
/** \brief Search a type description from its name */
gras_datadesc_type_t gras_datadesc_by_name(const char *name);
-
-/** @} */
-
-/** @fn gras_datadesc_type_t gras_datadesc_parse(const char *name, const char *C_statement)
- * @ingroup GRAS_dd_implem
- *
- * Helper function doing the crude job of type parsing.
- */
-
+/* @} */
+
/** @name b) Automatic parsing
* @ingroup GRAS_dd
*
/** @{ */
-/** @def GRAS_DEFINE_TYPE
+/** @brief Automatically parse C code
* @hideinitializer
- * @brief Automatically parse C code
*/
-
-
#define GRAS_DEFINE_TYPE(name,def) \
static const char * _gras_this_type_symbol_does_not_exist__##name=#def; def
/*@}*/
-/** @name Callback Persistant State: Simple push/pop mecanism
+/** @name d) Callback Persistant State: Simple push/pop mecanism
* @ingroup GRAS_dd
*
* Sometimes, one of the callbacks need to leave information for the next ones. If this is a simple integer (such as
* an array size), you can use the functions described here. If not, you'll have to play with the complete cbps interface.
+ *
+ * Here is an example:\verbatim
+struct s_array {
+ int length;
+ int *data;
+}
+[...]
+my_type=gras_datadesc_struct("s_array");
+gras_datadesc_struct_append(my_type,"length", gras_datadesc_by_name("int"));
+gras_datadesc_cb_field_send (my_type, "length", gras_datadesc_cb_push_int);
+
+gras_datadesc_struct_append(my_type,"data",
+ gras_datadesc_array_dyn ("s_array::data",gras_datadesc_by_name("int"), gras_datadesc_cb_pop));
+gras_datadesc_struct_close(my_type);
+\endverbatim
+
*/
/*@{*/
/*@}*/
-/** @name Callback Persistant State: Full featured mecanism
+/** @name e) Callback Persistant State: Full featured mecanism
* @ingroup GRAS_dd
*
* Sometimes, one of the callbacks need to leave information for the next ones. If the simple push/pop mecanism