libpressio 0.93.0
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
pressio_options.h File Reference

A set of options for a compressor. More...

#include "pressio_dtype.h"
#include "pressio_compressor.h"
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for pressio_options.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LIBPRESSIO_OPTIONS_H
 
#define pressio_options_define_type_set(name, type)
 
#define pressio_options_define_type_get(name, type)
 
#define pressio_options_define_type_cast(name, type)
 
#define pressio_options_define_type_as(name, type)
 
#define pressio_options_define_type(name, type)
 

Enumerations

enum  pressio_options_key_status { pressio_options_key_set =0 , pressio_options_key_exists =1 , pressio_options_key_does_not_exist =2 }
 
enum  pressio_conversion_safety { pressio_conversion_implicit =0 , pressio_conversion_explicit =1 , pressio_conversion_special =2 }
 
enum  pressio_option_type {
  pressio_option_uint32_type =0 , pressio_option_int32_type =1 , pressio_option_float_type =2 , pressio_option_double_type =3 ,
  pressio_option_charptr_type =4 , pressio_option_userptr_type =5 , pressio_option_unset_type =6 , pressio_option_charptr_array_type =7 ,
  pressio_option_data_type =8 , pressio_option_uint8_type =9 , pressio_option_int8_type =10 , pressio_option_uint16_type =11 ,
  pressio_option_int16_type =12 , pressio_option_uint64_type =13 , pressio_option_int64_type =14 , pressio_option_bool_type =15 ,
  pressio_option_dtype_type =16 , pressio_option_threadsafety_type =17
}
 

Functions

struct pressio_optionspressio_options_new ()
 
struct pressio_optionspressio_options_copy (struct pressio_options const *options)
 
struct pressio_optionspressio_options_merge (struct pressio_options const *lhs, struct pressio_options const *rhs)
 
void pressio_options_free (struct pressio_options *options)
 
enum pressio_options_key_status pressio_options_exists (struct pressio_options const *options, const char *key)
 
struct pressio_optionpressio_options_get (struct pressio_options const *options, const char *key)
 
void pressio_options_set (struct pressio_options *options, const char *key, struct pressio_option *option)
 
enum pressio_options_key_status pressio_options_cast_set (struct pressio_options *options, const char *key, struct pressio_option const *option, enum pressio_conversion_safety safety)
 
enum pressio_options_key_status pressio_options_as_set (struct pressio_options *options, const char *key, struct pressio_option *option)
 
void pressio_options_set_type (struct pressio_options *options, const char *key, enum pressio_option_type type)
 
void pressio_options_clear (struct pressio_options *options, const char *key)
 
size_t pressio_options_size (struct pressio_options const *options)
 
size_t pressio_options_num_set (struct pressio_options const *options)
 
void pressio_options_set_uinteger8 (struct pressio_options *options, const char *key, uint8_t value)
 
enum pressio_options_key_status pressio_options_get_uinteger8 (struct pressio_options const *options, const char *key, uint8_t *value)
 
enum pressio_options_key_status pressio_options_cast_uinteger8 (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, uint8_t *value)
 
enum pressio_options_key_status pressio_options_as_uinteger8 (struct pressio_options const *options, const char *key, uint8_t *value)
 
void pressio_options_set_integer8 (struct pressio_options *options, const char *key, int8_t value)
 
enum pressio_options_key_status pressio_options_get_integer8 (struct pressio_options const *options, const char *key, int8_t *value)
 
enum pressio_options_key_status pressio_options_cast_integer8 (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, int8_t *value)
 
enum pressio_options_key_status pressio_options_as_integer8 (struct pressio_options const *options, const char *key, int8_t *value)
 
void pressio_options_set_uinteger16 (struct pressio_options *options, const char *key, uint16_t value)
 
enum pressio_options_key_status pressio_options_get_uinteger16 (struct pressio_options const *options, const char *key, uint16_t *value)
 
enum pressio_options_key_status pressio_options_cast_uinteger16 (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, uint16_t *value)
 
enum pressio_options_key_status pressio_options_as_uinteger16 (struct pressio_options const *options, const char *key, uint16_t *value)
 
void pressio_options_set_integer16 (struct pressio_options *options, const char *key, int16_t value)
 
enum pressio_options_key_status pressio_options_get_integer16 (struct pressio_options const *options, const char *key, int16_t *value)
 
