Kestrel Interface
Loading...
Searching...
No Matches
kest_dictionary.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include "kest_int.h"

Go to the source code of this file.

Macros

#define PRINTLINES_ALLOWED   1
#define LIST_ENTRY_NAME_BUF_LEN   128

Functions

 IMPLEMENT_LIST (kest_dictionary_entry)
const char * kest_dict_entry_type_to_string (int type)
const char * kest_dict_entry_type_to_string_nice (int type)
kest_stringkest_dict_entry_to_string (kest_dictionary_entry *entry)
int kest_dictionary_bucket_init (kest_dictionary_bucket *bucket)
int kest_dictionary_bucket_ensure_capacity (kest_dictionary_bucket *bucket)
int kest_dictionary_bucket_add_entry (kest_dictionary_bucket *bucket, kest_dictionary_entry entry)
int kest_dictionary_bucket_add_entry_str (kest_dictionary_bucket *bucket, const char *name, const char *value)
int kest_dictionary_bucket_add_entry_int (kest_dictionary_bucket *bucket, const char *name, int value)
int kest_dictionary_bucket_add_entry_float (kest_dictionary_bucket *bucket, const char *name, float value)
int kest_dictionary_bucket_add_entry_expr (kest_dictionary_bucket *bucket, const char *name, kest_expression *value)
int kest_dictionary_bucket_add_entry_dict (kest_dictionary_bucket *bucket, const char *name, kest_dictionary *value)
int kest_dictionary_bucket_lookup (kest_dictionary_bucket *bucket, const char *name, void *result, int type)
int kest_dictionary_bucket_lookup_str (kest_dictionary_bucket *bucket, const char *name, const char **result)
int kest_dictionary_bucket_lookup_float (kest_dictionary_bucket *bucket, const char *name, float *result)
int kest_dictionary_bucket_lookup_int (kest_dictionary_bucket *bucket, const char *name, int *result)
int kest_dictionary_bucket_lookup_expr (kest_dictionary_bucket *bucket, const char *name, kest_expression **result)
int kest_dictionary_bucket_lookup_dict (kest_dictionary_bucket *bucket, const char *name, kest_dictionary **result)
int kest_dictionary_bucket_lookup_list (kest_dictionary_bucket *bucket, const char *name, kest_dictionary_entry_list **result)
kest_dictionarykest_new_dictionary ()
int kest_dictionary_ensure_capacity (kest_dictionary *dict)
int kest_dictionary_add_entry (kest_dictionary *dict, kest_dictionary_entry entry)
int kest_dictionary_add_entry_str (kest_dictionary *dict, const char *name, const char *value)
int kest_dictionary_add_entry_int (kest_dictionary *dict, const char *name, int value)
int kest_dictionary_add_entry_float (kest_dictionary *dict, const char *name, float value)
int kest_dictionary_add_entry_expr (kest_dictionary *dict, const char *name, kest_expression *value)
int kest_dictionary_add_entry_dict (kest_dictionary *dict, const char *name, kest_dictionary *value)
int kest_dictionary_lookup (kest_dictionary *dict, const char *name, void *result, int type)
int kest_dictionary_lookup_str (kest_dictionary *dict, const char *name, const char **result)
int kest_dictionary_lookup_float (kest_dictionary *dict, const char *name, float *result)
int kest_dictionary_lookup_int (kest_dictionary *dict, const char *name, int *result)
int kest_dictionary_lookup_expr (kest_dictionary *dict, const char *name, kest_expression **result)
int kest_dictionary_lookup_dict (kest_dictionary *dict, const char *name, kest_dictionary **result)
int kest_dictionary_lookup_list (kest_dictionary *dict, const char *name, kest_dictionary_entry_list **result)
void print_dict_entry (kest_dictionary_entry *entry)
void print_dict (kest_dictionary *dict)
int kest_parse_dict_list (kest_eff_parsing_state *ps, kest_dictionary *dict, kest_dictionary_entry *result)
int kest_parse_dict_val (kest_eff_parsing_state *ps, kest_dictionary *dict, kest_dictionary_entry *result)
int kest_parse_dictionary (kest_eff_parsing_state *ps, kest_dictionary **result, const char *name)

Macro Definition Documentation

◆ LIST_ENTRY_NAME_BUF_LEN

#define LIST_ENTRY_NAME_BUF_LEN   128

Definition at line 682 of file kest_dictionary.c.

Referenced by kest_parse_dict_list().

◆ PRINTLINES_ALLOWED

#define PRINTLINES_ALLOWED   1

Definition at line 9 of file kest_dictionary.c.

Function Documentation

◆ IMPLEMENT_LIST()

IMPLEMENT_LIST ( kest_dictionary_entry )

◆ kest_dict_entry_to_string()

kest_string * kest_dict_entry_to_string ( kest_dictionary_entry * entry)

Definition at line 44 of file kest_dictionary.c.

