/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_filmic_params_t
 *     float
 *     grey_point_source 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     black_point_source 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     white_point_source 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     security_factor 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     grey_point_target 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     black_point_target 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     white_point_target 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     output_power 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     latitude_stops 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     contrast 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     saturation 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     global_saturation 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     balance 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     int
 *     interpolator 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     int
 *     preserve_color 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 * dt_iop_filmic_params_t
 *
 */

#include "/build/darktable/src/darktable-4.0.1/src/iop/filmic.c"

#ifdef __cplusplus
extern "C"
{
#endif

#include <string.h>
#include "common/introspection.h"

static dt_introspection_field_t introspection_linear[16+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"grey_point_source", (char*)"grey_point_source", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->grey_point_source), G_STRUCT_OFFSET(dt_iop_filmic_params_t, grey_point_source), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"black_point_source", (char*)"black_point_source", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->black_point_source), G_STRUCT_OFFSET(dt_iop_filmic_params_t, black_point_source), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"white_point_source", (char*)"white_point_source", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->white_point_source), G_STRUCT_OFFSET(dt_iop_filmic_params_t, white_point_source), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"security_factor", (char*)"security_factor", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->security_factor), G_STRUCT_OFFSET(dt_iop_filmic_params_t, security_factor), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"grey_point_target", (char*)"grey_point_target", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->grey_point_target), G_STRUCT_OFFSET(dt_iop_filmic_params_t, grey_point_target), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"black_point_target", (char*)"black_point_target", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->black_point_target), G_STRUCT_OFFSET(dt_iop_filmic_params_t, black_point_target), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"white_point_target", (char*)"white_point_target", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->white_point_target), G_STRUCT_OFFSET(dt_iop_filmic_params_t, white_point_target), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"output_power", (char*)"output_power", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->output_power), G_STRUCT_OFFSET(dt_iop_filmic_params_t, output_power), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"latitude_stops", (char*)"latitude_stops", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->latitude_stops), G_STRUCT_OFFSET(dt_iop_filmic_params_t, latitude_stops), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"contrast", (char*)"contrast", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->contrast), G_STRUCT_OFFSET(dt_iop_filmic_params_t, contrast), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"saturation", (char*)"saturation", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->saturation), G_STRUCT_OFFSET(dt_iop_filmic_params_t, saturation), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"global_saturation", (char*)"global_saturation", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->global_saturation), G_STRUCT_OFFSET(dt_iop_filmic_params_t, global_saturation), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"balance", (char*)"balance", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->balance), G_STRUCT_OFFSET(dt_iop_filmic_params_t, balance), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"interpolator", (char*)"interpolator", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->interpolator), G_STRUCT_OFFSET(dt_iop_filmic_params_t, interpolator), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"preserve_color", (char*)"preserve_color", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->preserve_color), G_STRUCT_OFFSET(dt_iop_filmic_params_t, preserve_color), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_filmic_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_filmic_params_t), 0, NULL },
    /*entries*/ 15, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  3,
  "dt_iop_filmic_params_t",
  sizeof(dt_iop_filmic_params_t),
  &introspection_linear[16-1],
  sizeof(dt_iop_module_t),
  G_STRUCT_OFFSET(dt_iop_module_t, default_params)
};

dt_introspection_field_t* get_introspection_linear()
{
  return introspection_linear;
}

dt_introspection_t* get_introspection()
{
  return &introspection;
}