enum pressio_options_key_status pressio_options_cast_integer16 (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, int16_t *value)
 
enum pressio_options_key_status pressio_options_as_integer16 (struct pressio_options const *options, const char *key, int16_t *value)
 
void pressio_options_set_uinteger64 (struct pressio_options *options, const char *key, uint64_t value)
 
enum pressio_options_key_status pressio_options_get_uinteger64 (struct pressio_options const *options, const char *key, uint64_t *value)
 
enum pressio_options_key_status pressio_options_cast_uinteger64 (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, uint64_t *value)
 
enum pressio_options_key_status pressio_options_as_uinteger64 (struct pressio_options const *options, const char *key, uint64_t *value)
 
void pressio_options_set_integer64 (struct pressio_options *options, const char *key, int64_t value)
 
enum pressio_options_key_status pressio_options_get_integer64 (struct pressio_options const *options, const char *key, int64_t *value)
 
enum pressio_options_key_status pressio_options_cast_integer64 (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, int64_t *value)
 
enum pressio_options_key_status pressio_options_as_integer64 (struct pressio_options const *options, const char *key, int64_t *value)
 
void pressio_options_set_uinteger (struct pressio_options *options, const char *key, uint32_t value)
 
enum pressio_options_key_status pressio_options_get_uinteger (struct pressio_options const *options, const char *key, uint32_t *value)
 
enum pressio_options_key_status pressio_options_cast_uinteger (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, uint32_t *value)
 
enum pressio_options_key_status pressio_options_as_uinteger (struct pressio_options const *options, const char *key, uint32_t *value)
 
void pressio_options_set_integer (struct pressio_options *options, const char *key, int32_t value)
 
enum pressio_options_key_status pressio_options_get_integer (struct pressio_options const *options, const char *key, int32_t *value)
 
enum pressio_options_key_status pressio_options_cast_integer (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, int32_t *value)
 
enum pressio_options_key_status pressio_options_as_integer (struct pressio_options const *options, const char *key, int32_t *value)
 
void pressio_options_set_float (struct pressio_options *options, const char *key, float value)
 
enum pressio_options_key_status pressio_options_get_float (struct pressio_options const *options, const char *key, float *value)
 
enum pressio_options_key_status pressio_options_cast_float (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, float *value)
 
enum pressio_options_key_status pressio_options_as_float (struct pressio_options const *options, const char *key, float *value)
 
void pressio_options_set_double (struct pressio_options *options, const char *key, double value)
 
enum pressio_options_key_status pressio_options_get_double (struct pressio_options const *options, const char *key, double *value)
 
enum pressio_options_key_status pressio_options_cast_double (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, double *value)
 
enum pressio_options_key_status pressio_options_as_double (struct pressio_options const *options, const char *key, double *value)
 
void pressio_options_set_bool (struct pressio_options *options, const char *key, bool value)
 
enum pressio_options_key_status pressio_options_get_bool (struct pressio_options const *options, const char *key, bool *value)
 
enum pressio_options_key_status pressio_options_cast_bool (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, bool *value)
 
enum pressio_options_key_status pressio_options_as_bool (struct pressio_options const *options, const char *key, bool *value)
 
void pressio_options_set_userptr (struct pressio_options *options, const char *key, void *value)
 
enum pressio_options_key_status pressio_options_get_userptr (struct pressio_options const *options, const char *key, void **value)
 
enum pressio_options_key_status pressio_options_cast_userptr (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, void **value)
 
enum pressio_options_key_status pressio_options_as_userptr (struct pressio_options const *options, const char *key, void **value)
 
void pressio_options_set_dtype (struct pressio_options *options, const char *key, enum pressio_dtype value)
 
enum pressio_options_key_status pressio_options_get_dtype (struct pressio_options const *options, const char *key, enum pressio_dtype *value)
 
enum pressio_options_key_status pressio_options_cast_dtype (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, enum pressio_dtype *value)
 
enum pressio_options_key_status pressio_options_as_dtype (struct pressio_options const *options, const char *key, enum pressio_dtype *value)
 
void pressio_options_set_threadsafety (struct pressio_options *options, const char *key, enum pressio_thread_safety value)
 
