wlmaker
|
Classes | |
struct | _test_subdict_value_t |
struct | _test_value_t |
Macros | |
#define | BS_VALUE_AT(_value_type, _base_ptr, _offset) ((_value_type*)((uint8_t*)(_base_ptr) + (_offset))) |
Functions | |
static bool | _wlmcfg_init_defaults (const wlmcfg_desc_t *desc_ptr, void *dest_ptr) |
static bool | _wlmcfg_decode_uint64 (wlmcfg_object_t *obj_ptr, uint64_t *uint64_ptr) |
static bool | _wlmcfg_decode_int64 (wlmcfg_object_t *obj_ptr, int64_t *int64_ptr) |
static bool | _wlmcfg_decode_double (wlmcfg_object_t *obj_ptr, double *double_ptr) |
static bool | _wlmcfg_decode_argb32 (wlmcfg_object_t *obj_ptr, uint32_t *argb32_ptr) |
static bool | _wlmcfg_decode_bool (wlmcfg_object_t *obj_ptr, bool *bool_ptr) |
static bool | _wlmcfg_decode_enum (wlmcfg_object_t *obj_ptr, const wlmcfg_enum_desc_t *enum_desc_ptr, int *enum_value_ptr) |
static bool | _wlmcfg_decode_string (wlmcfg_object_t *obj_ptr, char **str_ptr_ptr) |
static bool | _wlmcfg_decode_charbuf (wlmcfg_object_t *obj_ptr, char *str_ptr, size_t len) |
bool | wlmcfg_decode_dict (wlmcfg_dict_t *dict_ptr, const wlmcfg_desc_t *desc_ptr, void *dest_ptr) |
void | wlmcfg_decoded_destroy (const wlmcfg_desc_t *desc_ptr, void *dest_ptr) |
bool | wlmcfg_enum_name_to_value (const wlmcfg_enum_desc_t *enum_desc_ptr, const char *name_ptr, int *value_ptr) |
bool | wlmcfg_enum_value_to_name (const wlmcfg_enum_desc_t *enum_desc_ptr, int value, const char **name_ptr_ptr) |
static void | test_init_defaults (bs_test_t *test_ptr) |
static void | test_enum_translate (bs_test_t *test_ptr) |
static void | test_decode_dict (bs_test_t *test_ptr) |
static void | test_decode_number (bs_test_t *test_ptr) |
static void | test_decode_argb32 (bs_test_t *test_ptr) |
static void | test_decode_bool (bs_test_t *test_ptr) |
static void | test_decode_enum (bs_test_t *test_ptr) |
static void | test_decode_string (bs_test_t *test_ptr) |
static void | test_decode_charbuf (bs_test_t *test_ptr) |
static bool | _wlmcfg_test_custom_decode (wlmcfg_object_t *o_ptr, void *dst_ptr) |
static bool | _wlmcfg_test_custom_init (void *dst_ptr) |
static void | _wlmcfg_test_custom_fini (void *dst_ptr) |
Variables | |
static const wlmcfg_enum_desc_t | _wlmcfg_bool_desc [] |
const bs_test_case_t | wlmcfg_decode_test_cases [] |
static const wlmcfg_enum_desc_t | _test_enum_desc [] |
static const wlmcfg_desc_t | _wlmcfg_decode_test_subdesc [] |
static const wlmcfg_desc_t | _wlmcfg_decode_test_desc [] |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Configurables for wlmaker. Currently, this file lists hardcoded entities, and mainly serves as a catalog about which entities should be dynamically configurable.
#define BS_VALUE_AT | ( | _value_type, | |
_base_ptr, | |||
_offset ) ((_value_type*)((uint8_t*)(_base_ptr) + (_offset))) |
A pointer of type value_type
, at offset
behind base_ptr
.
|
static |
Deocdes an ARGB32 value from the config object.
|
static |
Translates a bool value from the string.
|
static |
Translates (ie. duplicates) a char buf from the plist string.
|
static |
Decodes a floating point number.
|
static |
Translates a enum value from the string, using the provided descriptor.
|
static |
Decodes a signed number, using int64_t as carry-all.
|
static |
Translates (ie. duplicates) a string value from the plist string.
|
static |
Decodes an unsigned number, using uint64_t as carry-all.
|
static |
Initializes default values at the destination, as described.
desc_ptr | |
dest_ptr |
|
static |
A custom decoding function. Here: just decode a string.
|
static |
A custom decoding cleanup method. Frees the string.
|
static |
A custom decoding initializer. Here: Just create a string.
|
static |
Tests argb32 decoding.
|
static |
Tests bool decoding.
|
static |
Tests string decoding into a char buf.
|
static |
Tests dict decoding.
|
static |
Tests enum decoding.
|
static |
Tests number decoding.
|
static |
Tests string decoding.
|
static |
|
static |
Tests initialization of default values.
bool wlmcfg_decode_dict | ( | wlmcfg_dict_t * | dict_ptr, |
const wlmcfg_desc_t * | desc_ptr, | ||
void * | dest_ptr ) |
Decodes the plist dict_ptr
into dest_ptr
as described.
dict_ptr | |
desc_ptr | |
dest_ptr |
void wlmcfg_decoded_destroy | ( | const wlmcfg_desc_t * | desc_ptr, |
void * | dest_ptr ) |
Destroys resources that were allocated during wlmcfg_decode_dict.
desc_ptr | |
dest_ptr |
bool wlmcfg_enum_name_to_value | ( | const wlmcfg_enum_desc_t * | enum_desc_ptr, |
const char * | name_ptr, | ||
int * | value_ptr ) |
Translates from the given name of an enum to it's value.
enum_desc_ptr | |
name_ptr | |
value_ptr |
name_ptr
was a valid enum name. bool wlmcfg_enum_value_to_name | ( | const wlmcfg_enum_desc_t * | enum_desc_ptr, |
int | value, | ||
const char ** | name_ptr_ptr ) |
Translates from the given value of an enum to it's name.
enum_desc_ptr | |
value | |
name_ptr_ptr |
name_ptr
was a valid enum name.
|
static |
An enum descriptor.
|
static |
Enum descriptor for decoding bool.
|
static |
Test descriptor.
|
static |
Descriptor of a contained dict.
const bs_test_case_t wlmcfg_decode_test_cases[] |
Unit tests.