Referenced by kest_dict_entry_to_string(), kest_extract_filter_coefs_from_dict(), kest_parse_dict_list(), kest_parse_dict_val(), and print_dict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dict_entry_type_to_string()

const char * kest_dict_entry_type_to_string ( int type)

Definition at line 16 of file kest_dictionary.c.

Referenced by kest_defs_section_extract().

Here is the caller graph for this function:

◆ kest_dict_entry_type_to_string_nice()

const char * kest_dict_entry_type_to_string_nice ( int type)

Definition at line 30 of file kest_dictionary.c.

Referenced by kest_extract_filter_coefs_from_dict().

Here is the caller graph for this function:

◆ kest_dictionary_add_entry()

int kest_dictionary_add_entry ( kest_dictionary * dict,
kest_dictionary_entry entry )

Definition at line 436 of file kest_dictionary.c.

Referenced by kest_parse_dict_list(), and kest_parse_dictionary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_add_entry_dict()

int kest_dictionary_add_entry_dict ( kest_dictionary * dict,
const char * name,
kest_dictionary * value )

Definition at line 553 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_add_entry_expr()

int kest_dictionary_add_entry_expr ( kest_dictionary * dict,
const char * name,
kest_expression * value )

Definition at line 529 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_add_entry_float()

int kest_dictionary_add_entry_float ( kest_dictionary * dict,
const char * name,
float value )

Definition at line 505 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_add_entry_int()

int kest_dictionary_add_entry_int ( kest_dictionary * dict,
const char * name,
int value )

Definition at line 481 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_add_entry_str()

int kest_dictionary_add_entry_str ( kest_dictionary * dict,
const char * name,
const char * value )

Definition at line 457 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_bucket_add_entry()

int kest_dictionary_bucket_add_entry ( kest_dictionary_bucket * bucket,
kest_dictionary_entry entry )

Definition at line 175 of file kest_dictionary.c.

Referenced by kest_dictionary_add_entry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_bucket_add_entry_dict()

int kest_dictionary_bucket_add_entry_dict ( kest_dictionary_bucket * bucket,
const char * name,
kest_dictionary * value )

Definition at line 282 of file kest_dictionary.c.

Referenced by kest_dictionary_add_entry_dict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_bucket_add_entry_expr()

int kest_dictionary_bucket_add_entry_expr ( kest_dictionary_bucket * bucket,
const char * name,
kest_expression * value )

Definition at line 260 of file kest_dictionary.c.

Referenced by kest_dictionary_add_entry_expr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_bucket_add_entry_float()

int kest_dictionary_bucket_add_entry_float ( kest_dictionary_bucket * bucket,
const char * name,
float value )

Definition at line 238 of file kest_dictionary.c.

Referenced by kest_dictionary_add_entry_float().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_bucket_add_entry_int()

int kest_dictionary_bucket_add_entry_int ( kest_dictionary_bucket * bucket,
const char * name,
int value )

Definition at line 216 of file kest_dictionary.c.

Referenced by kest_dictionary_add_entry_int().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_bucket_add_entry_str()

int kest_dictionary_bucket_add_entry_str ( kest_dictionary_bucket * bucket,
const char * name,
const char * value )

Definition at line 194 of file kest_dictionary.c.

Referenced by kest_dictionary_add_entry_str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_bucket_ensure_capacity()

int kest_dictionary_bucket_ensure_capacity ( kest_dictionary_bucket * bucket)

Definition at line 140 of file kest_dictionary.c.

Referenced by kest_dictionary_bucket_add_entry(), kest_dictionary_bucket_add_entry_dict(), kest_dictionary_bucket_add_entry_expr(), kest_dictionary_bucket_add_entry_float(), kest_dictionary_bucket_add_entry_int(), and kest_dictionary_bucket_add_entry_str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_bucket_init()

int kest_dictionary_bucket_init ( kest_dictionary_bucket * bucket)

Definition at line 130 of file kest_dictionary.c.

Referenced by kest_new_dictionary().

Here is the caller graph for this function:

◆ kest_dictionary_bucket_lookup()

int kest_dictionary_bucket_lookup ( kest_dictionary_bucket * bucket,
const char * name,
void * result,
int type )

Definition at line 304 of file kest_dictionary.c.

Referenced by kest_dictionary_bucket_lookup_dict(), kest_dictionary_bucket_lookup_expr(), kest_dictionary_bucket_lookup_float(), kest_dictionary_bucket_lookup_int(), kest_dictionary_bucket_lookup_list(), kest_dictionary_bucket_lookup_str(), and kest_dictionary_lookup().

Here is the caller graph for this function:

◆ kest_dictionary_bucket_lookup_dict()

int kest_dictionary_bucket_lookup_dict ( kest_dictionary_bucket * bucket,
const char * name,
kest_dictionary ** result )

Definition at line 377 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_bucket_lookup_expr()