enum pressio_options_key_status pressio_options_get_threadsafety (struct pressio_options const *options, const char *key, enum pressio_thread_safety *value)
 
enum pressio_options_key_status pressio_options_cast_threadsafety (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, enum pressio_thread_safety *value)
 
enum pressio_options_key_status pressio_options_as_threadsafety (struct pressio_options const *options, const char *key, enum pressio_thread_safety *value)
 
void pressio_options_set_data (struct pressio_options *options, const char *key, struct pressio_data *value)
 
enum pressio_options_key_status pressio_options_get_data (struct pressio_options const *options, const char *key, struct pressio_data **value)
 
enum pressio_options_key_status pressio_options_cast_data (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, struct pressio_data **value)
 
enum pressio_options_key_status pressio_options_as_data (struct pressio_options const *options, const char *key, struct pressio_data **value)
 
enum pressio_options_key_status pressio_options_get_string (struct pressio_options const *options, const char *key, const char **value)
 
void pressio_options_set_string (struct pressio_options *options, const char *key, const char *value)
 
enum pressio_options_key_status pressio_options_as_string (struct pressio_options const *options, const char *key, char **value)
 
enum pressio_options_key_status pressio_options_cast_string (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, char **value)
 
void pressio_options_set_userptr_managed (struct pressio_options *options, const char *key, void *value, void *metadata, void(*deleter)(void *, void *), void(*copy)(void **, void **, const void *, const void *))
 
void pressio_options_set_strings (struct pressio_options *options, const char *key, size_t size, const char *const *values)
 
enum pressio_options_key_status pressio_options_get_strings (struct pressio_options const *options, const char *key, size_t *size, const char ***values)
 
enum pressio_options_key_status pressio_options_cast_strings (struct pressio_options const *options, const char *key, const enum pressio_conversion_safety safety, size_t *size, char ***values)
 
enum pressio_options_key_status pressio_options_as_strings (struct pressio_options const *options, const char *key, size_t *size, char ***values)
 
char * pressio_options_to_string (struct pressio_options const *options)
 

Detailed Description

A set of options for a compressor.

Macro Definition Documentation

◆ LIBPRESSIO_OPTIONS_H

#define LIBPRESSIO_OPTIONS_H

Header Guard

◆ pressio_options_define_type

#define pressio_options_define_type (   name,
  type 
)
Value:
pressio_options_define_type_get(name, type) \
pressio_options_define_type_cast(name, type) \
pressio_options_define_type_as(name, type)
#define pressio_options_define_type_set(name, type)
Definition: pressio_options.h:187

Generate get/set/as/cast functions for the pressio_options class

Parameters
[in]namethe name to append to the function
[in]typethe type to wrap

◆ pressio_options_define_type_as

#define pressio_options_define_type_as (   name,
  type 
)
Value:
\
enum pressio_options_key_status pressio_options_as_##name(struct pressio_options \
const* options, const char* key, type * value);
pressio_options_key_status
Definition: pressio_options.h:27
Definition: options.h:352

internal macro used to define implicit casting functions

◆ pressio_options_define_type_cast

#define pressio_options_define_type_cast (   name,
  type 
)
Value:
\
enum pressio_options_key_status pressio_options_cast_##name(struct pressio_options \
const* options, const char* key, const enum pressio_conversion_safety safety, \
type * value);
pressio_conversion_safety
Definition: pressio_options.h:39

internal macro used to define casting functions

◆ pressio_options_define_type_get

#define pressio_options_define_type_get (   name,
  type 
)
Value:
\
enum pressio_options_key_status pressio_options_get_##name(struct pressio_options \
const* options, const char* key, type * value);

internal macro used to define getter functions

◆ pressio_options_define_type_set

#define pressio_options_define_type_set (   name,
  type 
)
Value:
\
void pressio_options_set_##name(struct pressio_options* options, const char* key, type value);

internal macro used to define setter functions

Enumeration Type Documentation

◆ pressio_conversion_safety

level of safety to require for conversions

Enumerator
pressio_conversion_implicit 

conversions that are implicitly convertible without a narrowing conversion see also [dcl.init.list] in the C++ standard

pressio_conversion_explicit 

all of the above, and conversions that are explicitly convertible with an explicit cast in C++, see also std::is_convertable

pressio_conversion_special 

all of the above, and conversions that require a special function call (i.e. atoi) if this function fails, NULL will be returned

