#include "param_struct.h"
#include "param_internal.h"
#include "utils_common.h"
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
◆ yac_param_struct_delete()
| static void yac_param_struct_delete |
( |
struct yac_param * | param | ) |
|
|
static |
◆ yac_param_struct_get_name()
| static const char * yac_param_struct_get_name |
( |
const struct yac_param * | param | ) |
|
|
static |
◆ yac_param_struct_get_sub_by_index()
| static int yac_param_struct_get_sub_by_index |
( |
struct yac_param * | param, |
|
|
size_t | idx, |
|
|
struct yac_param ** | sub_param ) |
|
static |
◆ yac_param_struct_get_sub_by_name()
| static int yac_param_struct_get_sub_by_name |
( |
const struct yac_param * | param, |
|
|
const char * | name, |
|
|
struct yac_param ** | sub_param ) |
|
static |
◆ yac_param_struct_get_sub_count()
| static int yac_param_struct_get_sub_count |
( |
const struct yac_param * | param, |
|
|
size_t * | count ) |
|
static |
◆ yac_param_struct_get_type()
◆ yac_param_struct_is_default()
| static int yac_param_struct_is_default |
( |
const struct yac_param * | param | ) |
|
|
static |
◆ yac_param_struct_new()
| struct yac_param * yac_param_struct_new |
( |
const char * | name, |
|
|
struct yac_param ** | subparams, |
|
|
size_t | subparam_count ) |
Create a new struct parameter with a given name and subparameters.
Allocates and returns a new struct parameter object. The struct parameter will have the specified name and contain the given subparameters as its children.
The subparams array must contain pointers to already-allocated parameter objects (e.g., created with yac_param_int_new, etc). Ownership of the subparams is transferred to the struct parameter: they will be deleted when the struct parameter is deleted.
- Parameters
-
| name | Name of the struct parameter (must not be NULL or empty) |
| subparams | Array of pointers to subparameter objects |
| subparam_count | Number of subparameters in the array |
- Returns
- Pointer to new struct parameter object
Definition at line 128 of file param_struct.c.
◆ yac_param_struct_vtable
Initial value:= {
.append = NULL,
.set_scalar = NULL,
.get_scalar = NULL,
.set_scalar_int = NULL,
.set_scalar_dble = NULL,
.get_scalar_int = NULL,
.get_scalar_dble = NULL
}
static int yac_param_struct_get_sub_count(const struct yac_param *param, size_t *count)
static void yac_param_struct_delete(struct yac_param *param)
static enum yac_param_type yac_param_struct_get_type(const struct yac_param *param)
static int yac_param_struct_get_sub_by_name(const struct yac_param *param, const char *name, struct yac_param **sub_param)
static int yac_param_struct_is_default(const struct yac_param *param)
static const char * yac_param_struct_get_name(const struct yac_param *param)
static int yac_param_struct_get_sub_by_index(struct yac_param *param, size_t idx, struct yac_param **sub_param)
Definition at line 111 of file param_struct.c.