All Data Structures Namespaces Files Functions Groups Pages
The context object

## Functions

codes_context * | codes_context_get_default (void)
| Get the static default context. More...
void | codes_context_delete (codes_context *c)
| Frees the cached definition files of the context. More...
void | codes_gts_header_on (codes_context *c)
| Set the GTS header mode on. More...
void | codes_gts_header_off (codes_context *c)
| Set the GTS header mode off. More...
void | codes_gribex_mode_on (codes_context *c)
| Set the GRIBEX mode on. More...
int | codes_get_gribex_mode (codes_context *c)
| Get the GRIBEX mode. More...
void | codes_gribex_mode_off (codes_context *c)
| Set the GRIBEX mode off. More...
void | codes_context_set_definitions_path (grib_context *c, const char *path)
| Sets the search path for definition files. More...
void | codes_context_set_samples_path (grib_context *c, const char *path)
| Sets the search path for sample files. More...
void | codes_grib_multi_support_on (codes_context *c)
| Turn on support for multiple fields in single GRIB messages. More...
void | codes_grib_multi_support_off (codes_context *c)
| Turn off support for multiple fields in single GRIB messages. More...
void | codes_grib_multi_support_reset_file (codes_context *c, FILE *f)
| Reset file handle in multiple GRIB field support mode. More...

## Detailed Description

The context is a long life configuration object of eccodes. It is used to define special allocation and free routines or to set special eccodes behaviours and variables.

## Function Documentation

void codes_context_delete | ( | codes_context * | c | ) |

Frees the cached definition files of the context.

Parameters

  c | : the context to be deleted

codes_context* codes_context_get_default | ( | void |  | ) |

Get the static default context.

Returns
  the default context, NULL it the context is not available

void codes_context_set_definitions_path | ( | grib_context * | c,
|  | const char * | path
| ) |  |

Sets the search path for definition files.

Parameters

  c | : the context to be modified
  path | : the search path for definition files

void codes_context_set_samples_path | ( | grib_context * | c,
|  | const char * | path
| ) |  |

Sets the search path for sample files.

Parameters

  c | : the context to be modified
  path | : the search path for sample files

int codes_get_gribex_mode | ( | codes_context * | c | ) |

Get the GRIBEX mode.

Parameters

  c | : the context

void codes_grib_multi_support_off | ( | codes_context * | c | ) |

Turn off support for multiple fields in single GRIB messages.

Parameters

  c | : the context to be modified

void codes_grib_multi_support_on | ( | codes_context * | c | ) |

Turn on support for multiple fields in single GRIB messages.

Parameters

  c | : the context to be modified

void codes_grib_multi_support_reset_file | ( | codes_context * | c,
|  | FILE * | f
| ) |  |

Reset file handle in multiple GRIB field support mode.

Parameters

  c | : the context to be modified
  f | : the file pointer

void codes_gribex_mode_off | ( | codes_context * | c | ) |

Set the GRIBEX mode off.

GRIB files won't be always compatible with GRIBEX.

Parameters

  c | : the context

void codes_gribex_mode_on | ( | codes_context * | c | ) |

Set the GRIBEX mode on.

GRIB files will be compatible with GRIBEX.

Parameters

  c | : the context

void codes_gts_header_off | ( | codes_context * | c | ) |

Set the GTS header mode off.

The GTS headers will be deleted.

Parameters

  c | : the context

void codes_gts_header_on | ( | codes_context * | c | ) |

Set the GTS header mode on.

The GTS headers will be preserved.

Parameters

  c | : the context