Formatted output: the field kinds, the value union, the macros that build both, and the numer table. More...
#include "verba_scribo/verba_scribo.h"Go to the source code of this file.
Data Structures | |
| struct | mmgr_field |
| One field of a spec. More... | |
| struct | mmgr_fval |
| One value, tagged with the kind that selects which arm of as holds it. More... | |
| struct | NumerosCfg |
| Arguments for the four numer calls. More... | |
| struct | NumerosScriboNs |
| Type of the numer dispatch table. More... | |
Macros | |
| #define | MMGR_STR |
| Expands to an mmgr_field of kind MMGR_FK_STR, with width 0, bytes 0 and literal NULL. | |
| #define | MMGR_U32 |
| Expands to an mmgr_field of kind MMGR_FK_U32, with width 0, bytes 0 and literal NULL. | |
| #define | MMGR_U64 |
| Expands to an mmgr_field of kind MMGR_FK_U64, with width 0, bytes 0 and literal NULL. | |
| #define | MMGR_I64 |
| Expands to an mmgr_field of kind MMGR_FK_I64, with width 0, bytes 0 and literal NULL. | |
| #define | MMGR_CH |
| Expands to an mmgr_field of kind MMGR_FK_CH, with width 0, bytes 0 and literal NULL. | |
| #define | MMGR_JSON |
| Expands to an mmgr_field of kind MMGR_FK_JSON, with width 0, bytes 0 and literal NULL. | |
| #define | MMGR_XML |
| Expands to an mmgr_field of kind MMGR_FK_XML, with width 0, bytes 0 and literal NULL. | |
| #define | MMGR_END |
| Expands to an mmgr_field of kind MMGR_FK_END, with width 0, bytes 0 and literal NULL. | |
| #define | MMGR_VSTR(text_) |
| Expands to an mmgr_fval of kind MMGR_FK_STR, with text_ in as.text and width 0. | |
| #define | MMGR_VU32(value_) |
| Expands to an mmgr_fval of kind MMGR_FK_U32, with value_ in as.u32 and width 0. | |
| #define | MMGR_VU64(value_) |
| Expands to an mmgr_fval of kind MMGR_FK_U64, with value_ in as.u64 and width 0. | |
| #define | MMGR_VI64(value_) |
| Expands to an mmgr_fval of kind MMGR_FK_I64, with value_ in as.i64 and width 0. | |
| #define | MMGR_VDEC(value_) |
| Expands to an mmgr_fval of kind MMGR_FK_DEC, with value_ in as.u32 and width 0. | |
| #define | MMGR_VHEX(value_) |
| Expands to an mmgr_fval of kind MMGR_FK_HEX, with value_ in as.u64 and width 0. | |
| #define | MMGR_VOCT(value_) |
| Expands to an mmgr_fval of kind MMGR_FK_OCT, with value_ in as.u64 and width 0. | |
| #define | MMGR_VG(value_) |
| Expands to an mmgr_fval of kind MMGR_FK_G, with value_ in as.real and width 0. | |
| #define | MMGR_VFIX(value_) |
| Expands to an mmgr_fval of kind MMGR_FK_FIX, with value_ in as.real and width 0. | |
| #define | MMGR_VCH(character_) |
| Expands to an mmgr_fval of kind MMGR_FK_CH, with character_ in as.character and width 0. | |
| #define | MMGR_VJSON(text_) |
| Expands to an mmgr_fval of kind MMGR_FK_JSON, with text_ in as.text and width 0. | |
| #define | MMGR_VXML(text_) |
| Expands to an mmgr_fval of kind MMGR_FK_XML, with text_ in as.text and width 0. | |
| #define | MMGR_VDECW(value_, width_) |
| Expands to an mmgr_fval of kind MMGR_FK_DEC, with value_ in as.u32 and width_ in width. | |
| #define | MMGR_VHEXW(value_, width_) |
| Expands to an mmgr_fval of kind MMGR_FK_HEX, with value_ in as.u64 and width_ in width. | |
| #define | MMGR_VOCTW(value_, width_) |
| Expands to an mmgr_fval of kind MMGR_FK_OCT, with value_ in as.u64 and width_ in width. | |
| #define | MMGR_VGW(value_, width_) |
| Expands to an mmgr_fval of kind MMGR_FK_G, with value_ in as.real and width_ in width. | |
| #define | MMGR_VFIXW(value_, width_) |
| Expands to an mmgr_fval of kind MMGR_FK_FIX, with value_ in as.real and width_ in width. | |
Enumerations | |
| enum | mmgr_fk { MMGR_FK_END , MMGR_FK_LIT , MMGR_FK_STR , MMGR_FK_U32 , MMGR_FK_U64 , MMGR_FK_I64 , MMGR_FK_DEC , MMGR_FK_HEX , MMGR_FK_OCT , MMGR_FK_G , MMGR_FK_FIX , MMGR_FK_CH , MMGR_FK_JSON , MMGR_FK_XML } |
| What one field formats, and which mmgr_fval arm it reads. More... | |
Functions | |
| size_t | mmgr_numer_build (const NumerosCfg *args) |
| Writes args->spec and args->vals into args->out, starting at args->at. | |
| size_t | mmgr_numer_append (const NumerosCfg *args) |
| Writes args->spec and args->vals into args->out after the string already there. | |
| size_t | mmgr_numer_emit (const NumerosCfg *args) |
| Writes args->vals into args->out, starting at args->at and reading no field list. | |
| size_t | mmgr_numer_emit_append (const NumerosCfg *args) |
| Writes args->vals into args->out after the string already there, reading no field list. | |
Variables | |
| static const NumerosScriboNs | numer |
| Dispatch table instance named numer. | |
Formatted output: the field kinds, the value union, the macros that build both, and the numer table.
Definition in file numeros_scribo.h.
| #define MMGR_STR |
Expands to an mmgr_field of kind MMGR_FK_STR, with width 0, bytes 0 and literal NULL.
Definition at line 60 of file numeros_scribo.h.
| #define MMGR_U32 |
Expands to an mmgr_field of kind MMGR_FK_U32, with width 0, bytes 0 and literal NULL.
Definition at line 63 of file numeros_scribo.h.
| #define MMGR_U64 |
Expands to an mmgr_field of kind MMGR_FK_U64, with width 0, bytes 0 and literal NULL.
Definition at line 66 of file numeros_scribo.h.
| #define MMGR_I64 |
Expands to an mmgr_field of kind MMGR_FK_I64, with width 0, bytes 0 and literal NULL.
Definition at line 69 of file numeros_scribo.h.
| #define MMGR_CH |
Expands to an mmgr_field of kind MMGR_FK_CH, with width 0, bytes 0 and literal NULL.
Definition at line 72 of file numeros_scribo.h.
| #define MMGR_JSON |
Expands to an mmgr_field of kind MMGR_FK_JSON, with width 0, bytes 0 and literal NULL.
Definition at line 75 of file numeros_scribo.h.
| #define MMGR_XML |
Expands to an mmgr_field of kind MMGR_FK_XML, with width 0, bytes 0 and literal NULL.
Definition at line 78 of file numeros_scribo.h.
| #define MMGR_END |
Expands to an mmgr_field of kind MMGR_FK_END, with width 0, bytes 0 and literal NULL.
Definition at line 85 of file numeros_scribo.h.
| #define MMGR_VSTR | ( | text_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_STR, with text_ in as.text and width 0.
| [in] | text_ | String placed in as.text [BORROWS]. |
Definition at line 114 of file numeros_scribo.h.
| #define MMGR_VU32 | ( | value_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_U32, with value_ in as.u32 and width 0.
| [in] | value_ | Value placed in as.u32. |
Definition at line 121 of file numeros_scribo.h.
| #define MMGR_VU64 | ( | value_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_U64, with value_ in as.u64 and width 0.
| [in] | value_ | Value placed in as.u64. |
Definition at line 128 of file numeros_scribo.h.
| #define MMGR_VI64 | ( | value_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_I64, with value_ in as.i64 and width 0.
| [in] | value_ | Value placed in as.i64. |
Definition at line 135 of file numeros_scribo.h.
| #define MMGR_VDEC | ( | value_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_DEC, with value_ in as.u32 and width 0.
| [in] | value_ | Value placed in as.u32. |
Definition at line 142 of file numeros_scribo.h.
| #define MMGR_VHEX | ( | value_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_HEX, with value_ in as.u64 and width 0.
| [in] | value_ | Value placed in as.u64. |
Definition at line 149 of file numeros_scribo.h.
| #define MMGR_VOCT | ( | value_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_OCT, with value_ in as.u64 and width 0.
| [in] | value_ | Value placed in as.u64. |
Definition at line 156 of file numeros_scribo.h.
| #define MMGR_VG | ( | value_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_G, with value_ in as.real and width 0.
| [in] | value_ | Value placed in as.real. |
Definition at line 163 of file numeros_scribo.h.
| #define MMGR_VFIX | ( | value_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_FIX, with value_ in as.real and width 0.
| [in] | value_ | Value placed in as.real. |
Definition at line 170 of file numeros_scribo.h.
| #define MMGR_VCH | ( | character_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_CH, with character_ in as.character and width 0.
| [in] | character_ | Character placed in as.character. |
Definition at line 177 of file numeros_scribo.h.
| #define MMGR_VJSON | ( | text_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_JSON, with text_ in as.text and width 0.
| [in] | text_ | String placed in as.text [BORROWS]. |
Definition at line 184 of file numeros_scribo.h.
| #define MMGR_VXML | ( | text_ | ) |
Expands to an mmgr_fval of kind MMGR_FK_XML, with text_ in as.text and width 0.
| [in] | text_ | String placed in as.text [BORROWS]. |
Definition at line 191 of file numeros_scribo.h.
| #define MMGR_VDECW | ( | value_, | |
| width_ ) |
Expands to an mmgr_fval of kind MMGR_FK_DEC, with value_ in as.u32 and width_ in width.
| [in] | value_ | Value placed in as.u32. |
| [in] | width_ | Width placed in the width member. |
Definition at line 200 of file numeros_scribo.h.
| #define MMGR_VHEXW | ( | value_, | |
| width_ ) |
Expands to an mmgr_fval of kind MMGR_FK_HEX, with value_ in as.u64 and width_ in width.
| [in] | value_ | Value placed in as.u64. |
| [in] | width_ | Width placed in the width member. |
Definition at line 209 of file numeros_scribo.h.
| #define MMGR_VOCTW | ( | value_, | |
| width_ ) |
Expands to an mmgr_fval of kind MMGR_FK_OCT, with value_ in as.u64 and width_ in width.
| [in] | value_ | Value placed in as.u64. |
| [in] | width_ | Width placed in the width member. |
Definition at line 218 of file numeros_scribo.h.
| #define MMGR_VGW | ( | value_, | |
| width_ ) |
Expands to an mmgr_fval of kind MMGR_FK_G, with value_ in as.real and width_ in width.
| [in] | value_ | Value placed in as.real. |
| [in] | width_ | Width placed in the width member. |
Definition at line 229 of file numeros_scribo.h.
| #define MMGR_VFIXW | ( | value_, | |
| width_ ) |
Expands to an mmgr_fval of kind MMGR_FK_FIX, with value_ in as.real and width_ in width.
| [in] | value_ | Value placed in as.real. |
| [in] | width_ | Width placed in the width member. |
Definition at line 240 of file numeros_scribo.h.
| enum mmgr_fk |
What one field formats, and which mmgr_fval arm it reads.
Definition at line 44 of file numeros_scribo.h.
| size_t mmgr_numer_build | ( | const NumerosCfg * | args | ) |
Writes args->spec and args->vals into args->out, starting at args->at.
| [in] | args | Buffer, capacity, the field list and the values [BORROWS]. |
References mmgr_numer_build().
Referenced by mmgr_numer_build().
| size_t mmgr_numer_append | ( | const NumerosCfg * | args | ) |
Writes args->spec and args->vals into args->out after the string already there.
| [in] | args | Buffer, capacity, the field list and the values [BORROWS]. |
References mmgr_numer_append().
Referenced by mmgr_numer_append().
| size_t mmgr_numer_emit | ( | const NumerosCfg * | args | ) |
Writes args->vals into args->out, starting at args->at and reading no field list.
| [in] | args | Buffer, capacity and the values [BORROWS]. |
References mmgr_numer_emit().
Referenced by mmgr_numer_emit().
| size_t mmgr_numer_emit_append | ( | const NumerosCfg * | args | ) |
Writes args->vals into args->out after the string already there, reading no field list.
| [in] | args | Buffer, capacity and the values [BORROWS]. |
References mmgr_numer_emit_append().
Referenced by mmgr_numer_emit_append().
|
static |
Dispatch table instance named numer.
Definition at line 337 of file numeros_scribo.h.