libamxc  1.10.3
C Generic Data Containers
variant_dummy_types.c File Reference
#include <stdlib.h>
#include <amxc/amxc_variant_type.h>
#include <amxc/amxc_variant.h>
#include <amxc/amxc_htable.h>
#include <amxc_variant_priv.h>

Go to the source code of this file.

Functions

static CONSTRUCTOR void test_add_dummy_types ()
 
static DESTRUCTOR void test_remove_dummy_types ()
 

Variables

static amxc_var_type_t dummy_int8_t
 
static amxc_var_type_t dummy_int16_t
 
static amxc_var_type_t dummy_int32_t
 
static amxc_var_type_t dummy_uint8_t
 
static amxc_var_type_t dummy_uint16_t
 
static amxc_var_type_t dummy_uint32_t
 
static amxc_var_type_t dummy_float_t
 
static amxc_var_type_t dummy_double_t
 
static amxc_var_type_t dummy_fd_t
 
static amxc_var_type_t dummy_custom_t
 
static amxc_var_type_tdummies [AMXC_VAR_ID_CUSTOM_BASE+1]
 

Function Documentation

◆ test_add_dummy_types()

static CONSTRUCTOR void test_add_dummy_types ( )
static

Definition at line 190 of file variant_dummy_types.c.

190  {
191  for(uint32_t i = 0; i < AMXC_VAR_ID_CUSTOM_BASE; i++) {
192  if(dummies[i] != NULL) {
193  amxc_var_add_type(dummies[i], i);
194  }
195  }
196 
198 }
uint32_t PRIVATE amxc_var_add_type(amxc_var_type_t *const type, const uint32_t index)
#define AMXC_VAR_ID_CUSTOM_BASE
Base variant id for custom variants.
Definition: amxc_variant.h:257
uint32_t amxc_var_register_type(amxc_var_type_t *const type)
Register a new variant type.
static amxc_var_type_t * dummies[AMXC_VAR_ID_CUSTOM_BASE+1]
static amxc_var_type_t dummy_custom_t

◆ test_remove_dummy_types()

static DESTRUCTOR void test_remove_dummy_types ( )
static

Definition at line 200 of file variant_dummy_types.c.

200  {
201  for(uint32_t i = 0; i < AMXC_VAR_ID_CUSTOM_BASE; i++) {
202  if(dummies[i] != NULL) {
204  }
205  }
207 }
int PRIVATE amxc_var_remove_type(amxc_var_type_t *const type)
int amxc_var_unregister_type(amxc_var_type_t *const type)
Unregisters an already registered variant type.

Variable Documentation

◆ dummies

Initial value:
= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static amxc_var_type_t dummy_int8_t
static amxc_var_type_t dummy_int16_t
static amxc_var_type_t dummy_double_t
static amxc_var_type_t dummy_uint8_t
static amxc_var_type_t dummy_float_t
static amxc_var_type_t dummy_uint16_t
static amxc_var_type_t dummy_fd_t
static amxc_var_type_t dummy_int32_t
static amxc_var_type_t dummy_uint32_t

Definition at line 171 of file variant_dummy_types.c.

◆ dummy_custom_t

amxc_var_type_t dummy_custom_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
.name = "dummy_custom_t"
}

Definition at line 160 of file variant_dummy_types.c.

◆ dummy_double_t

amxc_var_type_t dummy_double_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_DOUBLE
Provides a name for variant id AMXC_VAR_ID_DOUBLE.
Definition: amxc_variant.h:336

Definition at line 138 of file variant_dummy_types.c.

◆ dummy_fd_t

amxc_var_type_t dummy_fd_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_FD
Provides a name for variant id AMXC_VAR_ID_FD.
Definition: amxc_variant.h:360

Definition at line 149 of file variant_dummy_types.c.

◆ dummy_float_t

amxc_var_type_t dummy_float_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_FLOAT
Provides a name for variant id AMXC_VAR_ID_FLOAT.
Definition: amxc_variant.h:330

Definition at line 127 of file variant_dummy_types.c.

◆ dummy_int16_t

amxc_var_type_t dummy_int16_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_INT16
Provides a name for variant id AMXC_VAR_ID_INT16.
Definition: amxc_variant.h:288

Definition at line 72 of file variant_dummy_types.c.

◆ dummy_int32_t

amxc_var_type_t dummy_int32_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_INT32
Provides a name for variant id AMXC_VAR_ID_INT32.
Definition: amxc_variant.h:294

Definition at line 83 of file variant_dummy_types.c.

◆ dummy_int8_t

amxc_var_type_t dummy_int8_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_INT8
Provides a name for variant id AMXC_VAR_ID_INT8.
Definition: amxc_variant.h:282

Definition at line 61 of file variant_dummy_types.c.

◆ dummy_uint16_t

amxc_var_type_t dummy_uint16_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_UINT16
Provides a name for variant id AMXC_VAR_ID_UINT16.
Definition: amxc_variant.h:312

Definition at line 105 of file variant_dummy_types.c.

◆ dummy_uint32_t

amxc_var_type_t dummy_uint32_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_UINT32
Provides a name for variant id AMXC_VAR_ID_UINT32.
Definition: amxc_variant.h:318

Definition at line 116 of file variant_dummy_types.c.

◆ dummy_uint8_t

amxc_var_type_t dummy_uint8_t
static
Initial value:
=
{
.init = NULL,
.del = NULL,
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
}
#define AMXC_VAR_NAME_UINT8
Provides a name for variant id AMXC_VAR_ID_UINT8.
Definition: amxc_variant.h:306

Definition at line 94 of file variant_dummy_types.c.