|
libamxc
1.10.3
C Generic Data Containers
|

Macros | |
| #define | GET_ARG(a, n) amxc_var_get_key(a, n, AMXC_VAR_FLAG_DEFAULT) |
| Convenience macro for getting variant out of a composite variant by key. More... | |
| #define | GET_BOOL(a, n) amxc_var_dyncast(bool, n == NULL ? a : GET_ARG(a, n)) |
| Convenience macro for getting a bool out of a composite variant by key. More... | |
| #define | GET_CHAR(a, n) amxc_var_constcast(cstring_t, n == NULL ? a : GET_ARG(a, n)) |
| Convenience macro for getting a char* out of a composite variant by key. More... | |
| #define | GET_UINT32(a, n) amxc_var_dyncast(uint32_t, n == NULL ? a : GET_ARG(a, n)) |
| Convenience macro for getting a uint32_t out of a composite variant by key. More... | |
| #define | GET_INT32(a, n) amxc_var_dyncast(int32_t, n == NULL ? a : GET_ARG(a, n)) |
| Convenience macro for getting a int32_t out of a composite variant by key. More... | |
| #define | GETI_ARG(a, i) amxc_var_get_index(a, i, AMXC_VAR_FLAG_DEFAULT) |
| Convenience macro for getting variant out of a composite variant by index. More... | |
| #define | GETI_BOOL(a, i) amxc_var_dyncast(bool, GETI_ARG(a, i)) |
| Convenience macro for getting a bool out of a composite variant by index. More... | |
| #define | GETI_CHAR(a, i) amxc_var_constcast(cstring_t, GETI_ARG(a, i)) |
| Convenience macro for getting a char* out of a composite variant by index. More... | |
| #define | GETI_UINT32(a, i) amxc_var_dyncast(uint32_t, GETI_ARG(a, i)) |
| Convenience macro for getting a uint32_t out of a composite variant by index. More... | |
| #define | GETI_INT32(a, i) amxc_var_dyncast(int32_t, GETI_ARG(a, i)) |
| Convenience macro for getting a int32_t out of a composite variant by index. More... | |
| #define | GETP_ARG(a, p) amxc_var_get_path(a, p, AMXC_VAR_FLAG_DEFAULT) |
| Convenience macro for getting variant out of a composite variant by path. More... | |
| #define | GETP_BOOL(a, p) amxc_var_dyncast(bool, p == NULL ? a : GETP_ARG(a, p)) |
| Convenience macro for getting a bool out of a composite variant by path. More... | |
| #define | GETP_CHAR(a, p) amxc_var_constcast(cstring_t, p == NULL ? a : GETP_ARG(a, p)) |
| Convenience macro for getting a string out of a composite variant by path. More... | |
| #define | GETP_UINT32(a, p) amxc_var_dyncast(uint32_t, p == NULL ? a : GETP_ARG(a, p)) |
| Convenience macro for getting a uint32 out of a composite variant by path. More... | |
| #define | GETP_INT32(a, p) amxc_var_dyncast(int32_t, p == NULL ? a : GETP_ARG(a, p)) |
| Convenience macro for getting a int32 out of a composite variant by path. More... | |
Functions | |
| int | amxc_var_dump (const amxc_var_t *const var, int fd) |
| Dumps the content of the variant in a human readable manner. More... | |
| int | amxc_var_dump_stream (const amxc_var_t *const var, FILE *stream) |
| Dumps the content of the variant in a human readable manner. More... | |
| int | amxc_var_log (const amxc_var_t *const var) |
| Logs the content of the variant in a human readable manner to syslog. More... | |
A list of utility functions and macro's that make common variant tasks easier.
| #define GET_ARG | ( | a, | |
| n | |||
| ) | amxc_var_get_key(a, n, AMXC_VAR_FLAG_DEFAULT) |
Convenience macro for getting variant out of a composite variant by key.
Macro expands to amxc_var_get_key(a, n, AMXC_VAR_FLAG_DEFAULT)
Definition at line 436 of file amxc_variant.h.
| #define GET_BOOL | ( | a, | |
| n | |||
| ) | amxc_var_dyncast(bool, n == NULL ? a : GET_ARG(a, n)) |
Convenience macro for getting a bool out of a composite variant by key.
Macro expands to amxc_var_dyncast(bool, n == NULL?a:amxc_var_get_key(a, n, AMXC_VAR_FLAG_DEFAULT))
Definition at line 446 of file amxc_variant.h.
| #define GET_CHAR | ( | a, | |
| n | |||
| ) | amxc_var_constcast(cstring_t, n == NULL ? a : GET_ARG(a, n)) |
Convenience macro for getting a char* out of a composite variant by key.
Macro expands to amxc_var_constcast(cstring_t, n == NULL?a:amxc_var_get_key(a, n, AMXC_VAR_FLAG_DEFAULT))
Definition at line 456 of file amxc_variant.h.
| #define GET_INT32 | ( | a, | |
| n | |||
| ) | amxc_var_dyncast(int32_t, n == NULL ? a : GET_ARG(a, n)) |
Convenience macro for getting a int32_t out of a composite variant by key.
Macro expands to amxc_var_dyncast(int32_t, n == NULL?a:amxc_var_get_key(a, n, AMXC_VAR_FLAG_DEFAULT))
Definition at line 476 of file amxc_variant.h.
| #define GET_UINT32 | ( | a, | |
| n | |||
| ) | amxc_var_dyncast(uint32_t, n == NULL ? a : GET_ARG(a, n)) |
Convenience macro for getting a uint32_t out of a composite variant by key.
Macro expands to amxc_var_dyncast(uint32_t, n == NULL?a:amxc_var_get_key(a, n, AMXC_VAR_FLAG_DEFAULT))
Definition at line 466 of file amxc_variant.h.
| #define GETI_ARG | ( | a, | |
| i | |||
| ) | amxc_var_get_index(a, i, AMXC_VAR_FLAG_DEFAULT) |
Convenience macro for getting variant out of a composite variant by index.
Macro expands to amxc_var_get_index(a, i, AMXC_VAR_FLAG_DEFAULT)
Definition at line 487 of file amxc_variant.h.
| #define GETI_BOOL | ( | a, | |
| i | |||
| ) | amxc_var_dyncast(bool, GETI_ARG(a, i)) |
Convenience macro for getting a bool out of a composite variant by index.
Macro expands to amxc_var_dyncast(bool, amxc_var_get_index(a, i, AMXC_VAR_FLAG_DEFAULT))
Definition at line 497 of file amxc_variant.h.
| #define GETI_CHAR | ( | a, | |
| i | |||
| ) | amxc_var_constcast(cstring_t, GETI_ARG(a, i)) |
Convenience macro for getting a char* out of a composite variant by index.
Macro expands to amxc_var_constcast(cstring_t, amxc_var_get_index(a, i, AMXC_VAR_FLAG_DEFAULT))
Definition at line 507 of file amxc_variant.h.
| #define GETI_INT32 | ( | a, | |
| i | |||
| ) | amxc_var_dyncast(int32_t, GETI_ARG(a, i)) |
Convenience macro for getting a int32_t out of a composite variant by index.
Macro expands to amxc_var_dyncast(int32_t, amxc_var_get_index(a, i, AMXC_VAR_FLAG_DEFAULT))
Definition at line 527 of file amxc_variant.h.
| #define GETI_UINT32 | ( | a, | |
| i | |||
| ) | amxc_var_dyncast(uint32_t, GETI_ARG(a, i)) |
Convenience macro for getting a uint32_t out of a composite variant by index.
Macro expands to amxc_var_dyncast(uint32_t, amxc_var_get_index(a, i, AMXC_VAR_FLAG_DEFAULT))
Definition at line 517 of file amxc_variant.h.
| #define GETP_ARG | ( | a, | |
| p | |||
| ) | amxc_var_get_path(a, p, AMXC_VAR_FLAG_DEFAULT) |
Convenience macro for getting variant out of a composite variant by path.
Macro expands to amxc_var_get_path(a, p, AMXC_VAR_FLAG_DEFAULT)
Definition at line 538 of file amxc_variant.h.
| #define GETP_BOOL | ( | a, | |
| p | |||
| ) | amxc_var_dyncast(bool, p == NULL ? a : GETP_ARG(a, p)) |
Convenience macro for getting a bool out of a composite variant by path.
Macro expands to amxc_var_dyncast(bool, p == NULL?a:amxc_var_get_path(a, p, AMXC_VAR_FLAG_DEFAULT))
Definition at line 548 of file amxc_variant.h.
| #define GETP_CHAR | ( | a, | |
| p | |||
| ) | amxc_var_constcast(cstring_t, p == NULL ? a : GETP_ARG(a, p)) |
Convenience macro for getting a string out of a composite variant by path.
Macro expands to amxc_var_constcast(cstring_t, p == NULL?a:amxc_var_get_path(a, p, AMXC_VAR_FLAG_DEFAULT))
Definition at line 558 of file amxc_variant.h.
| #define GETP_INT32 | ( | a, | |
| p | |||
| ) | amxc_var_dyncast(int32_t, p == NULL ? a : GETP_ARG(a, p)) |
Convenience macro for getting a int32 out of a composite variant by path.
Macro expands to amxc_var_dyncast(int32_t, p == NULL?a:amxc_var_get_path(a, p, AMXC_VAR_FLAG_DEFAULT))
Definition at line 578 of file amxc_variant.h.
| #define GETP_UINT32 | ( | a, | |
| p | |||
| ) | amxc_var_dyncast(uint32_t, p == NULL ? a : GETP_ARG(a, p)) |
Convenience macro for getting a uint32 out of a composite variant by path.
Macro expands to amxc_var_dyncast(uint32_t, p == NULL?a:amxc_var_get_path(a, p, AMXC_VAR_FLAG_DEFAULT))
Definition at line 568 of file amxc_variant.h.
| int amxc_var_dump | ( | const amxc_var_t *const | var, |
| int | fd | ||
| ) |
Dumps the content of the variant in a human readable manner.
Writes the content of the variant in a human readable and structured manner to the provided file descriptor.
This function is useful for debugging purposes.
| var | pointer to a variant struct |
| fd | the file descriptor |
Definition at line 340 of file amxc_variant_dump.c.
| int amxc_var_dump_stream | ( | const amxc_var_t *const | var, |
| FILE * | stream | ||
| ) |
Dumps the content of the variant in a human readable manner.
Writes the content of the variant in a human readable and structured manner to the provided file pointer.
This function is useful for debugging purposes.
| var | pointer to a variant struct |
| stream | the file pointer |
Definition at line 344 of file amxc_variant_dump.c.
| int amxc_var_log | ( | const amxc_var_t *const | var | ) |
Logs the content of the variant in a human readable manner to syslog.
Writes the content of the variant in a human readable and structured manner to the syslog, providing the system log service was opened.
This function is usefull for debugging purposes.
| var | pointer to a variant struct |
Definition at line 348 of file amxc_variant_dump.c.