YAC 3.18.0
Yet Another Coupler
Loading...
Searching...
No Matches
param_int.c File Reference
#include "param_int.h"
#include "param_internal.h"
#include "utils_common.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <limits.h>
Include dependency graph for param_int.c:

Go to the source code of this file.

Data Structures

struct  yac_param_int
 

Functions

static enum yac_param_type yac_param_int_get_type (const struct yac_param *param)
 
static int yac_param_int_is_default (const struct yac_param *param)
 
static const char * yac_param_int_get_name (const struct yac_param *param)
 
static int yac_param_int_set_scalar_int (struct yac_param *param, int value)
 
static int yac_param_int_set_scalar (struct yac_param *param, const char *value_str)
 
static int yac_param_int_get_scalar_int (const struct yac_param *param, int *value)
 
static int yac_param_int_get_scalar (const struct yac_param *param, char *buf, size_t buflen)
 
static void yac_param_int_delete (struct yac_param *param)
 
static int yac_param_int_set_scalar_dble (struct yac_param *param, double value)
 
static int yac_param_int_get_scalar_dble (const struct yac_param *param, double *value)
 
struct yac_paramyac_param_int_new (const char *name, int *value_ptr, int default_value, int value_min, int value_max, int has_default, int is_defined)
 Create an int parameter.
 

Variables

static const struct yac_param_vtable yac_param_int_vtable
 

Function Documentation

◆ yac_param_int_delete()

static void yac_param_int_delete ( struct yac_param * param)
static

Definition at line 110 of file param_int.c.

◆ yac_param_int_get_name()

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

Definition at line 40 of file param_int.c.

◆ yac_param_int_get_scalar()

static int yac_param_int_get_scalar ( const struct yac_param * param,
char * buf,
size_t buflen )
static

Definition at line 93 of file param_int.c.

Here is the call graph for this function:

◆ yac_param_int_get_scalar_dble()

static int yac_param_int_get_scalar_dble ( const struct yac_param * param,
double * value )
static

Definition at line 129 of file param_int.c.

Here is the call graph for this function:

◆ yac_param_int_get_scalar_int()

static int yac_param_int_get_scalar_int ( const struct yac_param * param,
int * value )
static

Definition at line 78 of file param_int.c.

Here is the caller graph for this function:

◆ yac_param_int_get_type()

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

Definition at line 26 of file param_int.c.

◆ yac_param_int_is_default()

static int yac_param_int_is_default ( const struct yac_param * param)
static

Definition at line 32 of file param_int.c.

◆ yac_param_int_new()

struct yac_param * yac_param_int_new ( const char * name,
int * value_ptr,
int default_value,
int value_min,
int value_max,
int has_default,
int is_defined )

Create an int parameter.

Parameters
nameName of the parameter (copied internally, may be NULL for unnamed)
value_ptrPointer to the int value
default_valueDefault value (ignored if has_default is false)
value_minMinimum allowed value (inclusive)
value_maxMaximum allowed value (inclusive)
has_defaultIf true, parameter has a default value; if false, value is undefined until set
is_definedIf true, initial value is considered defined; if false, initial value is considered undefined and user must set it before getting
Returns
Pointer to new parameter handle

Definition at line 157 of file param_int.c.

Here is the caller graph for this function:

◆ yac_param_int_set_scalar()

static int yac_param_int_set_scalar ( struct yac_param * param,
const char * value_str )
static

Definition at line 60 of file param_int.c.

Here is the call graph for this function:

◆ yac_param_int_set_scalar_dble()

static int yac_param_int_set_scalar_dble ( struct yac_param * param,
double value )
static

Definition at line 118 of file param_int.c.

Here is the call graph for this function:

◆ yac_param_int_set_scalar_int()

static int yac_param_int_set_scalar_int ( struct yac_param * param,
int value )
static

Definition at line 47 of file param_int.c.

Here is the caller graph for this function:

Variable Documentation

◆ yac_param_int_vtable

const struct yac_param_vtable yac_param_int_vtable
static
Initial value:
= {
.is_default = yac_param_int_is_default,
.get_sub_count = NULL,
.get_sub_by_name = NULL,
.get_sub_by_index = NULL,
.append = NULL,
.set_scalar = yac_param_int_set_scalar,
.get_scalar = yac_param_int_get_scalar,
.set_scalar_int = yac_param_int_set_scalar_int,
.set_scalar_dble = yac_param_int_set_scalar_dble,
.get_scalar_int = yac_param_int_get_scalar_int,
.get_scalar_dble = yac_param_int_get_scalar_dble
}
static int yac_param_int_is_default(const struct yac_param *param)
Definition param_int.c:32
static enum yac_param_type yac_param_int_get_type(const struct yac_param *param)
Definition param_int.c:26
static int yac_param_int_get_scalar(const struct yac_param *param, char *buf, size_t buflen)
Definition param_int.c:93
static int yac_param_int_set_scalar_dble(struct yac_param *param, double value)
Definition param_int.c:118
static int yac_param_int_get_scalar_dble(const struct yac_param *param, double *value)
Definition param_int.c:129
static int yac_param_int_set_scalar(struct yac_param *param, const char *value_str)
Definition param_int.c:60
static int yac_param_int_set_scalar_int(struct yac_param *param, int value)
Definition param_int.c:47
static void yac_param_int_delete(struct yac_param *param)
Definition param_int.c:110
static const char * yac_param_int_get_name(const struct yac_param *param)
Definition param_int.c:40
static int yac_param_int_get_scalar_int(const struct yac_param *param, int *value)
Definition param_int.c:78

Definition at line 140 of file param_int.c.