YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
param_list.c File Reference
#include "param_list.h"
#include "param_internal.h"
#include "utils_common.h"
#include <string.h>
Include dependency graph for param_list.c:

Go to the source code of this file.

Data Structures

struct  yac_param_list
 

Functions

static enum yac_param_type yac_param_list_get_type (const struct yac_param *param)
 
static int yac_param_list_is_default (const struct yac_param *param)
 
static const char * yac_param_list_get_name (const struct yac_param *param)
 
static int yac_param_list_get_sub_count (const struct yac_param *param, size_t *count)
 
static int yac_param_list_get_sub_by_index (struct yac_param *param, size_t idx, struct yac_param **sub_param)
 
static int yac_param_list_append (struct yac_param *param, struct yac_param **sub_param)
 
static void yac_param_list_delete (struct yac_param *param)
 
struct yac_param * yac_param_list_new (const char *name, void ***list, yac_param_factory_ptr default_factory, yac_param_element_get_param_ptr element_get_param)
 Create a new list parameter.
 

Variables

static const struct yac_param_vtable yac_param_list_vtable
 

Function Documentation

◆ yac_param_list_append()

static int yac_param_list_append ( struct yac_param * param,
struct yac_param ** sub_param )
static

Definition at line 64 of file param_list.c.

◆ yac_param_list_delete()

static void yac_param_list_delete ( struct yac_param * param)
static

Definition at line 96 of file param_list.c.

Here is the call graph for this function:

◆ yac_param_list_get_name()

static const char * yac_param_list_get_name ( const struct yac_param * param)
static

Definition at line 33 of file param_list.c.

◆ yac_param_list_get_sub_by_index()

static int yac_param_list_get_sub_by_index ( struct yac_param * param,
size_t idx,
struct yac_param ** sub_param )
static

Definition at line 49 of file param_list.c.

◆ yac_param_list_get_sub_count()

static int yac_param_list_get_sub_count ( const struct yac_param * param,
size_t * count )
static

Definition at line 40 of file param_list.c.

◆ yac_param_list_get_type()

static enum yac_param_type yac_param_list_get_type ( const struct yac_param * param)
static

Definition at line 20 of file param_list.c.

◆ yac_param_list_is_default()

static int yac_param_list_is_default ( const struct yac_param * param)
static

Definition at line 26 of file param_list.c.

◆ yac_param_list_new()

struct yac_param * yac_param_list_new ( const char * name,
void *** list,
yac_param_factory_ptr default_factory,
yac_param_element_get_param_ptr element_get_param )

Create a new list parameter.

Ownership of the backing list and list elements always stays with the caller. The constructor only wraps configuration params around the elements.

If element_get_param is NULL, *list must be NULL (no pre-existing elements).

Parameters
nameName of the list parameter
listPointer to the backing NULL-terminated array
default_factoryFactory for new (appended) elements and params
element_get_paramFactory to get the param for an already-existing element; may be NULL only when *list is NULL
Returns
Pointer to new list parameter object

Definition at line 134 of file param_list.c.

Here is the caller graph for this function:

Variable Documentation

◆ yac_param_list_vtable

const struct yac_param_vtable yac_param_list_vtable
static
Initial value:
= {
.get_sub_count = yac_param_list_get_sub_count,
.get_sub_by_name = NULL,
.get_sub_by_index = yac_param_list_get_sub_by_index,
.set_scalar = NULL,
.get_scalar = NULL,
.get_scalar_kind = NULL,
.set_scalar_int = NULL,
.set_scalar_dble = NULL,
.get_scalar_int = NULL,
.get_scalar_dble = NULL
}
static int yac_param_list_get_sub_count(const struct yac_param *param, size_t *count)
Definition param_list.c:40
static const char * yac_param_list_get_name(const struct yac_param *param)
Definition param_list.c:33
static void yac_param_list_delete(struct yac_param *param)
Definition param_list.c:96
static enum yac_param_type yac_param_list_get_type(const struct yac_param *param)
Definition param_list.c:20
static int yac_param_list_append(struct yac_param *param, struct yac_param **sub_param)
Definition param_list.c:64
static int yac_param_list_is_default(const struct yac_param *param)
Definition param_list.c:26
static int yac_param_list_get_sub_by_index(struct yac_param *param, size_t idx, struct yac_param **sub_param)
Definition param_list.c:49

Definition at line 112 of file param_list.c.