◆ pressio_option_type

possible types contained in a pressio_option, more types may be added in the future

Enumerator
pressio_option_uint32_type 

option is a 32 bit unsigned integer

pressio_option_int32_type 

option is a 32 bit signed integer

pressio_option_float_type 

option is a 32 bit single precision floating point

pressio_option_double_type 

option is a 64 bit double precision floating point

pressio_option_charptr_type 

option is a non-owning pointer to a c-style string

pressio_option_userptr_type 

option is a non-owning pointer to a arbitrary data

pressio_option_unset_type 

option is a non-owning pointer to a arbitrary data

pressio_option_charptr_array_type 

option is an array of c-style strings

pressio_option_data_type 

option is a pressio_data structure

pressio_option_uint8_type 

option is a 8 bit unsigned integer

pressio_option_int8_type 

option is a 8 bit signed integer

pressio_option_uint16_type 

option is a 16 bit unsigned integer

pressio_option_int16_type 

option is a 16 bit signed integer

pressio_option_uint64_type 

option is a 64 bit unsigned integer

pressio_option_int64_type 

option is a 64 bit signed integer

pressio_option_bool_type 

option is a boolean

pressio_option_dtype_type 

option is a pressio_dtype

pressio_option_threadsafety_type 

option is a threadsafety

◆ pressio_options_key_status

possible status of a particular key in the option structure

Enumerator
pressio_options_key_set 

the requested key exists and is set, evaluates to false

pressio_options_key_exists 

the requested key exists but is not set, for pressio_option_set_* functions indicates a type mismatch

pressio_options_key_does_not_exist 

the requested key does not exist

Function Documentation

◆ pressio_options_as_bool()

