tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
input.h
Go to the documentation of this file.
1
7#if !defined(TETENGO_LATTICE_INPUT_H)
8#define TETENGO_LATTICE_INPUT_H
9
10#include <stdbool.h>
11#include <stddef.h>
12
13
14#if defined(__cplusplus)
15extern "C" {
16#endif
17
18#if !defined(DOCUMENTATION)
19typedef struct tetengo_lattice_input_tag tetengo_lattice_input_t;
20#endif
21
22
30tetengo_lattice_input_t* tetengo_lattice_input_createStringInput(const char* value);
31
36{
38 void* p_context;
39
50 bool (*equal_to_proc)(void* p_context, void* p_another_context);
51
60 size_t (*hash_value_proc)(void* p_context);
61
70 size_t (*length_proc)(void* p_context);
71
82 void* (*create_subrange_context_proc)(void* p_context, size_t offset, size_t length);
83
91
104 bool (*append_proc)(void* p_context, void* p_another_context);
105
107
115tetengo_lattice_input_t*
117
123void tetengo_lattice_input_destroy(const tetengo_lattice_input_t* p_input);
124
134bool tetengo_lattice_input_equal(const tetengo_lattice_input_t* p_one, const tetengo_lattice_input_t* p_another);
135
143size_t tetengo_lattice_input_hashValue(const tetengo_lattice_input_t* p_input);
144
152size_t tetengo_lattice_input_length(const tetengo_lattice_input_t* p_input);
153
161tetengo_lattice_input_t* tetengo_lattice_input_clone(const tetengo_lattice_input_t* p_input);
162
173tetengo_lattice_input_t*
174tetengo_lattice_input_createSubrange(const tetengo_lattice_input_t* p_input, size_t offset, size_t length);
175
188bool tetengo_lattice_input_append(tetengo_lattice_input_t* p_input, tetengo_lattice_input_t* p_another);
189
197const char* tetengo_lattice_stringInput_value(const tetengo_lattice_input_t* p_string_input);
198
208bool tetengo_lattice_stringInput_setValue(tetengo_lattice_input_t* p_string_input, const char* value);
209
217const void* tetengo_lattice_customInput_context(const tetengo_lattice_input_t* p_custom_input);
218
228bool tetengo_lattice_customInput_setContext(tetengo_lattice_input_t* p_custom_input, void* p_context);
229
230
231#if defined(__cplusplus)
232}
233#endif
234
235
236#endif
struct tetengo_lattice_customInputDefinition_tag tetengo_lattice_customInputDefinition_t
A custom input definition.
bool tetengo_lattice_customInput_setContext(tetengo_lattice_input_t *p_custom_input, void *p_context)
Sets a context of a custom input.
tetengo_lattice_input_t * tetengo_lattice_input_createSubrange(const tetengo_lattice_input_t *p_input, size_t offset, size_t length)
Creates a subrange.
bool tetengo_lattice_input_append(tetengo_lattice_input_t *p_input, tetengo_lattice_input_t *p_another)
Appends another input.
tetengo_lattice_input_t * tetengo_lattice_input_clone(const tetengo_lattice_input_t *p_input)
Clone the input.
const char * tetengo_lattice_stringInput_value(const tetengo_lattice_input_t *p_string_input)
Returns the value of a string input.
size_t tetengo_lattice_input_hashValue(const tetengo_lattice_input_t *p_input)
Returns the hash value.
const void * tetengo_lattice_customInput_context(const tetengo_lattice_input_t *p_custom_input)
Returns the context of a custom input.
tetengo_lattice_input_t * tetengo_lattice_input_createCustomInput(const tetengo_lattice_customInputDefinition_t *p_definition)
Creates a custom input.
void tetengo_lattice_input_destroy(const tetengo_lattice_input_t *p_input)
Destroys an input.
tetengo_lattice_input_t * tetengo_lattice_input_createStringInput(const char *value)
Creates a string input.
bool tetengo_lattice_input_equal(const tetengo_lattice_input_t *p_one, const tetengo_lattice_input_t *p_another)
Returns true if one input is equal to another.
size_t tetengo_lattice_input_length(const tetengo_lattice_input_t *p_input)
Returns the length.
bool tetengo_lattice_stringInput_setValue(tetengo_lattice_input_t *p_string_input, const char *value)
Sets a value of a string input.
A custom input definition.
Definition input.h:36
size_t(* length_proc)(void *p_context)
The procedure for length.
Definition input.h:70
bool(* equal_to_proc)(void *p_context, void *p_another_context)
The procedure for equality comparation.
Definition input.h:50
size_t(* hash_value_proc)(void *p_context)
The procedure for hash value.
Definition input.h:60
void * p_context
Definition input.h:38
void(* destroy_subraneg_context_proc)(void *p_context)
The procedure for destroying a subrange context.
Definition input.h:90
bool(* append_proc)(void *p_context, void *p_another_context)
The procedure for append.
Definition input.h:104