maug
Quick and dirty C mini-augmentation library.
Serialize Code Generation Tool
Collaboration diagram for Serialize Code Generation Tool:

Serialize Code Generation Tool

This tool, located in $MAUG_ROOT/tools/serial.c, generates code based on the header files it is pointed at. In general, header files processed by this tool must meet the following requirements: There may be additional restrictions to these that are not noted here.

Serialize Tool Custom Types

Custom typedefs should be provided in msercust.h in the following format:

#  define parse_field_type_table( f ) \
      parse_field_type_table_base( f ) \
      f( custom_type_a,              101 ) \
      f( struct custom_type_b,       102 ) \

In this example, custom_type_a is the name of the type and 101 is its ID. The IDs start from 100 and there can be thousands.If custom_type_a is provided here, a callback of type mserialize_cb_t() and mdeserialize_cb_t() (called mseralize_custom_type_a and mdeserialize_custom_type_b) must be provided by a linked translation unit.For struct custom_type_b, the callbacks would be called mseralize_struct_custom_type_b() and mdeseralize_struct_custom_type_b().