/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_lensfun_params_t
 *     int
 *     modify_flags 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     int
 *     inverse 
 *       description: mode
 *       default: 0
 *       range: 0 .. 1
 * 
 *     float
 *     scale 
 *       default: 1.0
 *       range: 0.1 .. 2.0
 * 
 *     float
 *     crop 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     focal 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     aperture 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     distance 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     lfLensType
 *     target_geom 
 *       description: geometry
 *       default: LF_RECTILINEAR
 * 
 *     char
 *     camera [128]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 *     char
 *     lens [128]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 *     boolean
 *     tca_override 
 *       description: TCA overwrite
 *       default: FALSE
 * 
 *     float
 *     tca_r 
 *       description: TCA red
 *       default: 1.0
 *       range: 0.99 .. 1.01
 * 
 *     float
 *     tca_b 
 *       description: TCA blue
 *       default: 1.0
 *       range: 0.99 .. 1.01
 * 
 *     int
 *     modified 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 * dt_iop_lensfun_params_t
 *
 */

#include "/build/darktable/src/darktable-4.0.0/src/iop/lens.cc"

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[17+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"modify_flags", (char*)"modify_flags", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->modify_flags), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, modify_flags), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"inverse", (char*)"inverse", N_((char*)"mode"), sizeof(((dt_iop_lensfun_params_t*)NULL)->inverse), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, inverse), NULL },
    /*Min*/ 0, /*Max*/ 1, /*Default*/ 0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale", (char*)"scale", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->scale), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, scale), NULL },
    /*Min*/ 0.1, /*Max*/ 2.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"crop", (char*)"crop", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->crop), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, crop), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"focal", (char*)"focal", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->focal), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, focal), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"aperture", (char*)"aperture", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->aperture), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, aperture), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"distance", (char*)"distance", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->distance), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, distance), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"lfLensType", (char*)"target_geom", (char*)"target_geom", N_((char*)"geometry"), sizeof(((dt_iop_lensfun_params_t*)NULL)->target_geom), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, target_geom), NULL },
    /* no data for this type */
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"camera[0]", (char*)"camera[0]", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->camera[0]), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, camera), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"camera", (char*)"camera", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->camera), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, camera), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lensfun_params_t*)NULL)->camera), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[8]
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"lens[0]", (char*)"lens[0]", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->lens[0]), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, lens), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"lens", (char*)"lens", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->lens), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, lens), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lensfun_params_t*)NULL)->lens), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[10]
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"tca_override", (char*)"tca_override", N_((char*)"TCA overwrite"), sizeof(((dt_iop_lensfun_params_t*)NULL)->tca_override), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, tca_override), NULL },
    /*Default*/ FALSE
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"tca_r", (char*)"tca_r", N_((char*)"TCA red"), sizeof(((dt_iop_lensfun_params_t*)NULL)->tca_r), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, tca_r), NULL },
    /*Min*/ 0.99, /*Max*/ 1.01, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"tca_b", (char*)"tca_b", N_((char*)"TCA blue"), sizeof(((dt_iop_lensfun_params_t*)NULL)->tca_b), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, tca_b), NULL },
    /*Min*/ 0.99, /*Max*/ 1.01, /*Default*/ 1.0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"modified", (char*)"modified", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->modified), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, modified), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_lensfun_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_lensfun_params_t), 0, NULL },
    /*entries*/ 14, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  5,
  "dt_iop_lensfun_params_t",
  sizeof(dt_iop_lensfun_params_t),
  &introspection_linear[17-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].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"modify_flags", (char*)"modify_flags", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->modify_flags), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, modify_flags), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[1].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"inverse", (char*)"inverse", N_((char*)"mode"), sizeof(((dt_iop_lensfun_params_t*)NULL)->inverse), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, inverse), NULL },
    /*Min*/ 0, /*Max*/ 1, /*Default*/ 0
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale", (char*)"scale", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->scale), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, scale), NULL },
    /*Min*/ 0.1, /*Max*/ 2.0, /*Default*/ 1.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"crop", (char*)"crop", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->crop), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, crop), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"focal", (char*)"focal", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->focal), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, focal), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"aperture", (char*)"aperture", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->aperture), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, aperture), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"distance", (char*)"distance", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->distance), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, distance), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[7].Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"lfLensType", (char*)"target_geom", (char*)"target_geom", N_((char*)"geometry"), sizeof(((dt_iop_lensfun_params_t*)NULL)->target_geom), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, target_geom), NULL },
    /* no data for this type */
  };
  introspection_linear[8].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"camera[0]", (char*)"camera[0]", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->camera[0]), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, camera), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[9].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"camera", (char*)"camera", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->camera), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, camera), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lensfun_params_t*)NULL)->camera), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[8]
  };
  introspection_linear[10].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"lens[0]", (char*)"lens[0]", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->lens[0]), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, lens), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[11].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"lens", (char*)"lens", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->lens), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, lens), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lensfun_params_t*)NULL)->lens), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[10]
  };
  introspection_linear[12].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"tca_override", (char*)"tca_override", N_((char*)"TCA overwrite"), sizeof(((dt_iop_lensfun_params_t*)NULL)->tca_override), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, tca_override), NULL },
    /*Default*/ FALSE
  };
  introspection_linear[13].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"tca_r", (char*)"tca_r", N_((char*)"TCA red"), sizeof(((dt_iop_lensfun_params_t*)NULL)->tca_r), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, tca_r), NULL },
    /*Min*/ 0.99, /*Max*/ 1.01, /*Default*/ 1.0
  };
  introspection_linear[14].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"tca_b", (char*)"tca_b", N_((char*)"TCA blue"), sizeof(((dt_iop_lensfun_params_t*)NULL)->tca_b), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, tca_b), NULL },
    /*Min*/ 0.99, /*Max*/ 1.01, /*Default*/ 1.0
  };
  introspection_linear[15].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"modified", (char*)"modified", (char*)"", sizeof(((dt_iop_lensfun_params_t*)NULL)->modified), G_STRUCT_OFFSET(dt_iop_lensfun_params_t, modified), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[16].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_lensfun_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_lensfun_params_t), 0, NULL },
    /*entries*/ 14, /*fields*/ NULL
  };
  introspection_linear[17].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_field_t *f16[] = {
    &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[9],
    &introspection_linear[11],
    &introspection_linear[12],
    &introspection_linear[13],
    &introspection_linear[14],
    &introspection_linear[15],
    NULL
  };

  introspection_linear[16].Struct.fields = f16;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_lensfun_params_t * p = (dt_iop_lensfun_params_t*)param;
  if(!strcmp(name, "modify_flags"))
    return &(p->modify_flags);
  else if(!strcmp(name, "inverse"))
    return &(p->inverse);
  else if(!strcmp(name, "scale"))
    return &(p->scale);
  else if(!strcmp(name, "crop"))
    return &(p->crop);
  else if(!strcmp(name, "focal"))
    return &(p->focal);
  else if(!strcmp(name, "aperture"))
    return &(p->aperture);
  else if(!strcmp(name, "distance"))
    return &(p->distance);
  else if(!strcmp(name, "target_geom"))
    return &(p->target_geom);
  else if(!strcmp(name, "camera[0]"))
    return &(p->camera[0]);
  else if(!strcmp(name, "camera"))
    return &(p->camera);
  else if(!strcmp(name, "lens[0]"))
    return &(p->lens[0]);
  else if(!strcmp(name, "lens"))
    return &(p->lens);
  else if(!strcmp(name, "tca_override"))
    return &(p->tca_override);
  else if(!strcmp(name, "tca_r"))
    return &(p->tca_r);
  else if(!strcmp(name, "tca_b"))
    return &(p->tca_b);
  else if(!strcmp(name, "modified"))
    return &(p->modified);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!strcmp(name, "modify_flags"))
    return &(introspection_linear[0]);
  else if(!strcmp(name, "inverse"))
    return &(introspection_linear[1]);
  else if(!strcmp(name, "scale"))
    return &(introspection_linear[2]);
  else if(!strcmp(name, "crop"))
    return &(introspection_linear[3]);
  else if(!strcmp(name, "focal"))
    return &(introspection_linear[4]);
  else if(!strcmp(name, "aperture"))
    return &(introspection_linear[5]);
  else if(!strcmp(name, "distance"))
    return &(introspection_linear[6]);
  else if(!strcmp(name, "target_geom"))
    return &(introspection_linear[7]);
  else if(!strcmp(name, "camera[0]"))
    return &(introspection_linear[8]);
  else if(!strcmp(name, "camera"))
    return &(introspection_linear[9]);
  else if(!strcmp(name, "lens[0]"))
    return &(introspection_linear[10]);
  else if(!strcmp(name, "lens"))
    return &(introspection_linear[11]);
  else if(!strcmp(name, "tca_override"))
    return &(introspection_linear[12]);
  else if(!strcmp(name, "tca_r"))
    return &(introspection_linear[13]);
  else if(!strcmp(name, "tca_b"))
    return &(introspection_linear[14]);
  else if(!strcmp(name, "modified"))
    return &(introspection_linear[15]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