enum pressio_options_key_status pressio_options_as_bool ( struct pressio_options const *  options,
const char *  key,
bool *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_data()

enum pressio_options_key_status pressio_options_as_data ( struct pressio_options const *  options,
const char *  key,
struct pressio_data **  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_double()

enum pressio_options_key_status pressio_options_as_double ( struct pressio_options const *  options,
const char *  key,
double *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_dtype()

enum pressio_options_key_status pressio_options_as_dtype ( struct pressio_options const *  options,
const char *  key,
enum pressio_dtype value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_float()

enum pressio_options_key_status pressio_options_as_float ( struct pressio_options const *  options,
const char *  key,
float *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_integer()

enum pressio_options_key_status pressio_options_as_integer ( struct pressio_options const *  options,
const char *  key,
int32_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_integer16()

enum pressio_options_key_status pressio_options_as_integer16 ( struct pressio_options const *  options,
const char *  key,
int16_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_integer64()

enum pressio_options_key_status pressio_options_as_integer64 ( struct pressio_options const *  options,
const char *  key,
int64_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_integer8()

enum pressio_options_key_status pressio_options_as_integer8 ( struct pressio_options const *  options,
const char *  key,
int8_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_set()

enum pressio_options_key_status pressio_options_as_set ( struct pressio_options options,
const char *  key,
struct pressio_option option 
)

Sets pressio_option for the specified key with a generic pressio_options preserving the type of the key in the options structure using an implicit cast if necessary

Parameters
[in]optionsthe option to get an pressio_option for
[in]keythe key to get from the options structure
[in]optionvalue to assign in the pressio_options structure
Returns
pressio_options_key_set if the lhs is modified, pressio_options_key_exists if the key exists but can't convert, and pressio_options_key_does_not_exist if the key does not exist;

◆ pressio_options_as_string()

enum pressio_options_key_status pressio_options_as_string ( struct pressio_options const *  options,
const char *  key,
char **  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_strings()

enum pressio_options_key_status pressio_options_as_strings ( struct pressio_options const *  options,
const char *  key,
size_t *  size,
char ***  values 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]sizethe number of strings returned. 0 on error
[out]valuesthe value retrieved, only if it is convertible. both the values and the pointer must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_threadsafety()

enum pressio_options_key_status pressio_options_as_threadsafety ( struct pressio_options const *  options,
const char *  key,
enum pressio_thread_safety value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_uinteger()

enum pressio_options_key_status pressio_options_as_uinteger ( struct pressio_options const *  options,
const char *  key,
uint32_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_uinteger16()

enum pressio_options_key_status pressio_options_as_uinteger16 ( struct pressio_options const *  options,
const char *  key,
uint16_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_uinteger64()

enum pressio_options_key_status pressio_options_as_uinteger64 ( struct pressio_options const *  options,
const char *  key,
uint64_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_uinteger8()

enum pressio_options_key_status pressio_options_as_uinteger8 ( struct pressio_options const *  options,
const char *  key,
uint8_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_as_userptr()

enum pressio_options_key_status pressio_options_as_userptr ( struct pressio_options const *  options,
const char *  key,
void **  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_bool()

enum pressio_options_key_status pressio_options_cast_bool ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
bool *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_data()

enum pressio_options_key_status pressio_options_cast_data ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
struct pressio_data **  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_double()

enum pressio_options_key_status pressio_options_cast_double ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
double *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_dtype()

enum pressio_options_key_status pressio_options_cast_dtype ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
enum pressio_dtype value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_float()

enum pressio_options_key_status pressio_options_cast_float ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
float *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_integer()

enum pressio_options_key_status pressio_options_cast_integer ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
int32_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_integer16()

enum pressio_options_key_status pressio_options_cast_integer16 ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
int16_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_integer64()

enum pressio_options_key_status pressio_options_cast_integer64 ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
int64_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_integer8()

enum pressio_options_key_status pressio_options_cast_integer8 ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
int8_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_set()

enum pressio_options_key_status pressio_options_cast_set ( struct pressio_options options,
const char *  key,
struct pressio_option const *  option,
enum pressio_conversion_safety  safety 
)

Sets pressio_option for the specified key with a generic pressio_options preserving the type of the key in the options structure using the specified cast if necessary

Parameters
[in]optionsthe option to get an pressio_option for
[in]keythe key to get from the options structure
[in]optionvalue to assign in the pressio_options structure
[in]safetywhat kind of conversions to allow
Returns
pressio_options_key_set if the lhs is modified, pressio_options_key_exists if the key exists but can't convert, and pressio_options_key_does_not_exist if the key does not exist;

◆ pressio_options_cast_string()

enum pressio_options_key_status pressio_options_cast_string ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
char **  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_strings()

enum pressio_options_key_status pressio_options_cast_strings ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
size_t *  size,
char ***  values 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]sizethe number of strings returned. 0 on error
[out]valuesthe value retrieved, only if it is convertible. both the values and the pointer must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_threadsafety()

enum pressio_options_key_status pressio_options_cast_threadsafety ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
enum pressio_thread_safety value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_uinteger()

enum pressio_options_key_status pressio_options_cast_uinteger ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
uint32_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_uinteger16()

enum pressio_options_key_status pressio_options_cast_uinteger16 ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
uint16_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_uinteger64()

enum pressio_options_key_status pressio_options_cast_uinteger64 ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
uint64_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_uinteger8()

enum pressio_options_key_status pressio_options_cast_uinteger8 ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
uint8_t *  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_cast_userptr()

enum pressio_options_key_status pressio_options_cast_userptr ( struct pressio_options const *  options,
const char *  key,
const enum pressio_conversion_safety  safety,
void **  value 
)

Gets an particular key in an options structure, casting it if necessary

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]safetywhat kind of conversions to allow
[out]valuethe value retrieved, only if it is convertible. If returning a char*, the memory must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_clear()

void pressio_options_clear ( struct pressio_options options,
const char *  key 
)

Clear the value associated with a key, but retains the entry in the options.

This MAY be used by libpressio plugin implementations to suggest a key to set libpressio plugin implementations SHOULD not change the underlying setting if the option has been cleared

Parameters
[in]optionsthe options structure to clear a value for
[in]keythe key whose value to clear

◆ pressio_options_copy()

struct pressio_options * pressio_options_copy ( struct pressio_options const *  options)

Copies the memory associated with this pressio option structure

Parameters
[in]optionsthe options structure to copy
Returns
a pointer to the copied options structure

◆ pressio_options_exists()

enum pressio_options_key_status pressio_options_exists ( struct pressio_options const *  options,
const char *  key 
)
Parameters
[in]optionsthe option to get an pressio_options_key_status for
[in]keythe key to get from the options structure
Returns
a key status for the requested key

◆ pressio_options_free()

void pressio_options_free ( struct pressio_options options)

Frees the memory associated with a pressio option structure

Parameters
[in,out]optionsfrees the pressio option structure

◆ pressio_options_get()

struct pressio_option * pressio_options_get ( struct pressio_options const *  options,
const char *  key 
)

Gets a generic pressio_option for the specified key. Calling this with an nonexistent key has undefined behavior

Parameters
[in]optionsthe option to get an pressio_option for
[in]keythe key to get from the options structure
Returns
a new copy of the corresponding pressio_option

◆ pressio_options_get_bool()

enum pressio_options_key_status pressio_options_get_bool ( struct pressio_options const *  options,
const char *  key,
bool *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_data()

enum pressio_options_key_status pressio_options_get_data ( struct pressio_options const *  options,
const char *  key,
struct pressio_data **  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_double()

enum pressio_options_key_status pressio_options_get_double ( struct pressio_options const *  options,
const char *  key,
double *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_dtype()

enum pressio_options_key_status pressio_options_get_dtype ( struct pressio_options const *  options,
const char *  key,
enum pressio_dtype value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_float()

enum pressio_options_key_status pressio_options_get_float ( struct pressio_options const *  options,
const char *  key,
float *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_integer()

enum pressio_options_key_status pressio_options_get_integer ( struct pressio_options const *  options,
const char *  key,
int32_t *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_integer16()

enum pressio_options_key_status pressio_options_get_integer16 ( struct pressio_options const *  options,
const char *  key,
int16_t *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_integer64()

enum pressio_options_key_status pressio_options_get_integer64 ( struct pressio_options const *  options,
const char *  key,
int64_t *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_integer8()

enum pressio_options_key_status pressio_options_get_integer8 ( struct pressio_options const *  options,
const char *  key,
int8_t *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_string()

enum pressio_options_key_status pressio_options_get_string ( struct pressio_options const *  options,
const char *  key,
const char **  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_strings()

enum pressio_options_key_status pressio_options_get_strings ( struct pressio_options const *  options,
const char *  key,
size_t *  size,
const char ***  values 
)

Gets a particular value in a map if it exists

pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]sizethe number of strings returned, 0 on error
[out]valuesthe value retrieved, both the values and the pointer must be freed with free()
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_threadsafety()

enum pressio_options_key_status pressio_options_get_threadsafety ( struct pressio_options const *  options,
const char *  key,
enum pressio_thread_safety value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_uinteger()

enum pressio_options_key_status pressio_options_get_uinteger ( struct pressio_options const *  options,
const char *  key,
uint32_t *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_uinteger16()

enum pressio_options_key_status pressio_options_get_uinteger16 ( struct pressio_options const *  options,
const char *  key,
uint16_t *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_uinteger64()

enum pressio_options_key_status pressio_options_get_uinteger64 ( struct pressio_options const *  options,
const char *  key,
uint64_t *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_uinteger8()

enum pressio_options_key_status pressio_options_get_uinteger8 ( struct pressio_options const *  options,
const char *  key,
uint8_t *  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_get_userptr()

enum pressio_options_key_status pressio_options_get_userptr ( struct pressio_options const *  options,
const char *  key,
void **  value 
)

Gets a particular value in a map if it exists * * pressio_options_get_string returns a newly allocated copy of the string

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[out]valuethe value retrieved
Returns
a status code
See also
pressio_options_key_status status codes returned

◆ pressio_options_merge()

struct pressio_options * pressio_options_merge ( struct pressio_options const *  lhs,
struct pressio_options const *  rhs 
)

Merges two pressio options together into one. Copies all keys and corresponding values from rhs not in lhs into a new structure.

Parameters
[in]lhsthe first structure to merge
[in]rhsthe second structure to merge; if lhs and rhs both have the same key the value from lhs is preserved
Returns
a newly allocated pressio_options structure.

◆ pressio_options_new()

struct pressio_options * pressio_options_new ( )

Creates an empty pressio_options structure returns NULL if the allocation fails

Returns
a pointer to the new options structure
See also
pressio_options_free

◆ pressio_options_num_set()

size_t pressio_options_num_set ( struct pressio_options const *  options)
Parameters
[in]optionsthe options structure to get the size of
Returns
the number of keys with the status pressio_options_key_set

◆ pressio_options_set()

void pressio_options_set ( struct pressio_options options,
const char *  key,
struct pressio_option option 
)

Sets pressio_option for the specified key with a generic pressio_options

Parameters
[in]optionsthe option to get an pressio_option for
[in]keythe key to get from the options structure
[in]optionvalue to set in the pressio_options structure

◆ pressio_options_set_bool()

void pressio_options_set_bool ( struct pressio_options options,
const char *  key,
bool  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_data()

void pressio_options_set_data ( struct pressio_options options,
const char *  key,
struct pressio_data value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_double()

void pressio_options_set_double ( struct pressio_options options,
const char *  key,
double  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_dtype()

void pressio_options_set_dtype ( struct pressio_options options,
const char *  key,
enum pressio_dtype  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_float()

void pressio_options_set_float ( struct pressio_options options,
const char *  key,
float  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_integer()

void pressio_options_set_integer ( struct pressio_options options,
const char *  key,
int32_t  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_integer16()

void pressio_options_set_integer16 ( struct pressio_options options,
const char *  key,
int16_t  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_integer64()

void pressio_options_set_integer64 ( struct pressio_options options,
const char *  key,
int64_t  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_integer8()

void pressio_options_set_integer8 ( struct pressio_options options,
const char *  key,
int8_t  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_string()

void pressio_options_set_string ( struct pressio_options options,
const char *  key,
const char *  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_strings()

void pressio_options_set_strings ( struct pressio_options options,
const char *  key,
size_t  size,
const char *const *  values 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]sizethe number of strings passed
[in]valuesthe value to change to

◆ pressio_options_set_threadsafety()

void pressio_options_set_threadsafety ( struct pressio_options options,
const char *  key,
enum pressio_thread_safety  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_type()

void pressio_options_set_type ( struct pressio_options options,
const char *  key,
enum pressio_option_type  type 
)

Sets pressio_option to the specified type

Parameters
[in]optionsthe option to set type of a pressio_option for
[in]keythe key to get from the options structure
[in]typevalue to set in the pressio_options structure
Returns
pressio_options_key_set if the key is modified, pressio_options_key_exists if the key exists but can't convert, and pressio_options_key_does_not_exist if the key does not exist;

◆ pressio_options_set_uinteger()

void pressio_options_set_uinteger ( struct pressio_options options,
const char *  key,
uint32_t  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_uinteger16()

void pressio_options_set_uinteger16 ( struct pressio_options options,
const char *  key,
uint16_t  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_uinteger64()

void pressio_options_set_uinteger64 ( struct pressio_options options,
const char *  key,
uint64_t  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_uinteger8()

void pressio_options_set_uinteger8 ( struct pressio_options options,
const char *  key,
uint8_t  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_userptr()

void pressio_options_set_userptr ( struct pressio_options options,
const char *  key,
void *  value 
)

Sets an particular key in an options structure with the given key to a value

Parameters
[in]optionsthe options structure to modify
[in]keythe key to change
[in]valuethe value to change to

◆ pressio_options_set_userptr_managed()

void pressio_options_set_userptr_managed ( struct pressio_options options,
const char *  key,
void *  value,
void *  metadata,
void(*)(void *, void *)  deleter,
void(*)(void **, void **, const void *, const void *)  copy 
)

Creates a new pressio_option containing the specified value

Parameters
[in]optionsthe options structure to set
[in]keythe value to use to create the object
[in]valuethe value to use to create the object
[in]metadatato use to manage the allocation of value
[in]deleterdeletes the value
[in]copycopies the value
Returns
a pointer to a new pressio option set to value passed in

◆ pressio_options_size()

size_t pressio_options_size ( struct pressio_options const *  options)
Parameters
[in]optionsthe options structure to get the size of
Returns
the number of keys with either the status pressio_options_key_set or pressio_options_key_exists

◆ pressio_options_to_string()

char * pressio_options_to_string ( struct pressio_options const *  options)

Create a human readable string for the options passed.

The format is unspecified and should NOT be parsed. It may change without warning.

For machine readable formats, please use pressio_options_get_iter() to iterate over each object and convert each item as a string using pressio_options_cast_string()/pressio_options_cast_string() or the equivelent C++ routines.

Parameters
[in]optionsthe options to format as a string
Returns
a human readable string designed for debugging output, return nullptr on error. The returned string should be freed.