1#pragma once
 2
 3/*
 4 * Accessor functions.
 5 */
 6
 7#include <pw.h>
 8
 9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#define pw_get(result, container, ...) _pw_get((result), (container) __VA_OPT__(,) __VA_ARGS__, nullptr)
14bool _pw_get(PwValuePtr result, PwValuePtr container, ...);
15
16#define pw_set(value, container, ...) _pw_set((value), (container) __VA_OPT__(,) __VA_ARGS__, nullptr)
17bool _pw_set(PwValuePtr value, PwValuePtr container, ...);
18/*
19 * Get value from container object / set value.
20 * Variadic arguments are path to value and all must have char* type because
21 * there's no simple way to distinguish types of variadic args.
22 * For maps arguments are used as keys in UTF-8 encoding.
23 * For lists arguments are converted to integer index.
24 */
25
26#ifdef __cplusplus
27}
28#endif