coan 4.2.4
|
Go to the source code of this file.
Defines | |
#define | IMPLEMENT_STATIC(component, init_type) |
#define | IMPLEMENT_DYNAMIC(component, init_type) |
#define | IMPLEMENT(component, init_type) IMPLEMENT_STATIC(component,init_type) |
#define | USE_STATIC_INITIALISER(component) |
#define | DEFINE_USER_INIT(component) |
#define | DEFINE_USER_FINIS(component) |
#define | INCLUDE_PUBLIC(component) PUBLIC_STATE_T(component) PUBLIC_STATE(component) |
#define | STATE_DEF(component) typedef struct component##_state_s |
#define | STATE_T(component) component##_state_t |
#define | NO_PRIVATE_STATE(component) typedef PUBLIC_STATE_T(component) STATE_T(component) |
#define | GET_STATE(component, field) GET_STATIC_STATE(component,field) |
#define | SET_STATE(component, field) SET_STATIC_STATE(component,field) |
#define | PUBLIC_STATE_DEF(component) typedef struct component##_public_state_s |
#define | PUBLIC_STATE_T(component) component##_public_state_t |
#define | NO_PUBLIC_STATE(component) typedef STATE_T(component) PUBLIC_STATE_T(component) |
#define | IMPORT(component) |
Macros for component client code. | |
#define | INITIALISE(component) INITOR(component)() |
#define | FINALISE(component) INITOR(component)() |
#define | REINITIALISE(component) (void)(FINALISE(component),INITIALISE(component)) |
#define | GET_PUBLIC(component, field) (assert(true),(PUBLIC_HANDLE(component)->field)) |
#define | SET_PUBLIC(component, field) (PUBLIC_HANDLE(component)->field) |
Enumerations | |
enum | component_storage_type { STATE_STATIC, STATE_DYNAMIC } |
enum | component_initialisation_type { ZERO_INITABLE, STATIC_INITABLE, USER_INITABLE } |
#define | STATE_ALLOCATOR (malloc) |
#define | STATE(component) component##_state |
#define | PUBLIC_STATE(component) component##_public_state |
#define | HANDLE(component) component##_h |
#define | PUBLIC_HANDLE(component) component##_public_h |
#define | USER_INIT(component) component##_init |
#define | USER_FINIS(component) component##_finis |
#define | USER_INIT_HANDLE(component) component##_init_h |
#define | USER_FINIS_HANDLE(component) component##_finis_h |
#define | INITOR(component) component##_initor |
#define | FINITOR(component) component##_finitor |
#define | STATIC_INITIALISER(component) component##_static_initialiser |
#define | STATIC_INITIALISER_HANDLE(component) component##_static_initialiser_h |
#define | STORAGE_TYPE_TAG(component) component##_storage_type |
#define | INITIALISATION_TYPE_TAG(component) component##_initialisation_type |
#define | DECL_USER_INIT(component) void USER_INIT(component)(STATE_T(component) *) |
#define | DECL_USER_FINIS(component) void USER_FINIS(component)(STATE_T(component) *) |
#define | DECL_USER_INIT_HANDLE(component) void (*USER_INIT_HANDLE(component))(STATE_T(component) *) |
#define | DECL_USER_FINIS_HANDLE(component) void (*USER_FINIS_HANDLE(component))(STATE_T(component) *) |
#define | DECL_INITOR(component) void INITOR(component)(void) |
#define | DECL_FINITOR(component) void FINITOR(component)(void) |
#define | DECL_STATIC_INITIALISER(component) static const STATE_T(component) STATIC_INITIALISER(component) |
#define | DECL_STATIC_INITIALISER_HANDLE(component) static const STATE_T(component) * const STATIC_INITIALISER_HANDLE(component) |
#define | SELECT_STATIC(component) enum component##_storage_type { STORAGE_TYPE_TAG(component) = STATE_STATIC } |
#define | SELECT_DYNAMIC(component) enum component##_storage_type { STORAGE_TYPE_TAG(component) = STATE_DYNAMIC } |
#define | SELECT_INITIALISATION_TYPE(component, init_type) enum component##_init_type { INITIALISATION_TYPE_TAG(component) = init_type } |
#define | SELECT_ZERO_INITABLE(component) SELECT_INITIALISATION_TYPE(component,ZERO_INITABLE) |
#define | SELECT_STATIC_INITABLE(component) SELECT_INITIALISATION_TYPE(component,STATIC_INITABLE) |
#define | SELECT_USER_INITABLE(component) SELECT_INITIALISATION_TYPE(component,USER_INITABLE) |
#define | IS_STATIC(component) (STORAGE_TYPE_TAG(component) == (int)STATE_STATIC) |
#define | IS_ZERO_INITABLE(component) (INITIALISATION_TYPE_TAG(component) == (int)ZERO_INITABLE) |
#define | HAS_STATIC_INITIALISER(component) (INITIALISATION_TYPE_TAG(component) == STATIC_INITABLE) |
#define | HAS_USER_INIT(component) (INITIALISATION_TYPE_TAG(component) == (int)USER_INITABLE) |
#define | DECL_DYNAMIC_STATE(component) |
#define | DECL_STATIC_STATE(component) |
#define | IMPORT_INITOR(component) extern DECL_INITOR(component) |
#define | IMPORT_FINITOR(component) extern DECL_FINITOR(component) |
#define | IMPORT_STATE(component) extern PUBLIC_STATE_T(component) * PUBLIC_HANDLE(component) |
#define | GET_STATE_BY_HANDLE(component, field) (assert(true),HANDLE(component)->field) |
#define | SET_STATE_BY_HANDLE(component, field) (HANDLE(component)->field) |
#define | GET_STATIC_STATE(component, field) (assert(true),STATE(component).field) |
#define | SET_STATIC_STATE(component, field) (STATE(component).field) |
#define | DEFINE_INITOR(component) |
#define | DEFINE_FINITOR(component) |
void | component_initor (bool is_static, bool is_zero_initable, void **state, void **public_state, void const *initialiser, size_t size, void(*user_init)()) |
void | component_finitor (bool is_static, void **state, void **public_state, void(*user_finis)()) |
The file provides the State Utils interface
Definition in file state_utils.h.
#define FINALISE | ( | component | ) | INITOR(component)() |
Finalise the component's state - appropriately whether static or dynamic, user-finalised or not.
component | Name of the component |
Definition at line 887 of file state_utils.h.
#define GET_PUBLIC | ( | component, | |
field | |||
) | (assert(true),(PUBLIC_HANDLE(component)->field)) |
Invoke this macro in client code file to evaluate a field in the component's public state.
component | Name of the component |
field | Name of the field to be evaluated in the component's state. |
Definition at line 900 of file state_utils.h.
Referenced by add_files(), backup_infile(), chew_on(), chew_string(), chew_unbroken_string(), close_io(), compose_contradiction_insert_format(), config_diagnostics(), configured_symbol_add(), configured_symbol_find(), configured_symbol_match_const(), configured_symbols_rewind(), dataset_add(), dataset_filter_filetypes(), delete_infile(), directive_tally(), done_file(), drop(), dropping_line(), eligible_line(), ensure_buf(), eval_line(), eval_possible_symbol(), eval_unary(), exit_diagnostics(), exitcode(), finalise_diagnostics(), finish_args(), flushline_live(), get_comment_type_name(), get_line(), get_linestate_name(), hash_include_add(), hash_include_lookup(), hash_include_tally(), keywordedit(), line_debug(), make_backup_name(), make_tempfile(), Mpass(), nest(), open_io(), open_output(), parse_args_file(), parse_command_args(), print(), printline_commented_out(), printline_cut(), printline_fast(), printline_slow(), process(), readon(), replace_infile(), report_directive(), report_include(), report_symbol(), restore_all_paren(), save_contradiction(), save_read_pos(), saved_read_pos(), symbol_define(), symbol_undefine(), truncate_line(), unconfigured_symbol_tally(), usage(), version(), and vreport().
#define INITIALISE | ( | component | ) | INITOR(component)() |
Initialise the component's state - appropriately whether static or dynamic, zero-initialisable, static-initialisable, user-initialisable.
component | Name of the component |
Definition at line 881 of file state_utils.h.
Referenced by ready().
#define REINITIALISE | ( | component | ) | (void)(FINALISE(component),INITIALISE(component)) |
Finalise and then initialise the component's state appropriately
component | Name of the component |
Definition at line 892 of file state_utils.h.
#define SET_PUBLIC | ( | component, | |
field | |||
) | (PUBLIC_HANDLE(component)->field) |
Invoke this macro in client code file to code an assignable reference to a field in the component's public state:
SET_PUBLIC(component,field) = value;
component | Name of the component |
field | Name of the field to be evaluated in the component's state. |
Definition at line 911 of file state_utils.h.
Referenced by canonical_string_init(), chew_on(), chew_toplevel(), close_io(), config_diagnostics(), cut_text(), delete_paren(), ensure_buf(), eval_definition_text(), eval_hash_include(), eval_line(), eval_unary(), extend_line(), finalise_diagnostics(), finish_args(), flushline_live(), forget_pending_contradiction(), get_line(), io_toplevel(), keywordedit(), open_io(), open_output(), parse_args(), parse_command_args(), parse_executable(), print(), printline_commented_out(), printline_cut(), readon(), restore_paren(), symbol_undefine(), and truncate_line().