int kest_dictionary_bucket_lookup_expr ( kest_dictionary_bucket * bucket,
const char * name,
kest_expression ** result )

Definition at line 372 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_bucket_lookup_float()

int kest_dictionary_bucket_lookup_float ( kest_dictionary_bucket * bucket,
const char * name,
float * result )

Definition at line 362 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_bucket_lookup_int()

int kest_dictionary_bucket_lookup_int ( kest_dictionary_bucket * bucket,
const char * name,
int * result )

Definition at line 367 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_bucket_lookup_list()

int kest_dictionary_bucket_lookup_list ( kest_dictionary_bucket * bucket,
const char * name,
kest_dictionary_entry_list ** result )

Definition at line 382 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_bucket_lookup_str()

int kest_dictionary_bucket_lookup_str ( kest_dictionary_bucket * bucket,
const char * name,
const char ** result )

Definition at line 357 of file kest_dictionary.c.

Here is the call graph for this function:

◆ kest_dictionary_ensure_capacity()

int kest_dictionary_ensure_capacity ( kest_dictionary * dict)

Definition at line 413 of file kest_dictionary.c.

Referenced by kest_dictionary_add_entry(), kest_dictionary_add_entry_dict(), kest_dictionary_add_entry_expr(), kest_dictionary_add_entry_float(), kest_dictionary_add_entry_int(), and kest_dictionary_add_entry_str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_lookup()

int kest_dictionary_lookup ( kest_dictionary * dict,
const char * name,
void * result,
int type )

Definition at line 577 of file kest_dictionary.c.

Referenced by kest_dictionary_lookup_dict(), kest_dictionary_lookup_expr(), kest_dictionary_lookup_float(), kest_dictionary_lookup_int(), kest_dictionary_lookup_list(), and kest_dictionary_lookup_str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_lookup_dict()

int kest_dictionary_lookup_dict ( kest_dictionary * dict,
const char * name,
kest_dictionary ** result )

Definition at line 607 of file kest_dictionary.c.

Referenced by kest_dictionary_section_lookup_dict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_lookup_expr()

int kest_dictionary_lookup_expr ( kest_dictionary * dict,
const char * name,
kest_expression ** result )

Definition at line 602 of file kest_dictionary.c.

Referenced by kest_dictionary_section_lookup_expr(), kest_extract_delay_buffer_from_dict(), kest_extract_filter_from_dict(), kest_extract_int_setting_from_dict(), kest_extract_mem_from_dict(), kest_extract_parameter_from_dict(), and kest_extract_setting_from_dict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_lookup_float()

int kest_dictionary_lookup_float ( kest_dictionary * dict,
const char * name,
float * result )

Definition at line 592 of file kest_dictionary.c.

Referenced by kest_dictionary_section_lookup_float().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_lookup_int()

int kest_dictionary_lookup_int ( kest_dictionary * dict,
const char * name,
int * result )

Definition at line 597 of file kest_dictionary.c.

Referenced by kest_dictionary_section_lookup_int().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_lookup_list()

int kest_dictionary_lookup_list ( kest_dictionary * dict,
const char * name,
kest_dictionary_entry_list ** result )

Definition at line 612 of file kest_dictionary.c.

Referenced by kest_extract_filter_coefs_from_dict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_dictionary_lookup_str()

int kest_dictionary_lookup_str ( kest_dictionary * dict,
const char * name,
const char ** result )

Definition at line 587 of file kest_dictionary.c.

Referenced by kest_dictionary_section_lookup_str(), kest_extract_bool_setting_from_dict(), kest_extract_parameter_from_dict(), kest_extract_resource_from_dict(), and kest_extract_setting_from_dict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_new_dictionary()

kest_dictionary * kest_new_dictionary ( )

Definition at line 388 of file kest_dictionary.c.

Referenced by kest_parse_dictionary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_parse_dict_list()

int kest_parse_dict_list ( kest_eff_parsing_state * ps,
kest_dictionary * dict,
kest_dictionary_entry * result )

Definition at line 684 of file kest_dictionary.c.

Referenced by kest_parse_dict_val().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_parse_dict_val()

int kest_parse_dict_val ( kest_eff_parsing_state * ps,
kest_dictionary * dict,
kest_dictionary_entry * result )

Definition at line 799 of file kest_dictionary.c.

Referenced by kest_parse_dict_list(), and kest_parse_dictionary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_parse_dictionary()

int kest_parse_dictionary ( kest_eff_parsing_state * ps,
kest_dictionary ** result,
const char * name )

Definition at line 938 of file kest_dictionary.c.

Referenced by kest_parse_dict_val(), and kest_parse_dictionary_section().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_dict()

void print_dict ( kest_dictionary * dict)

Definition at line 650 of file kest_dictionary.c.

Referenced by kest_parse_dictionary_section().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_dict_entry()

void print_dict_entry ( kest_dictionary_entry * entry)

Definition at line 617 of file kest_dictionary.c.