Reverse engineering unions, enumerated types

Unions are read in as user types under the corresponding package in the model.

Consider the following source file:


   unionbb32
   {
      int x;
      char y;
   }

The resultant type will be named bb32 and have the following declaration:


   union%s
   {
      int x;
      char y;
   };

Reverse engineering enumerated types

Enumerated types are read in as user types under the corresponding package in the model.

Consider the following enum:

enum cc_buffer_modes
{
   WRITE_MODE,
   READ_MODE_FORWARD,
   READ_MODE_BACKWARD
};

The resultant type will be named cc_buffer_modes and have the following declaration:

enum %s
{
   WRITE_MODE,
   READ_MODE_FORWARD,
   READ_MODE_BACKWARD
};