int introspection_init(struct dt_iop_module_so_t *self, int api_version)
{
  // here we check that the generated code matches the api at compile time and also at runtime
  if(introspection.api_version != DT_INTROSPECTION_VERSION || api_version != DT_INTROSPECTION_VERSION)
    return 1;

#if defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406)
  introspection_linear[0].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"grey_point_source", (char*)"grey_point_source", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->grey_point_source), G_STRUCT_OFFSET(dt_iop_filmic_params_t, grey_point_source), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[1].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"black_point_source", (char*)"black_point_source", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->black_point_source), G_STRUCT_OFFSET(dt_iop_filmic_params_t, black_point_source), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"white_point_source", (char*)"white_point_source", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->white_point_source), G_STRUCT_OFFSET(dt_iop_filmic_params_t, white_point_source), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"security_factor", (char*)"security_factor", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->security_factor), G_STRUCT_OFFSET(dt_iop_filmic_params_t, security_factor), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"grey_point_target", (char*)"grey_point_target", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->grey_point_target), G_STRUCT_OFFSET(dt_iop_filmic_params_t, grey_point_target), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"black_point_target", (char*)"black_point_target", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->black_point_target), G_STRUCT_OFFSET(dt_iop_filmic_params_t, black_point_target), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"white_point_target", (char*)"white_point_target", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->white_point_target), G_STRUCT_OFFSET(dt_iop_filmic_params_t, white_point_target), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[7].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"output_power", (char*)"output_power", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->output_power), G_STRUCT_OFFSET(dt_iop_filmic_params_t, output_power), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[8].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"latitude_stops", (char*)"latitude_stops", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->latitude_stops), G_STRUCT_OFFSET(dt_iop_filmic_params_t, latitude_stops), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[9].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"contrast", (char*)"contrast", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->contrast), G_STRUCT_OFFSET(dt_iop_filmic_params_t, contrast), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[10].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"saturation", (char*)"saturation", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->saturation), G_STRUCT_OFFSET(dt_iop_filmic_params_t, saturation), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[11].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"global_saturation", (char*)"global_saturation", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->global_saturation), G_STRUCT_OFFSET(dt_iop_filmic_params_t, global_saturation), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[12].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"balance", (char*)"balance", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->balance), G_STRUCT_OFFSET(dt_iop_filmic_params_t, balance), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[13].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"interpolator", (char*)"interpolator", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->interpolator), G_STRUCT_OFFSET(dt_iop_filmic_params_t, interpolator), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[14].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"preserve_color", (char*)"preserve_color", (char*)"", sizeof(((dt_iop_filmic_params_t*)NULL)->preserve_color), G_STRUCT_OFFSET(dt_iop_filmic_params_t, preserve_color), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[15].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_filmic_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_filmic_params_t), 0, NULL },
    /*entries*/ 15, /*fields*/ NULL
  };
  introspection_linear[16].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

  for(int i = 0; i <= 16; i++)
    introspection_linear[i].header.so = self;

  static dt_introspection_field_t *f15[] = {
    &introspection_linear[0],
    &introspection_linear[1],
    &introspection_linear[2],
    &introspection_linear[3],
    &introspection_linear[4],
    &introspection_linear[5],
    &introspection_linear[6],
    &introspection_linear[7],
    &introspection_linear[8],
    &introspection_linear[9],
    &introspection_linear[10],
    &introspection_linear[11],
    &introspection_linear[12],
    &introspection_linear[13],
    &introspection_linear[14],
    NULL
  };

  introspection_linear[15].Struct.fields = f15;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_filmic_params_t * p = (dt_iop_filmic_params_t*)param;
  if(!strcmp(name, "grey_point_source"))
    return &(p->grey_point_source);
  else if(!strcmp(name, "black_point_source"))
    return &(p->black_point_source);
  else if(!strcmp(name, "white_point_source"))
    return &(p->white_point_source);
  else if(!strcmp(name, "security_factor"))
    return &(p->security_factor);
  else if(!strcmp(name, "grey_point_target"))
    return &(p->grey_point_target);
  else if(!strcmp(name, "black_point_target"))
    return &(p->black_point_target);
  else if(!strcmp(name, "white_point_target"))
    return &(p->white_point_target);
  else if(!strcmp(name, "output_power"))
    return &(p->output_power);
  else if(!strcmp(name, "latitude_stops"))
    return &(p->latitude_stops);
  else if(!strcmp(name, "contrast"))
    return &(p->contrast);
  else if(!strcmp(name, "saturation"))
    return &(p->saturation);
  else if(!strcmp(name, "global_saturation"))
    return &(p->global_saturation);
  else if(!strcmp(name, "balance"))
    return &(p->balance);
  else if(!strcmp(name, "interpolator"))
    return &(p->interpolator);
  else if(!strcmp(name, "preserve_color"))
    return &(p->preserve_color);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!strcmp(name, "grey_point_source"))
    return &(introspection_linear[0]);
  else if(!strcmp(name, "black_point_source"))
    return &(introspection_linear[1]);
  else if(!strcmp(name, "white_point_source"))
    return &(introspection_linear[2]);
  else if(!strcmp(name, "security_factor"))
    return &(introspection_linear[3]);
  else if(!strcmp(name, "grey_point_target"))
    return &(introspection_linear[4]);
  else if(!strcmp(name, "black_point_target"))
    return &(introspection_linear[5]);
  else if(!strcmp(name, "white_point_target"))
    return &(introspection_linear[6]);
  else if(!strcmp(name, "output_power"))
    return &(introspection_linear[7]);
  else if(!strcmp(name, "latitude_stops"))
    return &(introspection_linear[8]);
  else if(!strcmp(name, "contrast"))
    return &(introspection_linear[9]);
  else if(!strcmp(name, "saturation"))
    return &(introspection_linear[10]);
  else if(!strcmp(name, "global_saturation"))
    return &(introspection_linear[11]);
  else if(!strcmp(name, "balance"))
    return &(introspection_linear[12]);
  else if(!strcmp(name, "interpolator"))
    return &(introspection_linear[13]);
  else if(!strcmp(name, "preserve_color"))
    return &(introspection_linear[14]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

