libamxc  1.10.3
C Generic Data Containers
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
_amxc_var Struct Reference

The variant struct definition. More...

#include <amxc_variant.h>

Collaboration diagram for _amxc_var:

Data Fields

amxc_llist_it_t lit
 
amxc_htable_it_t hit
 
uint32_t type_id
 
union {
   char *   s
 
   int8_t   i8
 
   int16_t   i16
 
   int32_t   i32
 
   int64_t   i64
 
   uint8_t   ui8
 
   uint16_t   ui16
 
   uint32_t   ui32
 
   uint64_t   ui64
 
   float   f
 
   double   d
 
   bool   b
 
   amxc_llist_t   vl
 
   amxc_htable_t   vm
 
   int   fd
 
   amxc_ts_t   ts
 
   void *   data
 
data
 

Detailed Description

The variant struct definition.

A variant is a tagged union, which can be added to a linked list or to a hash table as value.

Which field of the union is valid is depending of the type id field in the struct.

Definition at line 861 of file amxc_variant.h.

Field Documentation

◆ b

bool _amxc_var::b

boolean

Definition at line 878 of file amxc_variant.h.

◆ d

double _amxc_var::d

double

Definition at line 877 of file amxc_variant.h.

◆ data [1/2]

void* _amxc_var::data

pointer to hold custom data types

Definition at line 883 of file amxc_variant.h.

◆  [2/2]

union { ... } _amxc_var::data

Variant data

◆ f

float _amxc_var::f

float

Definition at line 876 of file amxc_variant.h.

◆ fd

int _amxc_var::fd

file descriptor

Definition at line 881 of file amxc_variant.h.

◆ hit

amxc_htable_it_t _amxc_var::hit

Hash table iterator, can be used to store the variant in a hash table

Definition at line 863 of file amxc_variant.h.

◆ i16

int16_t _amxc_var::i16

16 bit signed integer

Definition at line 869 of file amxc_variant.h.

◆ i32

int32_t _amxc_var::i32

32 bit signed integer

Definition at line 870 of file amxc_variant.h.

◆ i64

int64_t _amxc_var::i64

64 bit signed integer

Definition at line 871 of file amxc_variant.h.

◆ i8

int8_t _amxc_var::i8

8 bit signed integer

Definition at line 868 of file amxc_variant.h.

◆ lit

amxc_llist_it_t _amxc_var::lit

Linked list iterator, can be used to store the variant in a linked list

Definition at line 862 of file amxc_variant.h.

◆ s

char* _amxc_var::s

String

Definition at line 867 of file amxc_variant.h.

◆ ts

amxc_ts_t _amxc_var::ts

time stamp

Definition at line 882 of file amxc_variant.h.

◆ type_id

uint32_t _amxc_var::type_id

Variant type

Definition at line 864 of file amxc_variant.h.

◆ ui16

uint16_t _amxc_var::ui16

16 bit unsigned integer

Definition at line 873 of file amxc_variant.h.

◆ ui32

uint32_t _amxc_var::ui32

32 bit unsigned integer

Definition at line 874 of file amxc_variant.h.

◆ ui64

uint64_t _amxc_var::ui64

64 bit unsigned integer

Definition at line 875 of file amxc_variant.h.

◆ ui8

uint8_t _amxc_var::ui8

8 bit unsigned integer

Definition at line 872 of file amxc_variant.h.

◆ vl

amxc_llist_t _amxc_var::vl

ambiorix linked list of variants

Definition at line 879 of file amxc_variant.h.

◆ vm

amxc_htable_t _amxc_var::vm

ambiorix hash table (key - value pair) of variants

Definition at line 880 of file amxc_variant.h.


The documentation for this struct was generated from the following file: